.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

[VB.NET] Change Polyline vertex order

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
908 Views, 2 Replies

[VB.NET] Change Polyline vertex order

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)

 

sillonJPEG.jpg

 

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.

 

 

2 REPLIES 2
Message 2 of 3
hgasty1001
in reply to: Anonymous

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

 

 

 

 

Message 3 of 3
Anonymous
in reply to: hgasty1001

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.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost