PDA

View Full Version : Is there really no divide tool able to split polylines? julienne2 works at one axis o



prometheus
01-06-2016, 06:04 PM
Is there really no divide tool able to split polylines? julienne2 works at only one axis at the time.
I think jericsynergy has asked about this in some old thread too.

I am right now working a lot with polylines from the pen tool and polylines created from copied edges.
I think I have tried all cut tools natively, havenīt seen a plugin for it..and no, I do not want senseis bezier divider, I want a tool to split divide edges/polylines directly.

if you select a polyline in polygon mode, you can split it with julienne2 and set divisions, if you are using the right axis and permitted the line is flat along that axis...so why canīt there be a tool to manage to split polylines no matter in what directiona axis they are going?

blender does it:devil::D

Thankful if someone finds a tool for it.

Michael

prometheus
01-06-2016, 06:24 PM
I think I found a workaround solution for it, select all your polylines in polymode, go to setup and convert them to skelegons, seperate polylines from skelegons..and put skelegons in a seperate layer..use the split tool a few times to divide skelegons, run strandmaker on the skelegons, voila..back to polylines divided with the help of skelegons.

johnliebler
01-06-2016, 07:04 PM
That's a clever workaround! I seem to recall a plugin/script hat could do this, but I also seem to recall it was crashy. I'll have a look when I'm in front of Modeler tomorrow.

prometheus
01-06-2016, 08:17 PM
That's a clever workaround! I seem to recall a plugin/script hat could do this, but I also seem to recall it was crashy. I'll have a look when I'm in front of Modeler tomorrow.

yep..might record the process and put up on youtube tomorrow, quite easy to do this if you are familiar with skelegons in modeler and how to work with polylines and strand maker, though it would of course be much faster to just select any polyline edge and hit divide and set divisions, hopefully some coder comes up with such plugin..donīt seem to be impossible.

art
01-07-2016, 08:54 AM
I'm not sure if I understand your need correctly, but have you tried my divide edge plugin? It works with edges and I just noticed that it crashes with nothing selected so it may the plugin that johnliebler is referring to.

johnliebler
01-07-2016, 09:03 AM
OK, I just spent a few minutes wandering through my spotty memory, and found a few things from when I was trying to do this. Spoiler alert: your method is the way to go. I was using a plugin from Art Sphere called Divide Edge
:

https://www.lightwave3d.com/assets/plugins/entry/divide-edge/

There are a couple problems. First, if no edges are selected, it crashes modeler straight away. Second, if you run it on two point polys, it looks like it works, but it actually creates new, multipoint polys in the place of the original two point polys, with the original two point poly as one edge. This was ok for me, because I was using the points for instances, but it won't work for your puposes. Maybe you can get Arthur to modify his plug-in?

Bonus for reading to the end: Sean Moyer has an old script called SHM_Derez which automatically removes polys and leaves two point polys on all of the edges. : https://www.lightwave3d.com/assets/plugins/entry/shm-derez/

johnliebler
01-07-2016, 09:09 AM
OK, that's spooky. :) I was just posting, and when it refreshed, there was art's reply... Anyway, art do you understand the issue I'm describing? If we could get your plugin to remove the original edge, it would be exactly what prometheus is looking for.

art
01-07-2016, 09:13 AM
Interesting catch, johnliebler (John?). I'm guessing I never fully tested my plugin on 2 point polys or maybe I never noticed this anomaly. I'll see if I can make it work as expected and fix the crash while I'm at it.

johnliebler
01-07-2016, 09:25 AM
Thanks Art (or do you prefer Artur?). It's good to meet another Connecticut yankee on these boards. I think Lightwavers are getting pretty thin on the ground around here. :)

Cheers!

John

prometheus
01-07-2016, 09:27 AM
I'm not sure if I understand your need correctly, but have you tried my divide edge plugin? It works with edges and I just noticed that it crashes with nothing selected so it may the plugin that johnliebler is referring to.

yep...I had tried it before I posted this thread..didnīt work, thanks for jumping in, need it to work on copied edges that is pasted back as two point polys, and to work on polylines drawn with the line pen tool.

your plugin yields the result johnliebler is describing, thanks for checking on it anyway Art.

Michael

art
01-07-2016, 10:00 AM
Thanks Art (or do you prefer Artur?). It's good to meet another Connecticut yankee on these boards. I think Lightwavers are getting pretty thin on the ground around here. :)



Art is fine, that's what most people call me at work etc.
I don't recall seeing many people from CT on the forum either. Greetings!


yep...I had tried it before I posted this thread..didnīt work, thanks for jumping in.
Michael
I just thought I'd check. I'll look into this.

JoePoe
01-07-2016, 11:17 AM
I think I found a workaround solution for it, select all your polylines in polymode, go to setup and convert them to skelegons, seperate polylines from skelegons..and put skelegons in a seperate layer..use the split tool a few times to divide skelegons, run strandmaker on the skelegons, voila..back to polylines divided with the help of skelegons.

I've always just:

1) Grabbed all points > e > move > weld.
2) Subdivide (faceted OR smooth :hey:) any # of times > go back to that welded point and expand by result of subdivides > delete.

Another quick and dirty method to add points in certain situations (points really need to be fairly equidistant) is to run Chamfer on 2pt poly chain.

BUT, an interactive plug would be nice :thumbsup:. (cough... too much to ask for ls/lsc??)

Art: Interesting side observation... maybe/maybe not relevant. That same behavior occurs when running Make Pole on a 2pt poly chain.... center point is there, but it's really part of a new flattened trigon on top of the original 2pt-er.

prometheus
01-07-2016, 11:44 AM
I've always just:

1) Grabbed all points > e > move > weld.
2) Subdivide (faceted OR smooth :hey:) any # of times > go back to that welded point and expand by result of subdivides > delete.

Another quick and dirty method to add points in certain situations (points really need to be fairly equidistant) is to run Chamfer on 2pt poly chain.

BUT, an interactive plug would be nice :thumbsup:. (cough... too much to ask for ls/lsc??)

Art: Interesting side observation... maybe/maybe not relevant. That same behavior occurs when running Make Pole on a 2pt poly chain.... center point is there, but it's really part of a new flattened trigon on top of the original 2pt-er.

chamfer isnīt working properly on line pen created polylines, neither on a complete curve converted to polychain.
the 1.2 isnīt doing it for me..I think you would have to record that...but maybe not, I think it must be way easier to convert to skelegons, split skelegons then run strandmaker on it.

yep tried make pole as well, but itīs not doing the job as you could see.

map the command make skelegons(convert skelegons button in modeler) to let say..ctrl-s and it will be a faster workflow, select skelegons in the numeric tab, ctrl-l
for split skelegons, run strandmaker...thatīs the best I can see currently.

Sorry..split skelegons was the wrong shortcut, that is split polygons..whatever shortcut you want is better to set, it is unassigned by default.

art
01-07-2016, 12:03 PM
I've always just:
BUT, an interactive plug would be nice :thumbsup:. (cough... too much to ask for ls/lsc??)

Art: Interesting side observation... maybe/maybe not relevant. That same behavior occurs when running Make Pole on a 2pt poly chain.... center point is there, but it's really part of a new flattened trigon on top of the original 2pt-er.
I know, it's a Mac compatibility issue :) ls/lsc would potentially work on whole polygon(s), but not on individual edges since lscript is not aware of them unless something changed recently in the lscript sdk. BUT... 2 point polychains are polygoney (is that a word?) edges anyway. Lscript version would work for them but you'd have to select them as polygons and not edges.



Regarding your observation, I need to check this but my code probably assumes incorrectly that all polygons are closed, which is clearly not the case with 2 point polys. The plugin "closes" them as a side effect. Make Pole may be doing the same thing.

prometheus
01-07-2016, 12:12 PM
I tend to work with editing polylines in polygon mode mostly..thatīs no big deal to keep in mind when doing that..either selected or in non selected mode, no reason not to..so edges mode mostly when copying from geometry and paste as polylines.

