Jump to content

Recommended Posts

Posted

This routine is my answer at the request of our new friend LUNCHB0X69. The request is here:http://cadtutor.net/forum/viewtopic.php?t=1145 but I think that the right place to post Lisp routines is the AutoLisp section.

; draw a helical ramp
; [email="mfuccaro@hotmail.com"]mfuccaro@hotmail.com[/email]
;   february 2004
;
(defun c:ramp(/ cen r1 r2 seg ang hgh ceh a1)
 (setq cen (getpoint "\ncenter point ")
   r1 (getdist cen "\n inner radius ")
   r2 (getdist cen "\n outer radius ")
   seg (getint "\nsegments (max. 255) ")
   ang (/ (* 2 PI) seg)
   hgh (getdist "height (after 1 turn)? ")
   ceh cen    a1 0)
 (setq old (getvar "osmode"))
 (setvar "osmode" 0)
 (command "3dmesh" (1+ seg) 4)
 (repeat (1+ seg)
   (command (polar cen a1 r1)
        (polar ceh a1 r1)
        (polar ceh a1 r2)
        (polar cen a1 r2))
   (setq a1 (+ a1 ang)
     ceh (list (car cen) (cadr cen) (+ (caddr ceh) (/ hgh seg))))
   )
 (setvar "osmode" old)
)
   

Guest LUNCHBOX69
Posted

Yes, I do want it around a cylinder. I suppose if you were to have this go up multiple floors you'd need the telescoping effect that the mosque has, but for my purposes the cylinder is more appropriate because the ramp does not ovelap upon itself. The cylinder is making this easier right?

 

I don't know if I've done it wrong or if it is because I'm using autocad 2004, but the result i got looked kind of like one of those chinese hats, where the center was rising/falling and the ramp stayed flat, on one level. Further, it was rather thin and the thickness did not increase as the ramp moved upwards. And finally, there was information (mass) in the center of the form, whereas I was looking for just the ramp with a courtyard in the center.

 

I'm pretty sure I've entered it correctly, it's taken me all afternoon just to get these results because I wasn't familiar with the commands/codes at first. I also don't really know how to use a 3d mesh or even the mathematics that is controlling the construction of this object, so I can't offer any other possibilities. I can only ask that perhaps there's solution?

 

Thank you for your swift response to the first question.

 

ErinGreat%20Mosque%20Samarra%20Iraq%20847.jpg

Posted

ramp1.jpg

 

Here is the result of running the lisp above in AutoCAD 2k4 - see the green ramp. Working with other versions you should get the same result. Is it not what you need?

I got a filled inside by entering 0 at inner radius - the yellow ramp.

 

ramp2.jpg

 

Did I understand you wrong? Can you post a sketch of how the ramp should be?

Just playing: I constructed ramps with 3 and 4 segments, here are the images.

 

ramp3_4.jpg

Posted

Cool Fuccaro,I kept fidddling with it,coming out with lots of different results.So you attained the above results by only using 3/4 segments is that it?

Guest LUNCHBOX69
Posted

yeah that is exactly it. What do you think i'm doing wrong? Here are the dimensions I'm using:

 

14' inner

19' outer

9' rise

12 segments

 

I'll double check the code as well and see if I've entered it wrong

Guest LUNCHBOX69
Posted

I was able to copy and paste your code on this computer, and now it works great :D I must have messed it up somewhere. Thanks a bunch, this is so cool!

 

I just noticed that there is a 3D polyline feature on 2004. Do you think that this could be used to produce the same effect? Of course it would be time consuming and the program is much easier, but I'm just curious as to how all this stuff works.

 

Erin

Guest LUNCHBOX69
Posted

Is there any way to specify a start point and an end point? Like, say at 0 degrees and 270 degrees? And if this was a conical path like the great mosque, how would the program differ? I'm also wondering about more floors, like specifying the height of each turn and the number of turns. This is just for fun and learning though, I'm not trying to make anything specific.

Posted

Hypo

The base circles are approximated with polygons having "segments" sides. For the green ramp above I used 40 segments. The resulted surface is smooth enough for current needs. The upper limit is set by AutoCAD; a 3DMESH may have no more than 256 vertexes in both of directions. Testing the lower limit I got the images with 3 and 4 segments. Using more and more segments, the approximation of the circles will be better.

LUNCHB0X69

The 3D polyline has been here from long time (R14?). But using polylines you may construct only... (poly)lines, not surfaces.

It is possible to draw the ramp on a cone, or to fallow a cylinder just between two specified angles. The only needs is to rewrite the lisp.

  • 1 year later...
Posted

Well, what can be done then if I need the ramp going up 5 levels each level being right over the previous one? I managed to draw this ramp using "rulesurf" but is there any way to turn it to solid. I know about the m2s.lsp, but using it I loose all the levels of the ramp bellow the highest, is there any way to turn my 3D ramp to solid?[/img]

  • 3 years later...
Posted

Hi, is there an lisp that can make this same ramp follow a path, just like in extrude? I am using AutoCAD 2004, and I'm having trouble making a 3D curved ramp/road that slopes a bit. But its my ramp isn't a perfect circle, more like an elipse i think?

Posted

Purrhaps the command Sweep?

 

Assuming 04 has that command

Posted

Just tried it now. Uknown command "SWEEP" :lol:. Is there an lisp for that?

Posted

yer there is, its called upgrade....lol

 

Im more than sure there would be some where, have a google, see what ya can did up.

 

Dont forget to post back if ya find some thing for the next next person :P

Posted

lol. I know I have to upgrade from 04 to 08 or 9. That will come in time. :) But if there was a way to make curved ramps that I can specify the path of the curve in 2004, I'd like to know it nevertheless. :D

 

EDIT: Btw, I tried searching for 3D curved ramps and all I got was applications for sale lol. I probably suck at searching, i dunno.

Posted

In this thread, I had experimented in AutoCAD 2004 a bit with ramp like structures (3d solids) following curved paths. It requires a few of up front calculations to determine taper angles, but the results were pretty good.

 

http://www.cadtutor.net/forum/showthread.php?t=23511

 

Perhaps if you post the parameters for this elliptical ramp the proper taper (if possible) can be determined.

  • 3 weeks later...
Posted

thanks for ramp

help 2dpoly from 3dpoly

 

to realize similar lisp

2dpolt to 3dpoly

type quote departure 0,00 to 50.00

or departure 230 to 500 etc.etc.

example route

 

polyi.th.jpg

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

×
×
  • Create New...