CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz] ARKANCE | CONTACT - CZ | SK | EN | DE
RSS channel - CAD tips RSS tips
RSS discussions

Discussion Discussion forum

?
CAD discussions, advices, exchange of experience

CAD Forum - Homepage CAD discussion forum - ask any CAD-related questions here, share your CAD knowledge on AutoCAD, Inventor, Revit and other Autodesk software with your peers from all over the world. To start a new topic, choose an appropriate forum.

Please abide by the rules of this forum.
This is a peer-to-peer forum. The forum doesn't replace the official direct technical support provided by ARKANCE for its customers.
How to post questions: register or login, go to the specific forum and click the NEW TOPIC button.
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Topic ClosedElliptical Dome

 Post Reply Post Reply Page  <123>
Author
Kent Cooper View Drop Down
Senior Member
Senior Member


Joined: 12.Mar.2013
Location: United States
Using: AutoCAD2020, 2023
Status: Offline
Points: 686
Direct Link To This Post Posted: 09.Oct.2013 at 18:00
Here's a routine that makes one as a Solid [actually a segmented approximation to whatever level of precision the User chooses].  See comments at the top.  (It's really fun to watch it do its thing!)  With high precision [I've tried it with precision as high as 200], you'll have to give it time to do the Intersect operation at the end.  It doesn't yet have all the usual bells and whistles, but I'm working on incorporating those, as well as having it build it where the User designates instead of at the WCS origin, using true Ellipsoids of rotation when any axes are equal, etc.
 
;;  EllipticalDomeSolid.lsp [command name: EDS]
;;  To construct a Dome shape in Elliptical form, as a 3D Solid.
;;  User specifies Axis lengths, height and precision level.
;;  Constructs with base centered at WCS origin.
;;  To make a hollow dome, construct one to outer dimensions
;;    and another to inner dimensions, and Subtract.
;;  Note that mid-line of each "wedge" surface traces along "true"
;;    dome surface, and "corners" between "wedges" are slightly
;;    outboard of true surface [less so with greater precision].
;;    However, base perimeter is truly Elliptical, with transitional
;;    triangular areas around base.
;;  Kent Cooper, 9 October 2013
(defun C:EDS ; = Elliptical Dome as 3d Solid
  (/ a1 a2 ht prec par ss ell pt ang)
  (command "_.undo" "_begin")
  (setq
    a1 (getdist "\nLength of one elliptical axis: "); = Axis 1
    a2  (getdist "\nLength of other elliptical axis: "); = Axis 2
    ht  (getdist "\nHeight: "); = height
    prec (getint "\nNumber of segments per quadrant [precision]: ")
    par 0.0 ; initial
    ss (ssadd); initially empty
  ); setq
  (setvar 'ucsfollow 0)
  (setvar 'osmode 0)
  (setvar 'blipmode 0)
  (command
    "_.ucs" "_world" "_plan" ""
    "_.zoom" "_c" '(0 0 0) (* (max a1 a2) 1.05)
    "_.ellipse" "_c" '(0 0 0) (polar '(0 0 0) 0 (/ a1 2)) (/ a2 2)
    "_.shademode" "2d"
  ); command
  (setq ell (entlast))
  (repeat (1+ prec)
    (setq
      pt (vlax-curve-getPointAtParam ell par)
      ang (angle '(0 0 0) (vlax-curve-getFirstDeriv ell par))
    ); setq
    (command
      "_.ucs" "_zaxis" '(0 0 0) (polar '(0 0 0) ang 1)
      "_.ellipse"
        "_c" '(0 0 0)
        (trans pt 0 1); even though it will be up off UCS plane
        ht
      "_.extrude" "_last" "" (max a1 a2) ""
      "_.move" "_last" "" (list 0 0 (- (/ (max a1 a2) 2))) ""
      "_.ucs" "_world"
    ); command
    (ssadd (entlast) ss)
    (command "_.mirror" "_last" "" '(0 0 0) '(0 1 0) "_no")
      ; [redundant for first and last, but easier than distinguishing]
    (setq ss (ssadd (entlast) ss))
    (setq par (+ par (/ pi 2 prec)))
  ); repeat
  (command "_.extrude" ell "" ht "")
  (ssadd (entlast) ss)
  (command "_.intersect" ss "")
  (command "_.undo" "_end")
  (princ)
); defun
Back to Top
John Connor View Drop Down
Senior Member
Senior Member


Joined: 01.Feb.2011
Location: United States
Using: AutoCAD 2018
Status: Offline
Points: 7175
Direct Link To This Post Posted: 09.Oct.2013 at 16:50
I tried it using 2014 and I also received the Fatal Error: Unhandled Access Violation message then closing the window AutoCAD crashed.  Is there something a user must do before invoking the command?
"Humans have a strength that cannot be measured. This is John Connor. If you are reading this, you are the resistance."

<<AutoCAD 2015>>

Back to Top
mmaurigi View Drop Down
Groupie
Groupie


Joined: 21.Oct.2012
Location: United States
Using: AutoCAD 2009
Status: Offline
Points: 43
Direct Link To This Post Posted: 09.Oct.2013 at 15:14
Thanks very much for updating the file. There is a problem though.
I load the file with NETLOAD, then at the command prompt, I type ELSOL. The prompts come up asking for the Length, Width, and Height. After entering those values, I get a Fatal Error and get kicked out of AutoCAD.
 
 
Originally posted by SEANT SEANT wrote:

Here is an updated to work with 2013-2014. Place  Ã¢â‚¬Å›Ellipsoid.dll” on your hard drive.  In AutoCAD, invoke the NETLOAD command and retrieve that file.  If you are using AutoCAD 2014 a warning will be shown if you have not saved it in a Trusted Files Location, but the warning box does give you the option of loading anyway.

 

For sure, the routine qualifies as rudimentary.  The command can be called via ELLIPSOIDSOLID or ELSOL for short.  The prompt asks for a Length, Width, and Height.  An ellipsoid of the input dimensions is centered at the WCS origin with the axis aligned to the X, Y, and Z.

uploads/244286/Ellipsoid.zip

Back to Top
SEANT View Drop Down
Groupie
Groupie


Joined: 09.Jan.2012
Location: United States
Using: AutoCAD 2016
Status: Offline
Points: 31
Direct Link To This Post Posted: 08.Oct.2013 at 23:08
Here is an updated to work with 2013-2014. Place  Ã¢â‚¬Å›Ellipsoid.dll” on your hard drive.  In AutoCAD, invoke the NETLOAD command and retrieve that file.  If you are using AutoCAD 2014 a warning will be shown if you have not saved it in a Trusted Files Location, but the warning box does give you the option of loading anyway.

 

For sure, the routine qualifies as rudimentary.  The command can be called via ELLIPSOIDSOLID or ELSOL for short.  The prompt asks for a Length, Width, and Height.  An ellipsoid of the input dimensions is centered at the WCS origin with the axis aligned to the X, Y, and Z.

 



Edited by Vladimir Michl - 18.Oct.2013 at 14:05
Back to Top
mmaurigi View Drop Down
Groupie
Groupie


Joined: 21.Oct.2012
Location: United States
Using: AutoCAD 2009
Status: Offline
Points: 43
Direct Link To This Post Posted: 08.Oct.2013 at 15:05
I was referring to your post Seant. If you can update it for 2013 or 2009, that would be perfect. I can wait if it takes a week.
 
Thanks
 
Originally posted by SEANT SEANT wrote:

 
I think the "app" reference pertains to the one I alluded to in my post.  Unfortunately, The compatibility of the routine is only AutoCAD 2011 - 2012.  If needed, I'll try to update to 2013 - 2014, but it wouldn't be available until later this week.  In the mean time, this link has some discussion on the matter as well as hosting my current routine and a lisp variant by Marko Ribar.  See Reply 14.
 
 
Back to Top
philippe JOSEPH View Drop Down
Senior Member
Senior Member


Joined: 14.Mar.2011
Location: France
Using: AutoCAD Mechanical 2017
Status: Offline
Points: 1501
Direct Link To This Post Posted: 08.Oct.2013 at 13:16
Seant, thanks a lot for your informations.
I will go on the site that you are talking about.
Again, thanks for all.
Back to Top
SEANT View Drop Down
Groupie
Groupie


Joined: 09.Jan.2012
Location: United States
Using: AutoCAD 2016
Status: Offline
Points: 31
Direct Link To This Post Posted: 08.Oct.2013 at 08:26

Phillippe, AutoCAD includes capabilities in its APIs that are not exposed to the drawing editor.  One of the capabilities allows for degree 2 NURBS surfaces.  I used that to sculpt the ellipsoid solid attached to post #2.

 

I see you are using AutoCAD Mechanical 2012.  That is the same version I used when running the plugin ellipsoid.dll attached to post # 14 of the theswamp.org link above.  I do understand, though, reluctance to run outside code. 

The source code for that routine can be inspected (and/or used to compile) here:

http://www.acadnetwork.com/index.php?topic=104.0

The site requires registration.

Back to Top
philippe JOSEPH View Drop Down
Senior Member
Senior Member


Joined: 14.Mar.2011
Location: France
Using: AutoCAD Mechanical 2017
Status: Offline
Points: 1501
Direct Link To This Post Posted: 07.Oct.2013 at 15:37
Yes Kent you can do it and it works.
I did a bloc 1x1x1 with a half sphere and scale it to X:14 , Y:18 , Z:8.
I did an other bloc at scale X:13 , Y:17 Z:7 to figure the volume to be taken out of the first one ( would be a volume of thickness 1" ) but I was not authorized to explode these blocks "non uniform scale".
The Ellipsoid.dwg provided by Seant is OK but I don't know if we are abble to generate with our AutoCAD.
Sometime I ask a colleague to generate on Solidworks "impossible" volumes for me, maybe we have ( or not ) that possibility.
maybe someone on the planet can help us...


Edited by philippe JOSEPH - 07.Oct.2013 at 15:53
Back to Top
Kent Cooper View Drop Down
Senior Member
Senior Member


Joined: 12.Mar.2013
Location: United States
Using: AutoCAD2020, 2023
Status: Offline
Points: 686
Direct Link To This Post Posted: 07.Oct.2013 at 14:51
Can you do it with a one-inch diameter hemispherical dome (quite simple to construct), defined as a Block and inserted with appropriate differing X, Y and Z scale factors?
Back to Top
SEANT View Drop Down
Groupie
Groupie


Joined: 09.Jan.2012
Location: United States
Using: AutoCAD 2016
Status: Offline
Points: 31
Direct Link To This Post Posted: 06.Oct.2013 at 09:43
I don't think RevolveSurface can be used due to the squashed height of 4".  Loft can be used but creating an ellipsoid with tight tolerances (Mathematically correct surface area and volume) is difficult.
 
I think the "app" reference pertains to the one I alluded to in my post.  Unfortunately, The compatibility of the routine is only AutoCAD 2011 - 2012.  If needed, I'll try to update to 2013 - 2014, but it wouldn't be available until later this week.  In the mean time, this link has some discussion on the matter as well as hosting my current routine and a lisp variant by Marko Ribar.  See Reply 14.
 
 
Back to Top

Related CAD tips:


 Post Reply Post Reply Page  <123>
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0,078 seconds.