The reason for me wanting this divide tool for polylines, well..I have this thread on the skin modifier in blender, where you can use any polyline in lightwave, I could of course split the polylines in blender manually, or use subdivide..all that works, but it would be helpful to also have it in lightwave when designing branches and other ( skeleton) polyline structures.

itīs in fact not long ago lightwave implemented copya and paste edges, and the line pen tool..which opens up new ways of use them, currently not much more than to use as polychains ..if it had a skin tool like blender, much much more.

so perhaps if the lscript can sort out closed and non closed polylines, and make it work..would be nice, one note...for efficiency, I would need it to work on selected polylines, not just a whole segment that is none selected.(all selected might be the right term) in order to split only where needed.

art
01-07-2016, 05:03 PM
I updated the plugin and it should now correctly divide 2 point polygons. It still expects an edge selection because that's how the original plugin was written and changing it to also work with polygon selections would take me longer. Also it appears that an implicit edge selection (no selection = all edges) is not recognized by the sdk so at least one edge must be selected. I compiled it (win32/64 bit) using lw2015 sdk. It's probably not backwards compatible. I tested it... somewhat... and it appears to work. See attached.

131813

prometheus
01-07-2016, 05:15 PM
I updated the plugin and it should now correctly divide 2 point polygons. It still expects an edge selection because that's how the original plugin was written and changing it to also work with polygon selections would take me longer. Also it appears that an implicit edge selection (no selection = all edges) is not recognized by the sdk so at least one edge must be selected. I compiled it (win32/64 bit) using lw2015 sdk. It's probably not backwards compatible. I tested it... somewhat... and it appears to work. See attached.

131813

Hmm..got error when installing...
131814

art
01-07-2016, 05:34 PM
Hmm, I'm not sure what causes it. I can install/run it fine in my LW 32 bit. Can you try my torus+ plugin (url in my signature) that I also compiled recently using the same sdk setup and let me know if you get the same error? Anyone else has any ideas?

prometheus
01-07-2016, 05:40 PM
Hmm, I'm not sure what causes it. I can install/run it fine in my LW 32 bit. Can you try my torus+ plugin (url in my signature) that I also compiled recently using the same sdk setup and let me know if you get the same error? Anyone else has any ideas?

yep..same happens to that unfortunatly, no idea currently..will have to sleep on it, maybe something new required, though I think I recall something like this before, maybe not with your plugins..but it was a long time ago..might try it on my porbable comp tomorrow as well...or reboot the machine maybe.

most other plugins is working though.

prometheus
01-07-2016, 05:43 PM
I did notice erikals had the same issues with toroid in 32 bit...I do not have lw 2015 in 64 bit installed right now..so that has to wait.

could be that one might need to run it as administrator, but I am busy with some models that I do not want to close for the moment.

prometheus
01-08-2016, 03:24 PM
well..run as administrator has nothing to do with it, I suspectwe who do get the errors...need to update visual C++ libraries?

art
01-08-2016, 08:06 PM
I'm compiling the plugins using MS visual studio to maybe some C++ libraries are referenced, rightly or not. I'll try to ask someone smarter than me.

probiner
01-09-2016, 06:37 AM
well since you are in blender land, just go there and in Edit Mode, subdivide :P

erikals
01-09-2016, 08:47 AM
did you try >


https://www.youtube.com/watch?v=p1aHzsmnrys

jeric_synergy
01-09-2016, 10:31 AM
Decided to play, immediately stymied: Made 4 2pt polys, selected all as Edges using SLICE could slice the first but not the others. Deselected, futzed around a bit w/o any luck, selected #4 and #3, #4 correctly SLICED but #3 in the same operation made a 3pt poly. --it's all very confusing....

What one might hope for is that CUT and it's brethren would operate 'predictably' on both Polys and Edges. Consistency is a great virtue.

prometheus
01-09-2016, 12:03 PM
well since you are in blender land, just go there and in Edit Mode, subdivide :P

I can do that, but there are things I want to create and adjust with lightwave tools, so that is a no no...standing in the borders of the two lands by the way, I do wish to have free movement across the boarders these days :)

