Jump to content

Cone with 2 different Center points and 2 differente dia.


fewer_98

Recommended Posts

I'm trying to draw a cone with 2 different center points and 2 different Diameters. I can draw a cone with 2 different centers, but not with different diameters, and I can draw one with 2 different diameters, but not with 2 diffferent centers. Does anyone know of a way I can draw somethign like that? What it is, is I'm going from 30" diam to 20" dia. and I want it to be flat on one side and taper on the other. Any Ideas would be great. Thank you.

Link to comment
Share on other sites

Hello Fewer_98!

Please be more specific. Maybe it is just my English, but I am unable to imagine the 3D object you just described. Perheaps other members will help me by giving me more info?

Link to comment
Share on other sites

If you were simply drawing a frustum, all you would have to do is draw a circle, and extrude it, then enter the angle of extrusion. For example:

 

bottom diameter = 30

top diameter = 20

height = 15 (you didn't mention height)

 

Draw circle, extrude 15

Specify angle of taper for extrusion : 18.4349882

 

The above is how to draw a simple frustum, but for an offset frustum, you would need a Loft in Mechanical Desktop if you want a solid. If mesh will work, someone here can help, and if it needs to be a solid, then Fucarro would be the one to help you.

 

Flores

Link to comment
Share on other sites

If I am correct, what you are talking about is a "cone" that looks like this one:-

 

cone.gif

 

It has different centres and different diameters. This was created using the RULESURF command Draw>Surfaces>Ruled Surface.

 

All I did was draw the two circles that represent the base and top of the "cone" and selected each of them when prompted by the command. I did have to increase the SURFTAB1 variable to improve the smoothness of the result. The image shown above uses SURFTAB1 = 24 and is Gouraud shaded.

Link to comment
Share on other sites

AHA!

Yes! Now it is crystal clear. CADTutor, you are a great tutor!

Fewer_98, do not make me sade: tell me you are not using a LT version. Try this:

;  draw a STRAINGE CONE
;  [email="mfuccaro@hotmail.com"]mfuccaro@hotmail.com[/email]
; ______ october 2003 ____
(defun c:scone( / qual u1 i r1 r2 b1 b2 rx h p1 p2 p3 p4 oldsnap)
 (setvar "cmdecho" 0)
 (setq qual 75    ;quality factor
   u1 (/ (* 2 PI) qual)
   i 0
   r1 (getdist (setq b1 (getpoint "\nSpecify first base point ")) " first base radius ")
   r2 (getdist (setq b2 (getpoint "\nsec. base point ")) "\nsec. radius ")
   rx (+ r2 (distance b1 b2))
   h (- (caddr b2) (caddr b1)))
 (if (= h 0) (princ "\nERROR: the base points are at the same elevation!")
  (progn
    (command "cylinder" b1 rx h)
    (setq oldsnap (getvar "osmode"))
    (setvar "osmode" 0)
    (command "zoom" "e")
    (repeat qual
      (setq p1    (polar b1 (* i u1) r1)
        p2    (polar b2 (* i u1) r2)
        p3    (polar b1 (* (1+ i) u1) r1)
        p4    (polar b2 (* (1+ i) u1) r2)
        i    (1+ i)
      )
      (command "slice" "l" "" p1 p2 p3 b1)
      (command "slice" "l" "" p2 p3 p4 b2)
    )
    (command "zoom" "p")
    (setvar "osmode" oldsnap)
  )
 )
 (princ)
 )

Link to comment
Share on other sites

What about drawing an elliptical cone and cutting it in such way that the cutting faces will become circles?

So you can make the SOLID-model too.

Regards

Jochen

 

This sounds like a wonderful idea but I can't see it in my mind's eye. Could you give us a step-bystep?

Link to comment
Share on other sites

If I am correct, what you are talking about is a "cone" that looks like this one:-

 

cone.gif

 

It has different centres and different diameters. This was created using the RULESURF command Draw>Surfaces>Ruled Surface.

 

All I did was draw the two circles that represent the base and top of the "cone" and selected each of them when prompted by the command. I did have to increase the SURFTAB1 variable to improve the smoothness of the result. The image shown above uses SURFTAB1 = 24 and is Gouraud shaded.

 

Oh my goodness, thank you, that is exactly was I was looking for. I was driving myself crazy over here trying to get that drawn. Thanks everyone for your help.

Link to comment
Share on other sites

@CADTutor:

 

Let me explain my idea from the backside:

Looking from (1 0 0) to the model you will see the upper and the lower circle as lines. Connect the "endpoints" (really quadrant-points) with lines. These lines will meet in the top of a triangle. Draw line dividing the top-angle in two equal parts. Draw a perpendicular line from the "endpoint" of the lower circle to the angle-dividing line. So you will get the half-length of the first axis of the ellipse.

Make the same procedure from the view (0 1 0). So you will get the second half-length.

Now you have the parameters for the elliptical cone.

Draw it aligned to angle-dividing line and cut it at the circles.

So you should get the real SOLID-CONE (but the slicing method is good too - I use it to make SOLID transitions from Round to Square.)

 

Hope it was understandeable.

 

Regards

Jochen

http://www.black-cad.de

Link to comment
Share on other sites

Flores

Thank you for running the lisp I wrote. A lot of routines I posted in this Forum for drawing solids are about the same: first a big solid anything is created, than it is sliced as needed. So if you find a routine amazing, the rest of routines will make you fill amazing too.

Sometime a program needs a lot of work and returns some ordinary results. But sometimes just with short and ease to write programs you can make people to say "wow!"

Fewer_98

I am happy to know that you can run the program, I wrote it at your request. In my opinion surfaces are harder to manipulate in AutoCAD (Mr T -any comments?), so I prefer to write routines to generate solids.

Link to comment
Share on other sites

  • 1 year later...
In my opinion surfaces are harder to manipulate in AutoCAD (Mr T -any comments?), so I prefer to write routines to generate solids.

 

Solids are easier to edit. Boolean after creating, drafting faces etc. Surfaces are very hard to edit after. Although Edge surf is powerful.

 

Of course i have left ACAD and now enjoy Inventor. 8)

 

