Jump to content
Samuel Derenboim

divide polyline into segments

Recommended Posts

is there an easy, fast way to divide a polyline into segments? i.e. lets say you have a polyline with curves - segment it by distance or number of points that convert it into a segmented polyline made up of straight lines? This would be incredibly useful for making clean nurbs lines that can be lofted with an equal number of segments. (currently I need this for recreating a ceiling from a point cloud object/file)

Edited by Samuel Derenboim

Share this post


Link to post

I think Even Divide can do this, but it may be restricted by object type:

 

http://app-help.vectorworks.net/2017/eng/index.htm#t=VW2017_Guide%2FObjects_edit2%2FDividing_Objects_Evenly.htm&rhsearch=Even divide&rhhlterm=Even divide&rhsyns=

 

If that fails, you could also duplicate a loci along the polyline as a path the desired number of times and then use the Split tool on each loci snap, but that would depend on how complex the shape you were working with was.

  • Like 1

Share this post


Link to post

Here's the Marionette script.

Currently, if you name the poly you want to divide up 'test' and run the script, it will cut it up into as many segments as the 'int' node specifies in the Object Info Palette  equally by length.

In order to use the resulting poly, you can just ungroup the result object to detach it from the Marionette network.

 

Also, if you want your result to be a NURBS curve at the end, you can simply add a 'Convert to NURBS' node to the result of the Polygon 3D node. (I recommend unchecking the "Keep Original Object" checkbox in the Object Info Palette with the 'Convert to NURBS' node selected, just to keep your drawing clean.)

 

MarionetteDivideCurve_MFarrell.vwx

  • Like 2

Share this post


Link to post

Marissa, Thank you so much, that looks awesome!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

That looks exactly what i wanted to do !

 

Jim, your method only works with lines and arcs, Marissa made it possible with any polyline!

 

Marissa, did you code the divide curve tool? or does it come standard inside vw?

Share this post


Link to post

The Divide Curve node ships with our default content.

 

It's located in the Marionette Content under Objects > NURBS > Operations - NURBS.

  • Like 1

Share this post


Link to post

Hahaha, both of you are great. Thank you both for your insight in this matter. :)

 

After playing around a bit, i notice that can't do the same if i set the input parameter to a dimension function.  Maybe I'm doing something wrong?

Share this post


Link to post

Hi all,

 

I am still wondering: is it possible with Marionette to refer to a segment of a NURBS curve or a polyline without converting it to a segmentized NURBS? My goal is to have a 2D grid with curved lines (either NURBS curve or 2D-poly) and I want to offset only parts of a polyline. Say I have a curved line with a length of 200 meter, and I want to offset the segment between 50 and 125 meter. I am wondering, Is there a way to do this without segmentizing the original? Wouter

Share this post


Link to post

I know this is low tech - but it can work:

Duplicate in place the original curve(s). Isolate the dupes - eg Group it or move to a new layer. Apply the segment command to the duplicates. Offset any segments as needed. Class or or color or otherwise isolate the offsets.  If no longer needed, delete the duplicates.

 

-B

 

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

 

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.

×