Hippocode Posted June 30, 2014 Share Posted June 30, 2014 (edited) Hi, I've been struggling with this issue for a while. I have a 3D path based object that extrudes a circle / rectangle. If each vertex has the same Z-value the extrude is fine. From the moment I have +2 vertexes, where one of them has a different Z-value the extrude rotates 90 degrees. If I have only 2 vertexes with elevation the extrude is some random degree as shown in the image. EDIT: I seem to have it too when there is no elevation between the vertexes, but rarely. This is the code used for the extrude: IF pType='ROND' THEN Oval(-D1/2,D1/2,D1/2,-D1/2) ELSE Rect(-D1/2,D2/2,D1/2,-D2/2); Hd3D:=F_ExtrudeAlongPath(path3DHd,D1,D2,LNewObj,pType,ObjClass3D); F_ExtrudeAlongPath function FUNCTION F_ExtrudeAlongPath(F_PathHd :HANDLE; F_Width,F_Height :REAL; ExtrudeHd :HANDLE; F_Shape,F_Class :STRING):HANDLE; VAR F_NurbsHd :HANDLE; bStart, bLinear :BOOLEAN; ExtendDistance :REAL; Thickness :REAL; h1,h2,SubstractHd :HANDLE; BEGIN F_NurbsHd:=F_ConvertPathToNURBS(F_PathHd,FALSE,1); IF F_Class <> '' THEN SetClass(ExtrudeHd,F_Class); begingroup; F_NurbsHd:=CreateExtrudeAlongPath(F_NurbsHd,ExtrudeHd); endgroup; delobject(ExtrudeHd); F_ExtrudeAlongPath:=F_NurbsHd; END; I don't really see anything wrong codewise. Is it possible that when creating a nurbs the path can rotate along itself ? Is there a funtion that gives that rotation ? Edited June 30, 2014 by hippothamus Quote Link to comment
Pi_ Posted July 3, 2014 Share Posted July 3, 2014 I had the same problem with a 3d polyline tool that creates an extrude https://techboard.vectorworks.net/ubbthreads.php?ubb=showflat&Main=40012&Number=198874#Post198874 If all segments are straight then you can use this method: make extrusion of each segment orient them seperatly therefore I made an array of X,Y,Z angles rotate3d Move3DObj you can also use Set3DRot 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.