LineSegments design offers an efficient way to model many line segments. Unlike a Polyline, these segments are independent of each other. This is useful for drawing formats, title blocks, and tabular data. In model space, can be used to efficiently create grid lines.
Parameter Rules
segments: | Array of segments, each being an array of two Points. [ [p0, p1], [p2,p3] ] |
Example: | return[ [p(0,1,0), p(0.75,1,0)], |
[p(0,1.25,0), p(0.75,1.25,0)], |
[p(0,1,0), p(0,1.25,0)], |
[p(0.75,1,0), p(0.75,1.25,0)], |
[p(0.25,1,0), p(0.25,1.25,0)], |
[p(0.25,1.125,0), p(.75,1.125,0)] ]; |
Mixins
ArcRenderMixin
BaseAssembly
RULE NAME |
TYPE |
DEFAULTS |
CATEGORY |
FLAGS |
---|---|---|---|---|
segments |
array |
[] |
Inputs |
Cached |
Project Example:
In your kBridge Examples Projects folder, open the project called ‘Geometry Examples’.
Reference Location:
'world.geometry_examples.linesegmenttest.linesegments'
Link: https://knowledgebridge.engineer/projects
Open the Geometry Examples project.
If you look at the Geometry Examples design you will see in the LineSegments design these parameter settings:
segments: | return[ [p(0,1,0), p(0.75,1,0)], |
[p(0,1.25,0), p(0.75,1.25,0)], |
[p(0,1,0), p(0,1.25,0)], |
[p(0.75,1,0), p(0.75,1.25,0)], |
[p(0.25,1,0), p(0.25,1.25,0)], |
[p(0.25,1.125,0), p(.75,1.125,0)] ]; |
position: | var x = 4; |
return { origin: p(x, 0, 0, this.parent.transform ) }; |
Note: | The segments can be relocated by changing its position. |