Jump to content
Sign in to follow this  
jeandm

Cubic vertex mode polyline

Recommended Posts

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!

Share this post


Link to post

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 by Alan Woodwell

Share this post


Link to post

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!

Share this post


Link to post

Alan,

Do you have any idea why this node returns n polylines if you modify n vertices and not only one polyline?

Thanks

Edited by jeandm

Share this post


Link to post

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

Share this post


Link to post

Not sure what you mean here the result is one closed polyline with 4 vertices.

Edited by Alan Woodwell

Share this post


Link to post

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

Share this post


Link to post

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?

Share this post


Link to post

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.

Share this post


Link to post

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.

Share this post


Link to post

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.

Share this post


Link to post

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!

Share this post


Link to post

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.

Share this post


Link to post

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.

Guest
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.

Sign in to follow this  

 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×
×
  • Create New...