.NET

Reply
*GPaolo
Message 1 of 4 (234 Views)

help for polyline3d

234 Views, 3 Replies
08-31-2006 08:11 AM
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
*Paul Richardson
Message 2 of 4 (234 Views)

Re: help for polyline3d

08-31-2006 02:35 PM in reply to: *GPaolo
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
*GPaolo
Message 3 of 4 (234 Views)

Re: help for polyline3d

08-31-2006 10:50 PM in reply to: *GPaolo
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
*Paul Richardson
Message 4 of 4 (234 Views)

Re: help for polyline3d

09-01-2006 02:54 AM in reply to: *GPaolo
Sometimes it's too easy to see. :smileyhappy: 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
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.