Samuel Derenboim Posted September 27, 2016 Share Posted September 27, 2016 (edited) 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 September 27, 2016 by Samuel Derenboim Quote Link to comment
Vectorworks, Inc Employee PVA - Admin Posted September 27, 2016 Vectorworks, Inc Employee Share Posted September 27, 2016 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. 1 Quote Link to comment
Marionette Maven Marissa Farrell Posted September 27, 2016 Marionette Maven Share Posted September 27, 2016 If Jim's method fails, Marionette can surely help! I can write something up when I get into the office this morning 1 Quote Link to comment
Marionette Maven Marissa Farrell Posted September 27, 2016 Marionette Maven Share Posted September 27, 2016 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 4 Quote Link to comment
Samuel Derenboim Posted September 27, 2016 Author Share Posted September 27, 2016 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? Quote Link to comment
Marionette Maven Marissa Farrell Posted September 27, 2016 Marionette Maven Share Posted September 27, 2016 The Divide Curve node ships with our default content. It's located in the Marionette Content under Objects > NURBS > Operations - NURBS. 1 Quote Link to comment
Vectorworks, Inc Employee PVA - Admin Posted September 27, 2016 Vectorworks, Inc Employee Share Posted September 27, 2016 She's good. 1 Quote Link to comment
Samuel Derenboim Posted September 27, 2016 Author Share Posted September 27, 2016 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? Quote Link to comment
Marionette Maven Marissa Farrell Posted September 27, 2016 Marionette Maven Share Posted September 27, 2016 Here's a network that may be similar to what you're looking for. This one will divide the line by a dimension length, but there will be rounding involved, so the lengths may not be 100% accurate. MarionetteDivideCurveByLength_MFarrell.vwx Quote Link to comment
Wouter van Boekel Posted January 5, 2018 Share Posted January 5, 2018 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 Quote Link to comment
Benson Shaw Posted January 6, 2018 Share Posted January 6, 2018 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 Quote Link to comment
Tshwayder Posted October 20, 2020 Share Posted October 20, 2020 How do you use the Marionette that Marissa made? I downloaded it and tried to use it with a poly line. Seems to only run with the curve that came with it. Can I use it on my own poly line or would that take customized programming? Quote Link to comment
line-weight Posted October 12, 2021 Share Posted October 12, 2021 On 9/27/2016 at 1:45 PM, Marissa Farrell said: 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 189.92 kB · 185 downloads Hello @Marissa Farrell I have made much use of this script in the past... and am just trying to use it again now, in VW2021. I'd previously used it in VW2018 and all worked excellently but something is going wrong in VW2021 and it is leaving me with a 3d polygon that seems to have infinite or very large dimensions. Any clue what might be happening? I tried opening the marionette file that I previously had saved as VW2018 version, into 2021 and re-adding the command to the menu. I notice that if I open the file linked at the top of this thread straight into 2021, the "wrapper" object doesn't appear. Quote Link to comment
Marionette Maven Marissa Farrell Posted October 13, 2021 Marionette Maven Share Posted October 13, 2021 @line-weight I'm not seeing a wrapper in the original file that I shared, and I am also seeing that it behaves identically in 2022 to 2018, so I assume it also works correctly in 2021. Can you give me more information as to what you're encountering? Possibly share a file, either here or by direct message? More than happy to help you solve this issue! Quote Link to comment
line-weight Posted October 13, 2021 Share Posted October 13, 2021 14 minutes ago, Marissa Farrell said: @line-weight I'm not seeing a wrapper in the original file that I shared, and I am also seeing that it behaves identically in 2022 to 2018, so I assume it also works correctly in 2021. Can you give me more information as to what you're encountering? Possibly share a file, either here or by direct message? More than happy to help you solve this issue! Thanks for the response! Hmm... I wonder if I added the wrapper myself, so that I could add it as a menu command. If I did, I don't remember exactly what I did, and it's very likely that I did something wrong because I'm not any kind of Marionette expert at all. I've attached the file I've got (including version with wrapper) with this message. MarionetteDivideCurve_MFarrell.vwx Quote Link to comment
line-weight Posted October 28, 2021 Share Posted October 28, 2021 Hi @Marissa Farrell Did you get a chance to look at this yet? 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.