Shapes

class figura.shapes.ArcOfCircle(self, pt1: figura.shapes.Point, tangent: figura.geometry.Vector, pt2: figura.shapes.Point)

Construct an arc of a circle from a point, tangent at the point, and another point.

Parameters:
  • pt1 – First point

  • tangent – Tangent at point pt1

  • pt2 – Second point

property end_point
property start_point
class figura.shapes.Circle(self, center: figura.shapes.Point, radius: float, norm=<figura.geometry.Direction object at 0x7ff1f2fc4910>)

Construct a circle from a center point and a radius.

param center:

Center point

param radius:

Radius

param norm:

Normal of the plane

__init__(self, center: figura.shapes.Point, pt: figura.shapes.Point, norm=<figura.geometry.Direction object at 0x7ff1f2fc4af0>)

Construct a circle from a center point and another point

param center:

Center point

param pt:

Point that is part of the circle

param norm:

Normal of the plane

__init__(self, pt1: figura.shapes.Point, pt2: figura.shapes.Point, pt3: figura.shapes.Point)

Construct a circle from three points

param pt1:

First point

param pt2:

Second point

param pt3:

Third point

property area
property location
property radius
class figura.shapes.Edge(shape=None)
classmethod from_shape(edge)
length()

Compute the length of the edge

Returns:

Length of the edge

class figura.shapes.Face(wire=None, shape=None)
area()

Compute the surface area of the face

Returns:

Surface area of the face

classmethod from_shape(face)
is_plane()
plane()
class figura.shapes.Line(pt1, pt2)
class figura.shapes.Point(x, y, z)

Creates a point with its 3 cartesian coordinates

Parameters:
  • x – x-coordinate

  • y – y-coordinate

  • z – z-coordinate

classmethod from_pnt(pnt)
classmethod from_shape(vertex)
is_equal(pt, tol=1e-15)
pnt()
property x

X-coordinate of this point

property y

Y-coordinate of this point

property z

Z-coordinate of this point

class figura.shapes.Polygon(arg1, closed=True)
edge()
classmethod from_shape(obj)
wire()
class figura.shapes.Shape(shape=None)
property color
cut(tool)
edges()
extrude(vec)
faces()
fillet(edges, radius)
classmethod from_shape(obj)
fuse(shape)
hollow(faces_to_remove, thickness, tolerance)
intersect(tool)
mirror(axis)
property name
revolve(axis, angle=6.283185307179586)
rotate(axis: Axis1, angle: float)

Rotate point about axis by an angle

Parameters:
  • axis – Axis of rotation

  • angle – Angle [in degrees]

Returns:

Rotated shape

scale(s)
shape()
translate(v: Vector)
class figura.shapes.Shell(shape=None)
classmethod from_shape(obj)
class figura.shapes.Solid(shapes=None)
classmethod from_shape(obj)
volume()

Compute the volume of the shape

Returns:

Volume of the shape

class figura.shapes.Spline(points, initial_tangent=None, final_tangent=None)

Construct a B-spline that is passing through an array of points. If tangency is specified, the continuity will be C1. If not, then the continuity will be C2

Parameters:
  • points – Array of Vertex s

  • initial_tangent – Tangent (Vector) at the first node

  • final_tangent – Tangent (Vector) at the last node

class figura.shapes.Wire(edges=[], shape=None)
classmethod from_shape(wire)