2D SDFs
Circle
Bases: GenericGeometry
Circle defined by its radius.
Parameters: |
|
---|
radius: float | int
property
Radius of the circle.
NGon
Bases: GenericGeometry
N-sided regular polygon, defined by the outer radius and the number of sides.
Parameters: |
|
---|
radius: float | int
property
Radius of the n-gon
n_sides: int
property
Number of sides in the n-gon
Rectangle
Bases: GenericGeometry
Rectangle defined by its side lengths.
Parameters: |
|
---|
a: float | int
property
Side length along the x-axis.
b: float | int
property
Side length along the y-axis.
size: np.ndarray
property
2vector of side lengths (a, b).
RoundedRectangle
Bases: GenericGeometry
Rounded rectangle defined by its side lengths and rounding radii for each corner.
Parameters: |
|
---|
a: float | int
property
Side length along the x-axis.
b: float | int
property
Side length along the y-axis.
size: np.ndarray
property
2vector of side lengths (a, b).
round_corners: np.ndarray
property
rounding on each of the corners.
Segment
Bases: GenericGeometry
Line segment defined by its end points.
Parameters: |
|
---|
point_a: np.ndarray
property
Vector defining the position of the start point.
point_b: np.ndarray
property
Vector defining the position of the end point.
Triangle
Bases: GenericGeometry
Triangle defined by the three vertices.
Parameters: |
|
---|
a: np.ndarray
property
Vector defining the position of the first vertex.
b: np.ndarray
property
Vector defining the position of the second vertex.
c: np.ndarray
property
Vector defining the position of the third vertex.
Sector
Bases: GenericGeometry
Sector defined by the radius of the circle and two angles.
Parameters: |
|
---|
radius: float | int
property
Radius of the circle.
angle_1: float | int
property
First angle defining the sector.
angle_2: float | int
property
Second angle defining the sector.
InfiniteSector
Bases: GenericGeometry
Sector of infinite radius defined by two angles.
Parameters: |
|
---|
angle_1: float | int
property
First angle defining the sector.
angle_2: float | int
property
Second angle defining the sector.
Arc
Bases: GenericGeometry
Arc defined by the radius and the angles of both ends.
Parameters: |
|
---|
radius
property
Radius of the arc.
start_angle
property
Angle of one end with respect to the x-axis.
end_angle
property
Angle of the other end with respect to the x-axis.
ParametricCurve
Bases: GenericGeometry
Curve connecting points on the user provided parametric curve.
Parameters: |
|
---|
steps: int
property
Number of points at which the curve is evaluated.
t_start: float | int
property
Start value of parameter t.
t_end: float | int
property
End value of parameter t.
ts: np.ndarray
property
Values of parameter t.
closed: bool
property
Is the segmented line closed on itself. False by default.
sdf_closed_curve()
Returns the SDF of the closed curve if parameter close==True.
Returns: |
|
---|
shape()
Converts the closed parametric curve into a shape.
Returns: |
|
---|
SegmentedParametricCurve
Bases: GenericGeometry
Segmented line connecting the user provided points.
Parameters: |
|
---|
steps: int
property
Number of points at which the curve is evaluated.
t_start: float | int
property
Start value of parameter t.
t_end: float | int
property
End value of parameter t.
ts: np.ndarray
property
Values of parameter t.
closed: bool
property
Is the segmented line closed on itself. False by default.
sdf_closed_curve()
Returns the SDF of the closed curve if parameter close==True.
Returns: |
|
---|
polygon()
Converts the closed segmented line into a polygon.
Returns: |
|
---|
SegmentedLine
Bases: GenericGeometry
Segmented line connecting the user provided points.
Parameters: |
|
---|
closed: bool
property
Is the segmented line closed on itself. False by default.
sdf_closed_curve()
Returns the SDF of the closed curve if parameter close==True.
Returns: |
|
---|
polygon()
Converts the closed segmented line into a polygon.
Returns: |
|
---|
PointCloud2D
Bases: GenericGeometry
SDF of the point cloud.
Parameters: |
|
---|
points: np.ndarray
property
Positions of the points in an array of shape (2, N-points).