How would you generate this shape in 3D using Lisp ?

How would you generate this shape in 3D using Lisp ?

dany_rochefort
Collaborator Collaborator
1,445 Views
7 Replies
Message 1 of 8

How would you generate this shape in 3D using Lisp ?

dany_rochefort
Collaborator
Collaborator

Hi guys, any idea on how to generate this type of shape in 3D using Lisp ? Idea being that  the user would input a few parameters and the 3d shape would generate from those inputs.

 

I am not looking for this Lisp itself, just some general ideas as to ''how you would go about it'' .... 

 

It's call a Continous Radial Pile or Circular Pile Arragement; used in bulk handling.  Both end would need to be rounded as shown on the left hand side of the pile.

05.png

 

Thanks in advance for the ideas ! 

0 Likes
Accepted solutions (1)
1,446 Views
7 Replies
Replies (7)
Message 2 of 8

Kent1Cooper
Consultant
Consultant
Accepted solution

Two PLINE commands, one UCS command and one EXTRUDE command should do it.

 

Given a center point [white Point], and either a mid-line radius [inner grey Arc] and a width for the base, or inner and outer radii for the base [for the grey outline], a routine could calculate vertex locations to draw the through-the-quarter-widths magenta Polyline easily enough.  Then with a tilt-up UCS based on an end of the center-line Arc, and given a height at the ridge, it could make the yellow triangle with its heel at the center point of one swung end.

Kent1Cooper_0-1649432683578.png

Extruding that yellow triangle along that magenta Polyline as a Path gives this:

Kent1Cooper_1-1649432866028.png

The quarter-widths route of the Polyline path is what achieves rounding of the ends.

 

[The grey parts in the first image are for illustration -- they would not need to be drawn as part of the routine, nor would the Point in the middle.]

 

The inner grey Arc here is 3/4 of a full circle -- presumably an amount of included arc would also be a parameter the User would specify.

 

Kent Cooper, AIA
Message 3 of 8

dany_rochefort
Collaborator
Collaborator

@Kent1Cooper , thank you very much !  That is genius...

 

Best Regards, 

0 Likes
Message 4 of 8

Kent1Cooper
Consultant
Consultant

I don't know why it didn't occur to me to just use the outline of the base directly, with the tip of the yellow triangle on it, this way:

Kent1Cooper_0-1649439953053.png

But for some reason, it says it can't Extrude that triangle in this situation.  It's not that it doesn't touch the path -- INTersection Osnap says they touch.  I tried it in both the WCS and the triangle's UCS.  It's all accurately drawn with good Snap values.  I couldn't say why the previous approach works but this doesn't, but as long as something does....

Kent Cooper, AIA
Message 5 of 8

dany_rochefort
Collaborator
Collaborator

I will check that out also... Thx!

0 Likes
Message 6 of 8

stevor
Collaborator
Collaborator

One way is to subtract an inverted cone from a larger upright cone,

then slice off a quadrat with a triangular prism, or equivalent,

then add an upright cone on the left end, which would show half.

S
0 Likes
Message 7 of 8

Sea-Haven
Mentor
Mentor

Hi Kent did you rotate3d the triangle ? All done in World.

 

SeaHaven_0-1649475674898.png

 

It could be done as a lisp. RAD1 RAD2 Height.

0 Likes
Message 8 of 8

leeminardi
Mentor
Mentor

Here's another way to construct the solid given a closed 2D polyline.  Use the Extrude command with the Taper option.  It avoids the need to create the triangular cross section.

The following code will create the shape with a taper angle of 25°.  

THE TOP VIEW MUST BE ACTIVE WHEN THE COMMAND IS GIVEN!

(defun c:test (/)
; creates a solid with  tapered sides from a closed polyline.  
  (setq ss (ssget))
  (setq en (ssname ss 0))
  (setq ed (entget en))
  (setq p1 (cdr (assoc 10 ed)))
  (setq p2 (mapcar '+ p1 '(0 0 0.1)))
  (command "_extrude" en "" "T" 25.0 p2 "")
)

 

leeminardi_0-1649535491639.png

lee.minardi
0 Likes