Grzegorz Krzemien Posted March 18, 2020 Share Posted March 18, 2020 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. Quote Link to comment
Pat Stanford Posted March 19, 2020 Share Posted March 19, 2020 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. 1 Quote Link to comment
Grzegorz Krzemien Posted March 20, 2020 Author Share Posted March 20, 2020 Thanks for tips. Quote Link to comment
Recommended Posts
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.