Hello everyone !
For one of my project I'd like to change the vertex order or some polyline ( Random or not ).
To explain :
I'm working with laser and i'm using AutoCad and a custom software i've developped to create a "path file" in g-code for my laser.
I've developped a "drilling" tool for polylines, using the function "GetOffsetCurves". It allow to "duplicate" a shape with a smaller or bigger size.
It problem is that the "first" point of the new polylines is always the same and it create some strange behaviours with the laser (because the start of laser firing is always in the same direction). Some kind of groove (i don't know if it's the right word)
On the image, you can see a "black dot" at every start of my shape. It's the point the laser start to fire. You have to imagine that there's more circles / polyline and much more closer. It create this groove.
What i want to do is to change the start point of my polyline or my circles, to not have that effect.
Is it possible to change the vertex order in .net (not juste reverse it, but randomize it or change it to i+1) ? I'm trying to do this for a while and i can't find a solution 😕
Thanks for your help.
Hello everyone !
For one of my project I'd like to change the vertex order or some polyline ( Random or not ).
To explain :
I'm working with laser and i'm using AutoCad and a custom software i've developped to create a "path file" in g-code for my laser.
I've developped a "drilling" tool for polylines, using the function "GetOffsetCurves". It allow to "duplicate" a shape with a smaller or bigger size.
It problem is that the "first" point of the new polylines is always the same and it create some strange behaviours with the laser (because the start of laser firing is always in the same direction). Some kind of groove (i don't know if it's the right word)
On the image, you can see a "black dot" at every start of my shape. It's the point the laser start to fire. You have to imagine that there's more circles / polyline and much more closer. It create this groove.
What i want to do is to change the start point of my polyline or my circles, to not have that effect.
Is it possible to change the vertex order in .net (not juste reverse it, but randomize it or change it to i+1) ? I'm trying to do this for a while and i can't find a solution 😕
Thanks for your help.
Hi,
I think you need to choose a random start point rather than to randomize the vertex order in you polyline , if so it's very simple, just get a random integer in the range [0,vertex number] and take the point from the vertex array at that index.
Gaston Nunez
Hi,
I think you need to choose a random start point rather than to randomize the vertex order in you polyline , if so it's very simple, just get a random integer in the range [0,vertex number] and take the point from the vertex array at that index.
Gaston Nunez
Hello Gaston,
Thanks for your answer, but I think i badly explained my problem.
What i'd like to do is, when I create my "drilled" polyline (with get offsetcurve), I will obtain a new polyline starting at the same place, and i want to explode my polyline into arc/line then recreate it with a different start. (random start or not)
Do you think it's possible?
Thanks a lot.
Adri Dicri
Hello Gaston,
Thanks for your answer, but I think i badly explained my problem.
What i'd like to do is, when I create my "drilled" polyline (with get offsetcurve), I will obtain a new polyline starting at the same place, and i want to explode my polyline into arc/line then recreate it with a different start. (random start or not)
Do you think it's possible?
Thanks a lot.
Adri Dicri
Can't find what you're looking for? Ask the community or share your knowledge.