Skip to main content

ringSector

The ringsector macro drafts a ring sector, which is like a part of a donut with an inside and outside radius. It is particularly useful for drafting curved waistbands, circle skirts, and so on.

It is provided by the ringsector plugin.

note
Not a core-plugins macro

The ringsector macro is not provided by the core-plugins, so you need to load the ringsector plugin explicitly if you want to use it.

Signature

macro('ringsector', {
String id='ringsector',
Point center = new Point(0,0),
Number angle,
Number insideRadius,
Number outsideRadius,
Boolean rotate = false,
})

Example

Example of a ring sector drafted by this macro

Configuration

PropertyDefaultTypeDescription
idringsectorStringThe id to use in auto-generate macro points and paths
centernew Point(0,0)PointThe center point of the ring sector
angleNumberThe angle the ring sector should cover
insideRadiusNumberThe inside radius of the ring sector
outsideRadiusNumberThe outside radius of the ring sector
rotatefalseBooleanWhether or not to rotate the ringsector so one of its sides is vertical (see example below)

Notes

The ringsector macro creates a path that can be used as a seam path for a part. If doing so, the left side of the path assumes a cutOnFold, as the sa is not offset here like it is along the rest of the path.

Example when rotate=true

Example of a ring sector drafted by this macro when rotate is truthy

Points and Paths

The ringsector macro creates the following Points and Paths (with "id" replaced with the value of id in the names). Different Points and Paths are created depending on the value of the rotate property.

When rotate=false

Points when rotate=false

Point NameDescription
points.__macro_ringsector_id_centerCenter of the ring sector arc circles
points.__macro_ringsector_id_ex2FlippedStart of outer arc; Start and end of the path
points.__macro_ringsector_id_ex2cFlippedCurve control point from start to middle of outer arc
points.__macro_ringsector_id_ex1cFlippedCurve control point from middle to start of outer arc
points.__macro_ringsector_id_ex2FlippedRotatedMiddle of outer arc
points.__macro_ringsector_id_ex2cFlippedRotatedCurve control point from middle to end of outer arc
points.__macro_ringsector_id_ex1cFlippedRotatedCurve control point from end to middle of outer arc
points.__macro_ringsector_id_ex1RotatedEnd of outer arc
points.__macro_ringsector_id_in1RotatedStart of inner arc
points.__macro_ringsector_id_in1cFlippedRotatedCurve control point from start to middle of inner arc
points.__macro_ringsector_id_in2cFlippedRotatedCurve control point from middle to start of inner arc
points.__macro_ringsector_id_in2FlippedRotatedMiddle of inner arc
points.__macro_ringsector_id_in1cFlippedCurve control point from middle to end of inner arc
points.__macro_ringsector_id_in2cFlippedCurve control point from end to middle of inner arc
points.__macro_ringsector_id_in2FlippedEnd of inner arc

Paths when rotate=false

Path NameDescription
paths.__macro_ringsector_id_pathThe ring sector path

paths.__macro_ringsector_id_path is constructed in the following manner when rotate=false.

Path paths.__macro_ringsector_id_path = new Path()
.move(points.__macro_ringsector_id_ex2Flipped)
.curve(points.__macro_ringsector_id_ex2cFlipped,
points.__macro_ringsector_id_ex1cFlipped,
points.__macro_ringsector_id_ex2FlippedRotated)
.curve(points.__macro_ringsector_id_ex2cFlippedRotated,
points.__macro_ringsector_id_ex1cFlippedRotated,
points.__macro_ringsector_id_ex1Rotated)
.line(points.__macro_ringsector_id_in1Rotated)
.curve(points.__macro_ringsector_id_in1cFlippedRotated,
points.__macro_ringsector_id_in2cFlippedRotated,
points.__macro_ringsector_id_in2FlippedRotated)
.curve(points.__macro_ringsector_id_in1cFlipped,
points.__macro_ringsector_id_in2cFlipped,
points.__macro_ringsector_id_in2Flipped)
.line(points.__macro_ringsector_id_ex2Flipped)
.close()

ringsector arc points

When rotate=true

Points when rotate=true

Point NameDescription
points.__macro_ringsector_id_centerCenter of the ring sector arc circles
points.__macro_ringsector_id_ex2FlippedStart of outer arc; Start and end of the path
points.__macro_ringsector_id_ex2cFlippedCurve control point from start to middle of outer arc
points.__macro_ringsector_id_ex1cFlippedCurve control point from middle to start of outer arc
points.__macro_ringsector_id_ex1Middle of outer arc
points.__macro_ringsector_id_ex1cCurve control point from middle to end of outer arc
points.__macro_ringsector_id_ex2cCurve control point from end to middle of outer arc
points.__macro_ringsector_id_ex2End of outer arc
points.__macro_ringsector_id_in2Start of inner arc
points.__macro_ringsector_id_in2cCurve control point from start to middle of inner arc
points.__macro_ringsector_id_in1cCurve control point from middle to start of inner arc
points.__macro_ringsector_id_in1Middle of inner arc
points.__macro_ringsector_id_in1cFlippedCurve control point from middle to end of inner arc
points.__macro_ringsector_id_in2cFlippedCurve control point from end to middle of inner arc
points.__macro_ringsector_id_in2FlippedEnd of inner arc

Paths when rotate=true

Path NameDescription
paths.__macro_ringsector_id_pathThe ring sector path

paths.__macro_ringsector_id_path is constructed in the following manner when rotate=true.

Path paths.__macro_ringsector_id_path = new Path()
.move(points.__macro_ringsector_id_ex2Flipped)
.curve(points.__macro_ringsector_id_ex2cFlipped,
points.__macro_ringsector_id_ex1cFlipped,
points.__macro_ringsector_id_ex1)
.curve(points.__macro_ringsector_id_ex1c,
points.__macro_ringsector_id_ex2c,
points.__macro_ringsector_id_ex2)
.line(points.__macro_ringsector_id_in2)
.curve(points.__macro_ringsector_id_in2c,
points.__macro_ringsector_id_in1c,
points.__macro_ringsector_id_in1)
.curve(points.__macro_ringsector_id_in1cFlipped,
points.__macro_ringsector_id_in2cFlipped,
points.__macro_ringsector_id_in2Flipped)
.line(points.__macro_ringsector_id_ex2Flipped)
.close()

ringsector arc points