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

help for polyline3d

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
409 Views, 3 Replies

help for polyline3d

I need a big pleasure from all.
i have a collection of 3d point and i need to insert a new polyline 3d with
this point.

i have try some solution but i can only insert a 2D polyline.


Some sample or help?
Thank's in advance
GPaolo
3 REPLIES 3
Message 2 of 4
Anonymous
in reply to: Anonymous

Point3dCollection pts = new Point3dCollection();
pts.Add(new Point3d(0, 0, 0));
pts.Add(new Point3d(10, 10, 10));
Polyline3d p3 = new Polyline3d(new Poly3dType(), pts, false);

There are different enums for the Poly3dType. Check the Object
Browser.

"GPaolo" wrote in message
news:5314014@discussion.autodesk.com...
I need a big pleasure from all.
i have a collection of 3d point and i need to insert a new polyline 3d with
this point.

i have try some solution but i can only insert a 2D polyline.


Some sample or help?
Thank's in advance
GPaolo
Message 3 of 4
Anonymous
in reply to: Anonymous

many thank's
i don't have see the more easy solution.

"Paul Richardson" ha scritto nel messaggio
news:5314711@discussion.autodesk.com...
Point3dCollection pts = new Point3dCollection();
pts.Add(new Point3d(0, 0, 0));
pts.Add(new Point3d(10, 10, 10));
Polyline3d p3 = new Polyline3d(new Poly3dType(), pts, false);

There are different enums for the Poly3dType. Check the Object
Browser.

"GPaolo" wrote in message
news:5314014@discussion.autodesk.com...
I need a big pleasure from all.
i have a collection of 3d point and i need to insert a new polyline 3d with
this point.

i have try some solution but i can only insert a 2D polyline.


Some sample or help?
Thank's in advance
GPaolo
Message 4 of 4
Anonymous
in reply to: Anonymous

Sometimes it's too easy to see. 🙂 If your points are in an array or such
just loop through to .add them to the collection.

Point3dCollection pts = new Point3dCollection();
double[] ptsArr = {0, 0, 0, 10, 10, 10, 0, 10, 10};
int i = 0;
while ( i < ptsArr.Length )
{
pts.Add(new Point3d(ptsArr, ptsArr[i + 1], ptsArr[i + 2]));
i = i + 3;
}

"GPaolo" wrote in message
news:5315082@discussion.autodesk.com...
many thank's
i don't have see the more easy solution.

"Paul Richardson" ha scritto nel messaggio
news:5314711@discussion.autodesk.com...
Point3dCollection pts = new Point3dCollection();
pts.Add(new Point3d(0, 0, 0));
pts.Add(new Point3d(10, 10, 10));
Polyline3d p3 = new Polyline3d(new Poly3dType(), pts, false);

There are different enums for the Poly3dType. Check the Object
Browser.

"GPaolo" wrote in message
news:5314014@discussion.autodesk.com...
I need a big pleasure from all.
i have a collection of 3d point and i need to insert a new polyline 3d with
this point.

i have try some solution but i can only insert a 2D polyline.


Some sample or help?
Thank's in advance
GPaolo

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