version
version() -> 'str'
Piecad version
hull
hull(*objs: Obj2d | Obj3d) -> Obj2d | Obj3d
Return a convex hull of the given objects.
circle
circle(radius: float, segments: int = -1) -> Obj2d
Make a circle of a given radius.
square
square(size: float, center: bool = False) -> Obj2d
Make a square of a given size.
text_set_font
text_set_font(font_name: str) -> None
Set the current font used by `text`.
cube
cube(size: float, center: bool = False) -> Obj3d
Make a cube of with sides of the given size.
extrude
extrude(obj: Obj2d, height: float) -> Obj3d
Create a Obj3d solid from Obj2d of given height.
acos
acos(cosVal: float) -> float
ArcCosine of cosVal returning angle in degrees.
acosh
acosh(cosVal: float) -> float
ArcCosine of hyperbolic cosVal returning angle in degrees.
asin
asin(sinVal: float) -> float
ArcSine of sinVal returning angle in degrees.
asinh
asinh(sinVal: float) -> float
ArcSine of hyperbolic sinVal returning angle in degrees
atan
atan(tanVal: float) -> float
ArcTan of tanVal returning angle in degrees.
atan2
atan2(y: float, x: float) -> float
ArcTan of quotient of y and x returning angle in degrees.
atanh
atanh(tanVal: float) -> float
ArcTan of hyperbolic tanVal returning angle in degrees.
cos
cos(angleInDegrees: float) -> float
Cosine of angle in degrees.
cosh
cosh(angleInDegrees: float) -> float
Hyperbolic cosine of angle in degrees.
deg_to_rad
deg_to_rad(angleInDegrees: float) -> float
Convert degrees to radians.
rad_to_deg
rad_to_deg(angleInRadians: float) -> float
Convert radians to degrees.
sin
sin(angleInDegrees: float) -> float
Sine of angle in degrees.
sinh
sinh(angleInDegrees: float) -> float
Hyperbolic sine of angle in degrees.
tan
tan(angleInDegrees: float) -> float
Tangent of angle in degrees.
tanh
tanh(angleInDegrees: float) -> float
Hyperbolic tangent of angle in degrees.
load
load(filename: str) -> Obj3d | Obj2d
Load a 3d object from a file.
winding
winding(lt: list[tuple[float, float]]) -> str
String description of winding of a 2D polygon.
area
area(self) -> 'float'
The area of this Obj2d.
is_empty
is_empty(self) -> 'bool'
Is this object empty?
mirror
mirror(self, axes: 'tuple[bool, bool]') -> 'Obj2d'
Mirror this object around the given axes.
num_verts
num_verts(self) -> 'int'
The number of vertices in this object.
rotate
rotate(self, degrees: 'float') -> 'Obj2d'
Rotate this object by the given degrees.
scale
scale(self, factors: 'list[float, float]') -> 'Obj2d'
Scale this object by the given factors.
is_empty
is_empty(self) -> 'bool'
Is this object empty?
num_faces
num_faces(self) -> 'int'
The number of faces in this object.
num_verts
num_verts(self) -> 'int'
The number of vertices in this object.
surface_area
surface_area(self) -> 'float'
The surface area of this Obj3d.
volume
volume(self) -> 'float'
The volume of this Obj3d.