Synopsis
The sub curve is used to trim a base curve from an input start point to an end point. The start and end points can be determined from inputting the distances along the base curve to the start and end points, respectively. If the start and end points are not exactly on the curve, the point on the base curve nearest to the input points will be used.
Mixins
CurveMixin
InkStrokedMixin
BasePart
Canonicals
| Name |
Type |
Description |
| point1 |
point |
Point on the base curve at the start of the trim. |
| point2 |
point |
Point on the base curve at the end of the trim. |
Parameters
| Name |
Type |
Description |
| curve |
part |
Required. Base curve part used for trimming. |
| distance1 |
number |
Distance along the base curve from the start point of the base curve to the start of the new subCurve. |
| distance2 |
number |
Distance along the base curve from the start point of the base curve to the end of the new subCurve. |
| reverse? |
boolean |
If True, reverses the direction of the result. The default value is False. |
Example 1
| Name: |
SubCurve_Ex01
|
| Design: |
Curves AcDrawingDocument
|
| Child Name: |
curve
|
| Child Design: |
:SplineCurve
|
|
Name
|
Type
|
Supplied
|
| pointList |
list |
{Point(0, 0, 0), Point(2, 2, 0), Point(1, 0, 0), Point(3, 1, 0)} |
| linePattern |
string |
"Dotted" |
| color |
string |
"olive green" |
| Child Name: |
subCurve
|
| Child Design: |
:subCurve
|
|
Name
|
Type
|
Supplied
|
| curve |
part |
curve |
| point1 |
point |
curve.pointAtLength(1) |
| point2 |
point |
curve.pointAtLength(curve.length - 1) |
| lineWidth |
string |
"Heavy" |
| color |
string |
"blue" |
Example 2
| Name: |
SubCurve_Ex02
|
| Design: |
Curves AcDrawingDocument
|
|
Name
|
Type
|
Formula
|
| nSegs |
integer |
5 |
| Child Name: |
outerArc
|
| Child Design: |
:Arc
|
|
Name
|
Type
|
Supplied
|
| radius |
number |
5 |
| render? |
boolean |
false |
| Child Name: |
standardArc
|
| Child Design: |
:Arc
|
|
Name
|
Type
|
Supplied
|
| radius |
number |
4 |
| render? |
boolean |
false |
| Child Name: |
innerArc
|
| Child Design: |
:Arc
|
|
Name
|
Type
|
Supplied
|
| radius |
number |
2 |
| render? |
boolean |
false |
| Child Name: |
subArc
|
| Child Design: |
:subCurve
|
Child List? |
|
Name
|
Type
|
Supplied
|
| curve |
part |
(If (Child.index = 2) Then innerArc Else (If (mod(Child.index, 2) > 0) Then outerArc Else standardArc)) |
| distance1 |
number |
Child.curve.length / length(subArc) * (Child.index - 1) |
| distance2 |
number |
(Child.curve.length - 0.001) / length(subArc) * Child.index |
| color |
string |
(If (Child.index = 2) Then "navy blue" Else (If (mod(Child.index, 2) > 0) Then "blue" Else "blue green")) |
| Quantity |
integer |
nSegs * 2 |
| Child Name: |
spoke
|
| Child Design: |
:Line
|
Child List? |
|
Name
|
Type
|
Supplied
|
| thruPoint1 |
point |
(If (Child.index = 1) Then ref(Last(subArc), "endPoint:") Else ref(nth(Child.index - 1, subArc), "endPoint:")) |
| thruPoint2 |
point |
ref(nth(Child.index, subArc), "startPoint:") |
| color |
string |
"olive green" |
| Quantity |
integer |
nSegs * 2 |