Bill Tillman Posted October 19, 2017 Share Posted October 19, 2017 I have laid out the attached 3D model which will have a handrail follow it's profile. In spite of all my efforts, I cannot seem to get the handrail section to sweep or extrude along the 3DPolyine I constructed. This 3DPolyline follows where the centerline of the top of the handrail will run. I could probably break the 3DPolyline into several sections and this would work, but I'm wanting to understand why it will not work as I have it now. The 3DPolyline is in the Construction Lines layer and is magenta. Sweep Issie.dwg Quote Link to comment Share on other sites More sharing options...
SEANT Posted October 19, 2017 Share Posted October 19, 2017 Does the design allow you to increase the lengths of your transitions. My guess is that there would be self intersecting geometry otherwise. SweepWtihoutIssue.dwg Quote Link to comment Share on other sites More sharing options...
SLW210 Posted October 20, 2017 Share Posted October 20, 2017 Sweep and Extrude Path both worked for me on AutoCAD 2011. No Sweep Issue.dwg Quote Link to comment Share on other sites More sharing options...
Jef! Posted October 20, 2017 Share Posted October 20, 2017 2013 : both worked 2014 : both worked 2015 : both failed. interesting. Quote Link to comment Share on other sites More sharing options...
Cad64 Posted October 20, 2017 Share Posted October 20, 2017 I think we need more information and feedback from Bill. Your profile says you're using 2014, is that correct? Are you saying that Sweep and Extrude do not work at all? Or are you saying that the commands work, but you're having a problem with intersecting geometry as SEANT mentioned. I ran both commands on the drawing in Autocad 2014 and they both work fine except for the intersecting geometry, but that can be fixed by simply editing your polyline path. Quote Link to comment Share on other sites More sharing options...
Jef! Posted October 20, 2017 Share Posted October 20, 2017 Here's what I get on 2015 (sp2) Command: EXTRUDE Current wire frame density: ISOLINES=4, Closed profiles creation mode = SolidSelect objects to extrude or [MOde]: 1 found Select objects to extrude or [MOde]: Specify height of extrusion or [Direction/Path/Taper angle/Expression]: P Select extrusion path or [Taper angle]: Modeling Operation Error: Sweeping could not create a valid body. Unable to extrude the selected object. Command: SWEEP Current wire frame density: ISOLINES=4, Closed profiles creation mode = Solid Select objects to sweep or [MOde]: 1 found Select objects to sweep or [MOde]: Select sweep path or [Alignment/Base point/Scale/Twist]: Modeling Operation Error: Sweeping could not create a valid body. Unable to sweep 1 selected objects. In other versions (2013 (stock) / 2014 (sp1)) it works as is without changing the geometry nor error messages of any kind, and create the geometry without issues. It doesn't surprise me, as it is not the first time I witness that kind of behavior difference between versions. Different service pack might have some impact too. edit: sorry i just notice your question wasn't for me. Quote Link to comment Share on other sites More sharing options...
SEANT Posted October 21, 2017 Share Posted October 21, 2017 Apparently some versions of AutoCAD will allow for the sweep. Perhaps they shouldn't, though. The sweep with the original polyline can't possibly happen with such a short transition. And even when AutoCAD allows the sweep, as in SLW210's drawing, the resultant solid has voids, not to mention serious fabrication issues. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted October 21, 2017 Share Posted October 21, 2017 (edited) I started to get same problems as Seant and just read his post was about to say you would need arcs with a min radius equal to the edge distance, If you want your shape then you would have to extrude each section and slice the 45 join but then it would need a vertical angle to be included as well 1/2 angle of rise. As soon as I went away from say a circle it stopped working 2016. In civil works this occurs with slope batters in 90 corners get weird answers. An old house builder told me once about working out compound cut angles for timber being young did not listen. Bill what you need is say some cut plane routines looking at your stairs the 1st is easy a simple +- 45 cut, the second is a 0 cut but 1/2 incline angle 3rd - 1/2 incline angle plus a 45 +- and so on. Found it from Autocad help Use the SLICE command to slice a 3D solid or surface, you must specify a cutting plane or select a surface. By 3 points. You know the 3d pline vertices so using 3 pts should be able to work out all the angle variables, adding the shape to the vertice point and extruding at correct angle and length. pline co-ords-3d.lsp Edited October 21, 2017 by BIGAL Quote Link to comment Share on other sites More sharing options...
BIGAL Posted October 21, 2017 Share Posted October 21, 2017 Bill had a play its raining so a bit of time. Run 1ststep and pick 3 points the code example is only for same Z rail. Then extrude the handrail past the intersection point on two sections so they overlap. Then run 2nd step it should do a 45 mitre for you. Union 2 halfs. Obviously need the next step and thats an incline plane to take into account hand rail rise. Need some more polar pts. (defun c:1step ( / ) (setq dist 50.0) ; change this to suit (SETQ ANGBASEE (GETVAR "ANGBASE")) (SETQ ANGDIRR (GETVAR "ANGDIR")) (SETQ LUNITSS (GETVAR "LUNITS")) (SETQ LUPRECC (GETVAR "LUPREC")) (SETQ AUNITSS (GETVAR "AUNITS")) (SETQ AUPRECC (GETVAR "AUPREC")) (SETVAR "LUNITS" 2) (SETVAR "ANGBASE" 0.0) (SETVAR "ANGDIR" 0) (SETVAR "LUPREC" 0) (SETVAR "AUNITS" 0) (SETVAR "AUPREC" 0) ) (setq pt1 (getpoint)) (setq pt2 (getpoint)) (setq pt3 (getpoint)) (setvar "osmode" 0) (setq ang1 (angle pt1 pt2)) (setq ang2 (angle pt3 pt2)) (setq horang (/ (+ ang1 ang2) 2.0)) (setq pt4 (polar pt2 horang dist)) (setq pt5 (polar pt2 (angle pt4 pt2) dist)) (setq pt4top (list (car pt4)(cadr pt4)(+ (caddr pt4)dist))) (setq pt4bot (list (car pt4)(cadr pt4)(- (caddr pt4)dist))) (setq pt5 (list (car pt5)(cadr pt5)(- (caddr pt5)dist))) (alert "please extrude objects") ) (defun c:2ndstep ( / ) (setvar "osmode" 512) (setq obj (entsel "pick 1st extruded object")) (setq ppt (cadr obj)) (setvar "osmode" 0) (command "slice" obj "" "3" pt4top pt5 pt4bot ppt) (setq obj (entsel "pick 2nd extruded object")) (setq ppt (cadr obj)) (setvar "osmode" 0) (command "slice" obj "" "3" pt4top pt5 pt4bot ppt) (SETVAR "LUNITS" lunitss) (SETVAR "ANGBASE" angbasee) (SETVAR "ANGDIR" angdirr) (SETVAR "LUPREC" luprecc) (SETVAR "AUNITS" aunitss) (SETVAR "AUPREC" auprecc) ) Quote Link to comment Share on other sites More sharing options...
Bill Tillman Posted October 21, 2017 Author Share Posted October 21, 2017 I will update my profile as I'm now using AutoCAD 2018. And that is the versions I'm trying to do this with. I get neither the sweep or extrude to work with it. I have an old copy of 2014 on another machine around here somewhere so later today I'll try it out. As for changing the design, no the architect's hate when I do that. And I think I can bust the polyline up into shorter sections to get it to work. I was just curious to see if I had gotten my layout correct for the entire run of the rail. Theoritally, when this is installed is should be one long continuous run. It's the darndest thing when sometimes in spite of carefully plotting each point (vertex) I end up with lines which will not trim or extend or join and then when I examine their properties closely I see that the Delta of either the z,y or x axis is not zero. I will examine the other replies later today when time permits so thanks to all. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted October 22, 2017 Share Posted October 22, 2017 It will work with a small circle as shape but not with your shape have a good look at Seant's image, I started to do some code for you that will invoke the SLICE command then your handrail will work. I or you need to add a 1/2 angle for the rise and then it should be good I was looking at drawing the pline for the vertical cut plane then tilting it using Rotate3d for the 1/2 angle, get the 3 new co-ords and use SLICE, I have some other stuff I must do 1st. I tested on your dwg and it worked for the Z same rails ie 90 flat corner. Quote Link to comment Share on other sites More sharing options...
Bill Tillman Posted October 24, 2017 Author Share Posted October 24, 2017 Well I be darned. I opened up the drawing in AutoCAD 2014 Professional and it swept the extrusion with no trouble. I'm confused as to why 2018 will not handle it and other versions will. One would think it's the other way around considering the reason I moved to 2018 was to be able to open some STEP files a client sent me which 2014 would not open. But I do see the conflicting geometry in the corners which form the 90° corners and then transition to the slope of the stairs. Quote Link to comment Share on other sites More sharing options...
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.