and if you think of blender as the tool to split and the send to lightwave?..well, that workflow is slower than using convert to skelegons and split with that directly in lightwave.

In lightwave I feel more comfortable with constructing shapes I want, and have better direct control of points edge,copy and paste edges from geometry etc.. and some deforming tools..that in blender is a bit awkward or simply is missing...in lightwave I can also test dynamics on polychains..so there is a reason I would like this to work in lightwave.

prometheus
01-09-2016, 12:13 PM
did you try >


https://www.youtube.com/watch?v=p1aHzsmnrys

Yes..I mentioned julienne in my first post on it...but that will only work on flat one axis polylines..
"Is there really no divide tool able to split polylines? julienne2 works at only one axis at the time.
I think jericsynergy has asked about this in some old thread too.
"

adding points manually is a bit tedious if you work on more complex shapes, we can not test this on a single flat polyline running at one axis.

same with extruding a bit too messy to use on more complex shapes.


Decided to play, immediately stymied: Made 4 2pt polys, selected all as Edges using SLICE could slice the first but not the others. Deselected, futzed around a bit w/o any luck, selected #4 and #3, #4 correctly SLICED but #3 in the same operation made a 3pt poly. --it's all very confusing....

What one might hope for is that CUT and it's brethren would operate 'predictably' on both Polys and Edges. Consistency is a great virtue.

yep tried slice..but as you noticed, creates unwanted polys and hard to get to slice correctly.

as I mentioned before, try my tip ...map ctrl-s (optional :)) to the command make skelegons (convert to skelegons) that will create skelegons along the polylines, use split to divide it as many times you want, run strandmaker on it, and voila you got your polylines divided in another layer...thats the smoothest workflow Ivé come across so far.

jeric_synergy
01-09-2016, 02:02 PM
A little more on my experience w/SLICE and 2pt polys/Edges:
2nd experiment:
Made 4 2pt polys, once 'by hand', then by making a box, killing the polys and Extending 4 remaining points. So, 4 unconnected 2pt polys.

Select left-most Edge/Poly, as Edge, using SLICE, could add a point in the middle, no extra polys.

After that first action, no combination of selection of Edges would give me a middle point with SLICE. (Additionally, the system cursor came on, effectively obscuring the tiny circle SLICE adds to the line, but that's a different bug.)

While it may be the wrong tool for this task, the inconsistency of SLICE's behaviour is what bugs/concerns me. Even if the workflow is all wrong, like forcing the user to deselect, once you've re-selected other Edges, the tool should act again as it did at first.

I'll report this later, unless someone has a good reason it should work this way.

prometheus
01-09-2016, 04:54 PM
A little more on my experience w/SLICE and 2pt polys/Edges:
2nd experiment:
Made 4 2pt polys, once 'by hand', then by making a box, killing the polys and Extending 4 remaining points. So, 4 unconnected 2pt polys.

Select left-most Edge/Poly, as Edge, using SLICE, could add a point in the middle, no extra polys.





After that first action, no combination of selection of Edges would give me a middle point with SLICE. (Additionally, the system cursor came on, effectively obscuring the tiny circle SLICE adds to the line, but that's a different bug.)

While it may be the wrong tool for this task, the inconsistency of SLICE's behaviour is what bugs/concerns me. Even if the workflow is all wrong, like forcing the user to deselect, once you've re-selected other Edges, the tool should act again as it did at first.

I'll report this later, unless someone has a good reason it should work this way.


using slice..Edited..sorry, hold shift down and click to add cut in middle sections..

However, donīt think slice is designed with polylines in mind.

Hereīs my split polylines with skelegons tip...short vid, and pretty fast to do ..considering, you can select all or dedicated polylines to split as you wish.




https://www.youtube.com/watch?v=AL95UArP7pY

probiner
01-09-2016, 08:19 PM
and if you think of blender as the tool to split and the send to lightwave?..well, that workflow is slower than using convert to skelegons and split with that directly in lightwave.
I know..... Is just strandmaker is a bit dirty for this end. You end up to do either combination of merging or polygons deleting 1pps, etc.

But I get you, it's just... there's no tool in LW to do that and then irrational ways come about.... which is fine for our petit tricks, but set up a lot of traps to workflows that want to grow rationally. Better to request to have suvdivide and split edge, working with 2pps in LW, then ;) Basically 2pp workflow not just be an accident as they are in modeling but something thought by design.

Cheers.

prometheus
01-09-2016, 08:56 PM
I know..... Is just strandmaker is a bit dirty for this end. You end up to do either combination of merging or polygons deleting 1pps, etc.

But I get you, it's just... there's no tool in LW to do that and then irrational ways come about.... which is fine for our petit tricks, but set up a lot of traps to workflows that want to grow rationally. Better to request to have suvdivide and split edge, working with 2pps in LW, then ;) Basically 2pp workflow not just be an accident as they are in modeling but something thought by design.

