Jump to content

Polyline segments as a list

Recommended Posts

Hello there!

Is there any node (or easy way) that returns segments (parts) of polyline from polyline? I mean the situation where a polyline is constructed as a mix of straight segments and arcs. Picture as an example.


I know I can get Edges from "Get 2D Edge" node, but this returns only start-end points, not the actual segment and it fails with arcs.





Link to comment

I am far better in Vectorscript than in Marionette, but I think you will have to roll your own solution.


Get Vertex will get you the location of each vertex.

Is Vertex Type can be used to determine if the vertex is of a certain type

Get Arc Vertex Radius will tell you the radius if the vertex is an arc vertex.


For Bezier, Cubic and Radius type vertices you will need to get the vertices before and after as well as the specific vertex to determine the segment.


In a script I would just walk the poly and make an array with the location, type and radius (if appropriate) of each vertex. I would then use those locations to create new segments using the two or three vertices that define each segment.


In Marionette I would guess that you will have to use some kind of list processing to do the same thing.


Good luck. Ask again if you need more help.

  • Like 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...