jeandm Posted April 29, 2016 Share Posted April 29, 2016 Hello, I am trying to figure out a way to output a 2D polyline from a list of 2D points. I do not want to use the Bezier vertex mode or have to add vertices to my list. I want it to be interpolated as a cubic curve directly from the list. The curve needs to be closed or not. Similar to the polyline tool (see image) Any idea? Thanks! Quote Link to comment
AlanW Posted April 29, 2016 Share Posted April 29, 2016 (edited) Hi, See attached. The change vertex mode gives you the option to use each of the corner bend types. If you have a long list of vertex's put them in a word document then cut and paste into node, that way its easier to see. the node line is small and hard to see. HTH Edited April 29, 2016 by Alan Woodwell Quote Link to comment
jeandm Posted April 29, 2016 Author Share Posted April 29, 2016 Thanks Alan, How is that working when you have thousands of these curves? Because I cannot go back and forth in Word... Thank you for your help! Quote Link to comment
jeandm Posted April 30, 2016 Author Share Posted April 30, 2016 (edited) Alan, Do you have any idea why this node returns n polylines if you modify n vertices and not only one polyline? Thanks Edited April 30, 2016 by jeandm Quote Link to comment
AlanW Posted April 30, 2016 Share Posted April 30, 2016 If you are drawing a shape and use either an object or by control geometry you can change all the vertices at once to the same radius or alternate vertex. Have to think a bit more if you need to change some and not others, I think if you are drawing a shape and you want certain to be curved and not others it may be easier to do it first as control geometry or an object. Others may have a better idea. Will think on it. HTH Quote Link to comment
AlanW Posted April 30, 2016 Share Posted April 30, 2016 (edited) Not sure what you mean here the result is one closed polyline with 4 vertices. Edited April 30, 2016 by Alan Woodwell Quote Link to comment
the frog Posted April 30, 2016 Share Posted April 30, 2016 Hello you can do the polygone with points from a list. I did it for the "Marionette customizable baluster" and in the answer to Marissa's "Marionette Piano Key Layout". You can find them in the ressource share forum. Hope this helps Quote Link to comment
jeandm Posted April 30, 2016 Author Share Posted April 30, 2016 Alan, Thank you for your help. Yes, the output geometry is one polyline, but if you look in debug mode there are as many objects in there as the number of vertices you modified. In your example, 11 and 21, respectively. So when I am running 100 polylines at once in there and modifying 100s of vertices at onces, the data flow gets a bit out of control.. Do you see what I mean? Quote Link to comment
AlanW Posted April 30, 2016 Share Posted April 30, 2016 I think I see it and if my understanding of the way the computer program works it does one step at a time looping through the network as many times to complete the task. It could be 1 million times but it all happens in a nano sec. This would be considered a simple task compared to what they are doing generally. I still cant fathom how all this happens in a small chip. Quote Link to comment
jeandm Posted May 2, 2016 Author Share Posted May 2, 2016 Agreed, yet it should output a list of 1 polyline... not a list with as many polyline as the number of vertices it modified. The node has a data flow issue. Quote Link to comment
Marionette Maven Marissa Farrell Posted May 2, 2016 Marionette Maven Share Posted May 2, 2016 The issue here is that you have 21 inputs going into the Change Vertex Type node, which repeats that script 21 times. Technically, all of those outputs from the node are still the same Poly. (You're still only modifying the same poly.) One way you could handle this for now would be to use the "Get Item" node from the data flow nodes, using the list output from "Change Vertex Type" and an index of 0. I'll try to figure out a better logic for the "Change Vertex Type" to only output the number of polys input to it, rather than the length of the list of vertices. I'll post the revision here once it's done. Quote Link to comment
jeandm Posted May 2, 2016 Author Share Posted May 2, 2016 Hi Marissa, Thank you for your reply. Yes, that makes sense, it is pretty often that you would want to modify large lists of points and multiple poly at once though. So having the possibility to input as many lists of points as the number of polygons would be very useful. Thanks! Quote Link to comment
Vectorworks, Inc Employee SBarrettWalker Posted May 2, 2016 Vectorworks, Inc Employee Share Posted May 2, 2016 Hello, I recently came across this problem as well and modified the Change Vertex Node accordingly. It is a symbol in the attached file as well as being used in a few definitions. Quote Link to comment
jeandm Posted May 2, 2016 Author Share Posted May 2, 2016 Thank you! That's great! 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.