Jump to content
Sign in to follow this  
Pi_

3d-path PIO: orientation of profile in createcustomObjectPath

Recommended Posts

Hi all,

I want to create a 3d-path PIO that draws steel-profiles. The tools VW delivers are 2d tools with an 'incline' option. With this tools I can't snap in 3d to connect all the steel members.

This is the first time I am writing a 3d-path PIO and I can not get the 'orientation along the axis' in a proper way.

When I use createcustomObjectPath or ExtrudeAlongPath or CreateExtrudeAlongPath the 'orientation along the axis' depends on the orientation of the axis. I can change it by rotating the profile-curve but I don't know by what angles...

I tried to get the orientation of (the first segment) of my 3d-path PIO by 'Get3DOrientation' but this doesn't seem to work.

any suggestions?

Share this post


Link to post

thanks for the reply Wouter,

I tried everything, the vector functions give mostly 2d information or 1 angle to the x-vector. I didn't succeed in finding the wright angle to rotate the profile before extrusion.

Some commands in vectorscript use 3 angles (Set3DRot / GetWorkingPlane / SetWorkingPlane). I don't know what they stand for or how to use them.

For now I solved it by first rotating the axis parallel with the x-axis, then extruding, then rotating the extrusion back...

I would be nice if I was able to controle the extrude along path function so I can extrude a profile over multiple segments and keep the profile horizontal constrained

Share this post


Link to post

I see.

I've also got a 3d path object and sometimes the path is rotated around itself somehow, I think it also depends from what view the path is created, havn't found a solution for it yet.

Share this post


Link to post

If the 3D object is straight why not just use a simple extrude?

The extrude along path will not behave as expected if you don't follow certain rules.

1. The profile must be a group object even for one profile

2. The path must be a nurbs curve and sometimes it does not like having only two points

All of which seems more complex when you only need a two point extrude. After it is created then you can rotate and move it where needed

Share this post


Link to post

thanks for the answers,

making a straight extrude and then orient in 3d is a good idea, that is why I want to understand the XYZrot of the vectorscript commands (Set3DRot / GetWorkingPlane / SetWorkingPlane).

Set3DRot(h, xAngle, yAngle, zAngle, xDistance, yDistance, zDistance)

what is x/y/zAngle? A 3d-point is defined with 2 angles (spherical coordinates) so it is something else? is it a vector?

I know you can get the xyzAngle with Get3DOrientation but this doesn't work for a 3dpoly. How can I easily get the xyzAngle of my axis?

In my script I read all the points in a dynarray of point3d, I also make a dynarray of vector. Now I want to make a straight extrude (easy) and then orient the extrude along the first vector in my array.(no succes so far)

I could make arrays of spherical coordinates, but I have the feeling it is allready in the vectorscript commands, that I just don't understand it...

Share this post


Link to post

PROCEDURE Set3DRot(

h :HANDLE;

xAngle :REAL;

yAngle :REAL;

zAngle :REAL;

xDistance :REAL)Coordinate); yDistance:REAL (Coordinate); zDistance:REAL (Coordinate));

The angles are rotations about the x,y,z axes at point (xDistance, yDistance, zDistance). Assuming that you create an I-beam vertical extrude at (0,0,0) on the x-y (top) plane and the web along the y-axis, and you want to rotate it so it is horizontal along the x-axis.

First, you need a 90 degree rotation about the z-axis, which is defined as the axis perpendicular to the x-y (top) plane, to align it along the x-axis. Second, you need a 90 degree rotation about y-axis to bring it down from vertical to a horizontal orientation. So in one step, the function will be written as:

Set3DRot(h,#0d,#90d,#90d,0,0,0);

Share this post


Link to post

thanks Miguel,

I got the orientation controled now, chamfering works also (intersectsolid). Next is extruding a symbol containing the loftprofile and adding IFC label.

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...