Cheers.

You must understand that I do not want this skelegon trick to be the solution, yes..better to request better subdiv split to work on edges, but I thought this very threads initial question is about that, besides ..art has made it working appearently, though the plugin seem to have issues with installation due to missing dll, o vizual c++ libraries, letīs hope that getīs sorted out when he get the time perhaps.

Yes...correct, I must have missed that there is remaing 1pps that needs to be manually deleted, no prob if you just take care of selecting and deleting that original selected polygon you are dividing with skelegons, you can do that after splitting the skelegons..but before running strandmaker, wich will make it easier to remove.

when you think in retrospect of edges and polylines, we didnīt have the option to copy and paste edges not long ago, we didnīt have a line pen tool to create polylines etc...so I wouldnīt be surprised if the lw team might introduce more tools for handling it, it may suggest that we really can use polylines and edges for something useful, like drawing straight lines continueously for a drawing schematics for instance, offsetting the polylines to make polygons etc, or use a skin modifier on it as I shown how blender does nicely for some fast creation of limbs branches etc.

jeric_synergy
01-10-2016, 01:15 AM
Since we already have buttons NAMED "Split" ,"Cut" ,"QuickCutN" and "Divide", I'd like them to just be context aware, and perform appropriately when Edges versus Polys are selected.

WHen you've selected EDGES some toss an error, "Cannot cut polys with holes or internal edges". Add a mode detector (and a whole different functional code) and they could become useful.

I recall some other function, can't remember which, which failed on 2pt polys, like the devs had never thought to test them at all. Very silly.

Training would be easier too.

art
01-11-2016, 06:09 AM
... though the plugin seem to have issues with installation due to missing dll, o vizual c++ libraries...
I tried to send you a private message but your mailbox appears to be full. I don't want to pollute this thread too much. Anyway, I recompiled the plugin using different options. Let me know it this one works for you.
www.artssphere.com/awDivideEdge32.zip
I can't replicate/test this error on my computer(s). Apparently I already have all the c++ distributable libraries installed as part of visual studio.

prometheus
01-11-2016, 09:00 AM
I tried to send you a private message but your mailbox appears to be full. I don't want to pollute this thread too much. Anyway, I recompiled the plugin using different options. Let me know it this one works for you.
www.artssphere.com/awDivideEdge32.zip
I can't replicate/test this error on my computer(s). Apparently I already have all the c++ distributable libraries installed as part of visual studio.

strange..usually One does get a warning about it being full, nothing at all in my mailbox..will clean it.

now it works to install..and it works nicely to divide..as long as you use the edge mode, and if you select several segments..like four segments and then choose to divide in 10 divisions, that will be 4x10 ...dividing all segments each with 10 division.
It works on polys created with the line pen, and copied edges, and converted spline curve made to polychains...but remember to use it when selected in edge mode.

Many thanks art:thumbsup:
..and you are definitely not polluting this thread...as the king in LOTR said to the hobbits...you bow to no one :)

I will have you in mind when I get the chance to donate, not just for this.. but also for others of your plugins, like bezier bridge etc ...not right now, but it will come.