Pi_ Posted May 23, 2014 Share Posted May 23, 2014 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? Quote Link to comment
Hippocode Posted May 23, 2014 Share Posted May 23, 2014 You can calculate it all with vectors. Create a directionvector from v1 to v2 and use the available vector functions to get the requested angles. http://www.vectorlab.info/index.php?title=About_Math_in_Vectorscript Quote Link to comment
Pi_ Posted May 23, 2014 Author Share Posted May 23, 2014 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 Quote Link to comment
Hippocode Posted May 23, 2014 Share Posted May 23, 2014 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. Quote Link to comment
Miguel Barrera Posted May 25, 2014 Share Posted May 25, 2014 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 Quote Link to comment
Pi_ Posted May 26, 2014 Author Share Posted May 26, 2014 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... Quote Link to comment
Miguel Barrera Posted May 28, 2014 Share Posted May 28, 2014 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); Quote Link to comment
Pi_ Posted June 2, 2014 Author Share Posted June 2, 2014 thanks Miguel, I got the orientation controled now, chamfering works also (intersectsolid). Next is extruding a symbol containing the loftprofile and adding IFC label. Quote Link to comment
Recommended Posts
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.