LineMixin

Synopsis

This design contains all the positioning and sizing rules for describing a line, but does not contain any geometry.

Mixins

LineMixinModifier

Canonicals

Name Type Description
p0 point Start point of the line.
v0 vector Direction vector of the line.
u0 number Curve parameter at the start of the line. By default, its value is 0.0.
u1 number Curve parameter at the line end point . By default, this is the length of the line.
defaultEnd number Default end parameter of the line. This is usually the length of the line.

Parameters

Name Type Description
alignment integer Aligns the line to one of the reference axes. 1 is alignment along the X axis, 2 is for the Y axis, and 3 is for the Z axis, respectively
angle number The angle in degrees from the reference X axis. Used to orient the line.
baseAxis part This is the part used as a reference for specifying the angle. The baseAxis.localFrame Z axis is used to measure the angle input
dirVector vector Direction of the line from the start to end point .
distance number Distance from the origin of the offsetFrom part .
length number Length of the line.
offsetFrom part A line from which to offset this line.
onRight1 boolean If the line is constrained by being tangent to two arcs, this parameter is used to determine the location of the line. An imaginary line is constructed from the center of tanArc1 to the center of tanArc2. This parameter should be True if the new line is to the right side of the imaginary line at the tanArc1 start, otherwise it should be False .
onRight2 boolean If the line is constrained by being tangent to two arcs, this parameter is used to determine the location of the line. An imaginary line is constructed from the center of tanArc1 to the center of tanArc2. This parameter should be True if the new line is to the right side of the imaginary line at the tanArc2 end, otherwise it should be False .
parallelTo part A line that this line should copy its orientation from.
perpendicularTo part A line that this line should use to orient itself perpendicular to.
Start number Curve parameter at the start of the line. Changing this number from the default of 0 will change the start point of the line.
End_ number Parameter at the end of the line.
tanArc1 part The arc part that this line should be tangent to at Start. The parameter onRight1 has to be used to fully constrain the line
tanArc2 part The arc part that this line should be tangent to at End_. The parameter onRight2 has to be used to fully constrain the line.
thruPoint1 point The first point that the line should pass through. This point does not have to coincide with the start point of the line if the curve parameter Start has been modified.
thruPoint2 point The second point that the line should pass through. This point does not have to coincide with the end point if the curve parameter End_ has been modified.

Rules

Name Type Description
startPoint point Point at the line's start. Calculated from p0+(u0*v0).
endPoint point Point at the line's end. Calculated from p0+(u1*v0).
midPoint point Midpoint of the line.
polygonPoints list A list of two points , the startPoint and endPoint, calculated from {startPoint, endPoint}.

Methods

curveParamNearPoint( p As Point ) As Number 
Returns the curve parameter nearest the input point .
pointForParam( param As Number) As Point 
Returns the point on the line with the given input parameter.

Group Rules

<length> Sets the curve parameters u0 and u1 to be 0.0 and length respectively.

<End_ length> Sets the start and end curve parameters given the end curve parameter and the length.

<Start length> Sets the start and end curve parameters given the start curve parameter and the length.

<End_ > Sets the End_ parameter of the line.

<Start> Sets the Start parameter of the line.

<onRight1 onRight2 tanArc1 tanArc2> Specifies a line between two arcs that it is tangent to. The onRight1 and onRight2 parameters are used to determine in which of the four possible positions to orient the line. An imaginary line is created between the center of tanArc1 and tanArc2. OnRight1 tells if the line starts at the tangent point on the arc that is to the right of this imaginary line. Similarly, onRight2 tells if the line ends at the tangent point on the arc that is to the right of this imaginary line.

<onRight1 tanArc1 thruPoint1> Specifies a line passing through one point and tangent to an arc.

<angle baseAxis thruPoint1> Specifies a line through a point at an angle to baseAxis. The entity used for baseAxis must handle the line protocol.

<angle thruPoint1> Specifies a line through a point at an angle to the X axis of the localFrame.

<alignment thruPoint1> Specifies a line aligned with an orthogonal axis of the localFrame. The value for alignment is a coded integer , where 1 indicates the X axis, 2 indicates the Y axis, and 3 indicates the Z axis.

<offsetFrom distance onRight1> Specifies a line offsetFrom another line at a given distance.

<parallelTo thruPoint1> Specifies a line through a point and parallel to another entity. The parallelTo part must handle the line protocol.

<dirVector thruPoint1> Specifies a line through a point and aligned with a vector .

<thruPoint1 thruPoint2> Specifies a line through two points .

<thruPoint1 perpendicularTo> Specifies a line through a point and perpendicular to another entity. The perpendicularTo part must handle the line or arc protocols.

Example 1

Name : lineMixin_Ex01
Design : acDrawingDocument LineMixin BooleanSolid
Name Type Formula
radius number 2
thickness number 0.1 * radius
operation name :Difference
components list {outerCylinder, innerCylinder}
renderNode? boolean True
Child Name : outerCylinder
Child Design : :Cylinder
Name Type Supplied
radius number radius
bottomPoint point startPoint
topPoint point endPoint
showInModelBrowser? boolean False
Child Name : innerCylinder
Child Design : :Cylinder
Name Type Supplied
radius number radius - thickness
bottomPoint point startPoint
topPoint point endPoint
showInModelBrowser? boolean False
Child Name : Line
Child Design : :Line
Name Type Supplied
thruPoint1 point startPoint
thruPoint2 point endPoint
linePattern string "dotted"
Color string "red"

Example 2

Name : lineMixin_Ex02
Design : acDrawingDocument
Child Name : pipe_1
Child Design : :lineMixin_Ex01
Name Type Supplied
radius number 6
thruPoint1 point Point(0, 0, 0)
thruPoint2 point Point(0, 1, 0)
Color string "blue"
Child Name : pipe_2
Child Design : :lineMixin_Ex01
Name Type Supplied
radius number pipe_1.radius
thruPoint1 point pipe_1.endPoint
dirVector vector pipe_1.dirVector
length number 2
Color string "jungle green"
Child Name : pipe_3
Child Design : :lineMixin_Ex01
Name Type Supplied
radius number 4
thickness number 2
thruPoint1 point pipe_1.startPoint
thruPoint2 point pipe_2.endPoint
Color string "dandelion"