-
Notifications
You must be signed in to change notification settings - Fork 3
PolyCurve
No documentation available.
Initializes a PolyCurve object.
- `id` (int): The unique identifier of the arc.
- `type` (str): The type of the arc.
- `start` (Point): The start point of the arc.
- `mid` (Point): The mid point of the arc.
- `end` (Point): The end point of the arc.
- `origin` (Point): The origin point of the arc.
- `plane` (Plane): The plane containing the arc.
- `radius` (float): The radius of the arc.
- `startAngle` (float): The start angle of the arc in radians.
- `endAngle` (float): The end angle of the arc in radians.
- `angle_radian` (float): The total angle of the arc in radians.
- `area` (float): The area of the arc.
- `length` (float): The length of the arc.
- `units` (str): The units used for measurement.
- `coordinatesystem` (CoordinateSystem): The coordinate system of the arc.
-
__str__(self) -> str
: Returns a string representation of the PolyCurve. -
area(self) -> float
: Calculates the area enclosed by the PolyCurve using the shoelace formula. -
by_polycurve_2D(PolyCurve2D) -> PolyCurve
: Creates a 3D PolyCurve from a 2D PolyCurve. -
centroid(self) -> Point
: Calculates the centroid of the PolyCurve. -
close(self) -> bool
: Closes the PolyCurve by connecting the last point to the first point. -
copy_translate(pc: PolyCurve, vector_3d: Vector) -> PolyCurve
: Creates a copy of a PolyCurve and translates it by a 3D vector. -
deserialize(data)
: Deserializes the PolyCurve object. -
get_width(self) -> float
: Calculates the width of the PolyCurve. -
length(self) -> float
: Calculates the total length of the PolyCurve. -
multi_split(self, lines: Line) -> list[PolyCurve]
: Splits the PolyCurve by multiple lines. This method splits the PolyCurve by multiple lines and adds the resulting PolyCurves to the project. -
rotate(self, angle: float, dz: float) -> PolyCurve
: Rotates the PolyCurve by a given angle around the Z-axis and displaces it in the Z-direction. -
scale(self, scale_factor: float) -> PolyCurve
: Scales the PolyCurve object by the given factor. -
segment(self, count: int) -> PolyCurve
: Segments the PolyCurve into straight lines. -
serialize(self) -> dict
: Serializes the PolyCurve object. -
split(self, line: Line, returnlines=None) -> list[PolyCurve]
: Splits the PolyCurve by a line and returns the split parts. -
to_polycurve_2D(self)
: Converts the PolyCurve to a PolyCurve2D. -
transform_from_origin(polycurve: PolyCurve, startpoint: Point, directionvector: Vector) -> PolyCurve
: Transforms a PolyCurve from a given origin point and direction vector. -
translate(self, vector_3d: Vector) -> PolyCurve
: Translates the PolyCurve by a 3D vector.
Returns a string representation of the PolyCurve.
str
: The string representation of the PolyCurve.
Calculates the area enclosed by the PolyCurve using the shoelace formula.
float
: The area enclosed by the PolyCurve.
Creates a 3D PolyCurve from a 2D PolyCurve.
-
PolyCurve2D
: The 2D PolyCurve object.
PolyCurve
: The created 3D PolyCurve object.
Calculates the centroid of the PolyCurve.
Point
: The centroid point of the PolyCurve.
Closes the PolyCurve by connecting the last point to the first point.
bool
: True if the PolyCurve is successfully closed, False otherwise.
Creates a copy of a PolyCurve and translates it by a 3D vector.
-
pc
(PolyCurve): The PolyCurve to copy and translate. -
vector_3d
(Vector): The 3D vector by which to translate the PolyCurve.
PolyCurve
: The translated copy of the PolyCurve.
Deserializes the PolyCurve object.
-
data
(dict): Serialized data of the PolyCurve object.
PolyCurve
: Deserialized PolyCurve object.
Calculates the width of the PolyCurve.
float
: The width of the PolyCurve.
Calculates the total length of the PolyCurve.
float
: The total length of the PolyCurve.
Splits the PolyCurve by multiple lines. This method splits the PolyCurve by multiple lines and adds the resulting PolyCurves to the project.
-
lines
(List[Line]): The list of lines to split the PolyCurve.
List[PolyCurve]
: The list of split PolyCurves.
Rotates the PolyCurve by a given angle around the Z-axis and displaces it in the Z-direction.
-
angle
(float): The angle of rotation in degrees. -
dz
(float): The displacement in the Z-direction.
PolyCurve
: The rotated and displaced PolyCurve.
Scales the PolyCurve object by the given factor.
-
scale_factor
: The scaling factor.
PolyCurve
: Scaled PolyCurve object.
Segments the PolyCurve into straight lines.
-
count
(int): The number of segments.
PolyCurve
: The segmented PolyCurve object.
Serializes the PolyCurve object.
dict
: Serialized data of the PolyCurve object.
Splits the PolyCurve by a line and returns the split parts.
-
line
(Line): The line to split the PolyCurve. -
returnlines
(bool, optional): Whether to return the split PolyCurves as objects or add them to the project. Defaults to None.
list[PolyCurve]
: If returnlines
is True, returns a list of split PolyCurves. Otherwise, None.
Converts the PolyCurve to a PolyCurve2D.
PolyCurve2D
: The converted PolyCurve2D.
transform_from_origin(polycurve: PolyCurve, startpoint: Point, directionvector: Vector) -> PolyCurve
Transforms a PolyCurve from a given origin point and direction vector.
-
polycurve
(PolyCurve): The PolyCurve to transform. -
startpoint
(Point): The origin point for the transformation. -
directionvector
(Vector): The direction vector for the transformation.
PolyCurve
: The transformed PolyCurve.
Translates the PolyCurve by a 3D vector.
-
vector_3d
(Vector): The 3D vector by which to translate the PolyCurve.
PolyCurve
: The translated PolyCurve.