Nick

Link to comment
Share on other sites

  • 5 months later...
Guest Jam Bon Jovi

Excuse me for butting in !

I'm trying to get the flat layout of a cone like the one above with the dimensions

152.4 mm OD to 127 mm OD by 50 mm Tall

I've downloaded Rhino as discussed in another topic and I can "unwrap" an equal sided cone but I can

Link to comment
Share on other sites

If you use Cadtutor's rule surface suggestion, then here is a routine that will project the flat pattern for the cone. -David

;=======================================================================
;   Pattern.Lsp                                 May 11, 1996
;   Make A 3DFace Pattern And Outline From A Rulesurf Polyline
;================== Start Program ======================================
(princ "\nFabricated Designs, Inc.\nLoading Pattern v1.7   ")
(setq Pattern nil lsp_flie "Pattern")

;++++++++++++++++++ Macros +++++++++++++++++++++++++++++++++++++++++++++
(defun PDot ()(princ "."))
(defun RtoA (r) (/ (* r 180.0) pi))
(defun GetVal (n e) (cdr (assoc n e)))
(defun Sq (n) (* n n))
(defun Beep (/ f)
(and (wcmatch (getvar "PLATFORM") "*DOS*")
     (setq f (open "con" "w"))
     (write-char '7 f)
     (close f)))
(defun Warn (w) (beep)
               (princ (strcat "\nWarning !: " w))
               (prin1))
(defun Err (e) (beep)
              (princ (strcat "\nError: " e))
              (quit))

(PDot);++++++++++++ Set Modes & Error ++++++++++++++++++++++++++++++++++
(defun pa_smd ()
 (command "_.UNDO" "_GROUP")
 (setq m_v nil m_n nil
       m_l (list "CMDECHO" "BLIPMODE" "HIGHLIGHT")
       m_s (list 0 0 1)
    olderr *error*
   *error* (lambda (s)
    (cond ((= s "Function cancelled"))
          ((= s "quit / exit abort"))
          ((princ (strcat "\nError: " s))))
    (pa_rmd)))
 (foreach x m_l (setq m_v (cons (getvar x) m_v)
                      m_n (cons x m_n)))
 (mapcar 'setvar m_l m_s)
 (princ (strcat (getvar "PLATFORM") " Release " (ver)
        "\nPattern Generator   ")))

(PDot);++++++++++++ Return Modes & Error +++++++++++++++++++++++++++++++
(defun pa_rmd ()
 (command "_.UNDO" "_END")
 (setq *error* olderr)
 (mapcar 'setvar m_n m_v)
 (prin1))

(PDot);++++++++++++ Make Layer Current International +++++++++++++++++++
(defun set_layer (lay_name / lay_list lay_flag)
 (if (not (tblsearch "LAYER" lay_name))
     (command "_.LAYER" "_MAKE" lay_name "")
     (progn
      (setq lay_list (tblsearch "LAYER" lay_name)
            lay_flag (cdr (assoc 70 lay_list)))
      (if (= (logand lay_flag  1)  1)
          (command "_.LAYER" "_THAW" lay_name ""))
      (if (minusp (cdr (assoc 62 lay_list)))
          (command "_.LAYER" "_ON" lay_name ""))
      (if (= (logand lay_flag  4)  4)
          (command "_.LAYER" "_UNLOCK" lay_name ""))
      (and (= (logand lay_flag 16) 16)
           (princ "\nCannot Set To XRef Dependent Layer")
           (quit))
      (command "_.LAYER" "_SET" lay_name ""))))

(PDot);++++++++++++ Draw Patterns ++++++++++++++++++++++++++++++++++++++
(defun drpat (no ne / fp1 fp2 fp3 fp4 s1 s2 s3 s4 cs1 cs2 cs3 cs4 cs5 cs6
            sn1 sn2 sn3 sn4 sn5 sn6 ang yt y3 p1 p2 p3 p4 ldef an4 an5)
(setq fdef (entget ne)
       fp1 (GetVal 10 fdef) fp2 (GetVal 11 fdef)
       fp3 (GetVal 12 fdef) fp4 (GetVal 13 fdef)
        s1 (distance fp1 fp2) s2 (distance fp2 fp3)
        s3 (distance fp1 fp3) s4 (distance fp1 fp2)
        s5 (distance fp2 fp4) s6 (distance fp4 fp1))
 (setq s1c (if (zerop s1) 1.0 s1))
 (setq s2c (if (zerop s2) 1.0 s2))
 (setq s3c (if (zerop s3) 1.0 s3))
 (setq s4c (if (zerop s4) 1.0 s4))
 (setq s5c (if (zerop s5) 1.0 s5))
 (setq s6c (if (zerop s6) 1.0 s6))
 (setq cs1 (/ (- (+ (Sq s1) (Sq s3)) (Sq s2)) (* 2 s1 s3))
       cs2 (/ (- (+ (Sq s2) (Sq s1)) (Sq s3)) (* 2 s1 s2))
       cs3 (/ (- (+ (Sq s3) (Sq s2)) (Sq s1)) (* 2 s2 s3))
       cs4 (/ (- (+ (Sq s4) (Sq s6)) (Sq s5)) (* 2 s4 s6))
       cs5 (/ (- (+ (Sq s5) (Sq s4)) (Sq s6)) (* 2 s4 s5))
       cs6 (/ (- (+ (Sq s6) (Sq s5)) (Sq s4)) (* 2 s5 s6))
       sn1 (sqrt (- 1.0 (Sq cs1)))
       sn2 (sqrt (- 1.0 (Sq cs2)))
       sn3 (sqrt (- 1.0 (Sq cs3)))
       sn4 (sqrt (- 1.0 (Sq cs4)))
       sn5 (sqrt (- 1.0 (Sq cs5)))
       sn6 (sqrt (- 1.0 (Sq cs6)))
       ang (angle no (list (+ (car no) (* s1 cs3)) (+ (cadr no) (* s1 sn3))))
        yt (polar no s1 ang)
        y3 (cadr (polar yt s1 (* -1.0 ang)))
        p1 (list (+ (car no) (* s3 cs1)) (+ (cadr no) (* s3 sn1)))
        p2 (list (+ (car no) (* s2 cs2)) (+ (cadr no) (* s2 sn2)))
        p3 (list (+ (car no) (* s1 cs3)) y3)
        p4 (list (+ (car no) (* s6 cs4)) (+ (cadr no) (* s6 sn4))))
(command "_.3DFACE" no p3 p1 p4 "")
(setq ldef (entget (entlast)))
(setq an4 (rtoa (angle (GetVal 10 ldef) (GetVal 13 ldef)))
     an5 (rtoa (angle rp11 rp12)))
(if (= i (1- sl))
   (command "_.ROTATE" (entlast) "" no fa)
   (command "_.ROTATE" (entlast) "" no (- an5 an4)))
(setq rdef (entget (entlast)))
(setq rp10 (GetVal 10 rdef)
     rp11 (GetVal 11 rdef)
     rp12 (GetVal 12 rdef)
     rp13 (GetVal 13 rdef))
(redraw (entlast)))

(PDot);++++++++++++ Draw Outlines ++++++++++++++++++++++++++++++++++++++
(defun drout ()
 (initget "Yes No")
 (if (= "No"  (getkword "\nForm PolyLine Outline <Y>:... "))
     (princ)
     (progn
 (setq nlay
  (getstring
   (strcat "\nEnter Layer For Outline <" (getvar "CLayer") ">:  ")))
 (set_layer nlay)
 (princ "\nForming PLine Outlines...   ")
 (command "_.PLINE" (car pl2) (cadr pl2) "")
 (command "_.PLINE" (car pl4) (cadr pl4) "")
 (setq i (1- (length pl1)))
 (command "_.PLINE" (nth i pl1) "_Width" 0)
 (setq i (1- i))
 (while (>= i 0)
        (command (nth i pl1))
        (setq i (1- i)))
 (command "")
 (setq i (1- (length pl3)))
 (command "_.PLINE" (nth i pl3) "_Width" 0)
 (setq i (1- i))
 (while (>= i 0)
        (command (nth i pl3))
        (setq i (1- i)))
 (command ""))))

(PDot);++++++++++++ Get Entity Name ++++++++++++++++++++++++++++++++++++
(defun GetOne (/ st os)
(setq os (getvar "SNAPMODE") s nil)
(setvar "SNAPMODE" 0)
(while (not st)
       (setq st (ssget)))
(while (> (sslength st) 1)
       (setq st nil)
       (princ "\nOnly 1 At A Time Please\n")
       (while (not st)
              (setq st (ssget))))
(setvar "SNAPMODE" os)
(setq s (ssname st 0)))

(PDot);++++++++++++ Get Polyline Info ++++++++++++++++++++++++++++++++++
(defun GetPl ()
 (GetOne)
 (setq pdef (entget s))
 (if (or (/= (GetVal 0 pdef) "POLYLINE")
         (/= (GetVal 71 pdef) 2)
         (/= (logand (GetVal 70 pdef) 16) 16))
     (err "Not A Rulesurf Polyline"))
 (command "_.COPY" s "" (list 0 0) (list 0 0))
 (setq fe (entnext))
 (command "_.EXPLODE" (entlast))
 (setq fs (ssadd))
 (while fe
        (ssadd fe fs)
        (setq fe (entnext fe)))
 (setq sl (sslength fs)
        i (1- sl)
       sd (ssname fs i)
      ss1 (ssadd)
     temp T)
 (repeat sl
       (if (= "3DFACE" (GetVal 0 (entget sd)))
           (ssadd sd ss1))
       (setq i (1- i)
            sd (ssname fs i))))

(PDot);++++++++++++ Get Face Info ++++++++++++++++++++++++++++++++++++++
(defun GetFc ()
 (setq flay (getstring
   (strcat "\nEnter LAyer Of 3DFaces <"clay">:   ")))
 (if (= flay "") (setq flay clay))
 (setq ss1 (ssget "X" (list (cons 0 "3DFACE") (cons 8 flay))))
 (if (not ss1)
     (err "\nNo 3DFaces Found")))

(PDot);************ Main Program ***************************************
(defun Pattern (/ m_n m_v m_s m_l olderr temp clay flay nlay fdef rdef
                  sd i fe fs s rp10 rp11 rp12 rp13 fa no ne ss1
                  pdef pl1 pl2 pl3 pl4 play s1c s2c s3c s4c s5c s6c
                  s5 s6 sl)
 (pa_smd)
 (setq clay (getvar "CLAYER"))
 (initget "Polyline Face")
 (if (= "Face" (getkword "\nFrom Polyline or Faces 

:   "))
     (GetFc)
     (GetPl))
 (setq play (strcase (getstring
   (strcat "\nEnter LAyer For Pattern <"clay">:   "))))
 (if (= play "") (setq play clay))
 (if (/= clay play)
     (set_layer play))
 (setq sl (sslength ss1)
        i (1- sl)
       ne (ssname ss1 i)
     fdef (entget ne)
     rp10 (GetVal 10 fdef)
     rp11 (GetVal 11 fdef)
     rp12 (GetVal 12 fdef)
     rp13 (GetVal 13 fdef)
       fa (rtoa (angle rp10 rp11))
       no rp10)
 (command "_.ELEV" (caddr rp10) 0.0)
 (while (>= i 0)
        (drpat no ne)
        (if (= i (1- sl))
            (setq pl4 (list rp13 rp10)
                  pl1 (list rp10)
                  pl3 (list rp13)))
        (setq i (1- i)
             ne (ssname ss1 i)
             no rp11
            pl1 (cons rp10 pl1)
            pl3 (cons rp13 pl3)))
 (setq pl2 (list rp11 rp12)
       pl1 (cons rp11 pl1)
       pl3 (cons rp12 pl3))
 (redraw)
 (drout)
 (if temp (command "_.ERASE" ss1 ""))
 (redraw)
 (pa_rmd))

(PDot);************ Load Program ***************************************
(defun C:Pattern () (Pattern))
(if Pattern (princ "\nPattern Defined\n"))
(prin1)
;|================= End Program ========================================

It is pretty old but I just tested it again in A2K, and it worked.

Link to comment
Share on other sites

  • 4 years later...
Oh my goodness, thank you, that is exactly was I was looking for. I was driving myself crazy over here trying to get that drawn. Thanks everyone for your help.

 

This work great! I am new to Cadtudor, and find you to be a valuable resource. Once question, how do I convert this object to a solid?

Link to comment
Share on other sites

Thanks for your rapid reponse. I am not sure what I am seeing here. I created a cone very similar to the one in thread #9 using the rulesurf command, which worked great. I am not familiar with running lisp programs, etc, and just need to convert the object to a solid.

Link to comment
Share on other sites

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