jitx/shapes/GeneralChamferedRectangle¶
Package name: jitx/shapes/GeneralChamferedRectangle
Summary¶
GeneralChamferedRectangle¶
Chamfered Rectangle
Constructors¶
Function | Description |
---|---|
GeneralChamferedRectangle | Constructor for defstruct GeneralChamferedRectangle |
Functions¶
Function | Description |
---|---|
GeneralChamferedRectangle (+ 2) | Create a general chamfered rectangle using a CornerModifier to specify which corners are chamfered. |
Definitions¶
GeneralChamferedRectangle¶
Chamfered Rectangle
public defstruct GeneralChamferedRectangle <: Shape & Centerable & HasMetaUtils :
height: Double
pose: Pose
radii: Tuple<Double>
width: Double
-
height: Double
- Height of this general chamfered rectangle. Must be non-negative. -
pose: Pose
- Pose of this general chamfered rectangle. Default value is(0.0, 0.0)
with no rotation and no flip. -
radii: Tuple<Double>
- Tuple of the four radii of the chamfered corners of this general chamfered rectangle, in counter-clockwise order starting from the bottom left. Must all be non-negative. The sum of the radii of the two corners on each side must not exceed the length of the side. -
width: Double
- Width of this general chamfered rectangle. Must be non-negative.
A rectangle with chamfered corners of different radii.
Specified with a width, a height, a tuple of four corner chamfer radii, and a
pose. The pose center is the center of the rectangle. The chamfer radius of each
corner is the equal length of the two legs of the isosceles right triangle which
are cut from the corner. A corner chamfer radius of 0.0
indicates no chamfer
for the corner.
The tuple of radii is ordered starting with the bottom-left corner going
counter-clockwise. The flip of the pose affects the ordering of the general
rounded rectangle's points when converted to a polygon (clockwise when flipped,
otherwise counter-clockwise).
Constructors¶
GeneralChamferedRectangle¶
Constructor for defstruct GeneralChamferedRectangle
public defn GeneralChamferedRectangle (width:Double, height:Double, radii:Tuple<Double>, pose:Pose = ?)
Functions¶
GeneralChamferedRectangle¶
Create a general chamfered rectangle using a CornerModifier
to specify which corners are chamfered.
public defn GeneralChamferedRectangle (w:Double, h:Double, r:Double, m:CornerModifier, p:Pose = ?)
w: Double
- Width of the general chamfered rectangle.h: Double
- Height of the general chamfered rectangle.r: Double
- Corner radius of the general chamfered rectangle.m: CornerModifier
- Which corners to make chamfered of the general chamfered rectangle.p: Pose
- Pose of the general chamfered rectangle. Default is(0.0, 0.0)
with no rotation and no flip.
GeneralChamferedRectangle¶
Create a general chamfered rectangle anchored to a specified alignment with respect to the origin and using a CornerModifier
to specify which corners are chamfered.
public defn GeneralChamferedRectangle (anchor:Anchor, w:Double, h:Double, r:Double, m:CornerModifier)
anchor: Anchor
- Anchor to align the general chamfered rectangle with to the origin.w: Double
- Width of the general chamfered rectangle.h: Double
- Height of the general chamfered rectangle.r: Double
- Corner radius of the general chamfered rectangle.m: CornerModifier
- Which corners to make chamfered of the general chamfered rectangle.
GeneralChamferedRectangle¶
Create a general chamfered rectangle anchored to a specified alignment with respect to the origin.
public defn GeneralChamferedRectangle (anchor:Anchor, w:Double, h:Double, r:Tuple<Double>)
anchor: Anchor
- Anchor to align the general chamfered rectangle with to the origin.w: Double
- Width of the general chamfered rectangle.h: Double
- Height of the general chamfered rectangle.r: Tuple<Double>
- Tuple of four chamfer radii of the corners of the general chamfered rectangle, starting from the bottom-left going counter-clockwise.
Related Packages¶
Forwarded by packages: jitx/shapes, jitx