Jump to content
Sign in to follow this  
propstuff

Length of linear 3D polys?

Recommended Posts

I have received a model consisting of a bazillion linear (2 vertex) 3D polys.

I want to find the length of some of them, but none of the Engineering or 3D properties tools will yield their length.

Would anyone have a script which would return the true length of a 3D poly?

TIA,

N.

Share this post


Link to post

Nicholas,

???Here is a short script that will return the length of one 2-vertex 3D Poly. Of course, a favorite program of mine will do the same and a whole lot more. ;-)

???If you are looking for the length of all selected Polys, that's easy, too.

PROCEDURE Length3DLine;
VAR
P0, P1 :Vector;
BEGIN
GetPolyPt3D(FSActLayer, 0, P0.x, P0.y, P0.z);
GetPolyPt3D(FSActLayer, 1, P1.x, P1.y, P1.z);
Message(Norm(P1-P0));	{ Length of vector between 2 points }
END;
Run(Length3DLine);

Happy New Year,

Raymond

Share this post


Link to post
Nicholas,

? Of course, a favorite program of mine will do the same and a whole lot more. ;-)

Would that program start with "Re" and end with "er"? :-)

Thanks Raymond, thats a big help.

cheers,

N.

Share this post


Link to post
Would that program start with "Re" and end with "er"? :-)
It might. :whistle:

You're welcome.

Raymond

Share this post


Link to post

Very elegant, Raymond!

Ahh, the ?easy?:

One has to have a REAL variable to store the accumulated lengths, adding each to it.

3D-polys with 3 or more vertices are easy, too? Now pay attention, single-oh-integer: the vertex index starts from zero.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×
×
  • Create New...