TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: like_citrus on March 31, 2023, 07:03:10 AM

Title: Draw structural beam with lisp
Post by: like_citrus on March 31, 2023, 07:03:10 AM
I wanted to draw a structural beam section using code.

1. INPUT: Depth, Width flange, Flange thickness, Web thickness, Root radius.
2. Pick point to place in drawing.
3. Section view. If possible Plan and Elevation view.

Is there something available?

The following is similar but much more advanced.
https://blog.draftsperson.net/wiseys-steel-shapes-lisp-program/ (https://blog.draftsperson.net/wiseys-steel-shapes-lisp-program/)
http://assetdrafting.com.au/lisp.htm (http://assetdrafting.com.au/lisp.htm)
https://www.afralisp.net/archive/lispa/lisp3.htm (https://www.afralisp.net/archive/lispa/lisp3.htm)
Title: Re: Draw structural beam with lisp
Post by: 57gmc on March 31, 2023, 10:48:30 AM
I wouldn't go down the programming route. I would recommend solid modeling. There's plenty of other options. The first and simplest is a block library. It could even be dynamic or parametric. But if you deal with steel a lot, I would use a product that provides steel shapes. You could then just place a section view of a solid. Plant 3D and Inventor come to mind. Advance Steel comes with the AEC collection.

I see that the first program you linked to can generate a solid. Use that app then section the solid using the  VIEWBASE command.
Title: Re: Draw structural beam with lisp
Post by: CAB on March 31, 2023, 12:23:48 PM
Here is an Old thread:https://www.theswamp.org/index.php?topic=47517.15
If you do a lot of it you should get a Steel add-on or a Mechanical version of CAD.https://www.youtube.com/watch?v=j4JElDtyuCk


Title: Re: Draw structural beam with lisp
Post by: like_citrus on March 31, 2023, 10:10:33 PM
Thanks for the responses.

I don't have the option of solid modelling or custom libraries/add-ons.

I'm dealing with a lot of old sections which are from the 1970s, at the moment.

I was thinking lisp is the way to go.
I think it can be done with a script file, but the issue is that I need to pick a point to insert in the current drawing, which  I don't think can be done with a script file, but I could be wrong.
Title: Re: Draw structural beam with lisp
Post by: danAllen on March 31, 2023, 10:22:44 PM
Either what CAB posted or Al's Steel Mill lisp is the easy way to go. If you have data for shapes that are not listed it would be easier to just convert the data to the same format as Al's lisp uses. No reason to reinvent the wheel...

https://blog.draftsperson.net/al-rogers-steel-mill/

(EDIT - realized I didn't look at first links. Looks there is both Al's and Wisey's. Not sure the provenance or what is most current, but above comment still applies, just edit the data.)

("W44x285" 44.02  1.025  11.81  1.77   2.6875)
("W44x248" 43.62  0.865  11.81  1.575  2.5)
("W44x224" 43.31  0.785  11.81  1.415  2.3125)
("W44x198" 42.91  0.71   11.81  1.22   2.125)
Title: Re: Draw structural beam with lisp
Post by: BIGAL on April 01, 2023, 12:43:52 AM
Do you want hundreds of steel shapes then use Wiseys Steel shapes. Its all coded for you has dcl front ends.

You can even add your own shapes if not in the library of shapes already defined.

Another is look at "Strucplus" does more than just sections.

Title: Re: Draw structural beam with lisp
Post by: like_citrus on April 01, 2023, 01:17:14 AM
Thanks, it may be I have to do that.

There is something in Wisey's Steel Shapes for the input method, see attached.
I've interrogated the code but haven't figured out yet how it was done and how it could be modified for an I beam.
Title: Re: Draw structural beam with lisp
Post by: 57gmc on April 01, 2023, 01:13:27 PM
You've selected a channel. That's all you can make. You can only change the dimensions. Select a W for wide flange I beam. I'm not familiar with Australian classifications. Anyway, you need to learn the standard for how the various shapes are designated. Just do a internet search for "American steel shapes" or "Australian steel shapes".
Title: Re: Draw structural beam with lisp
Post by: danAllen on April 01, 2023, 05:04:56 PM
In my older Al Roger's steel lisp, which Wisey's modified, I opened the Open Stl_W.dim file to see the data for a wide flange (I beam), and an example is below. Underneath I've added the corresponding data type from my steel manual.

("W12x35"  12.5   0.3     6.56  0.52   1)
(          d      tw      bf    tf     ?)


I don't know what the "1" is for, but quick trial and error should show you.

Just add lines for the shape you want to add.



Title: Re: Draw structural beam with lisp
Post by: BIGAL on April 01, 2023, 09:37:42 PM
When I did structural here in AUS a UB is a Universal beam a UC is a Universal Column, a "I" beam does not exist unless it a company product just like Dogbone steel beams yes that was their name. There is definitely AUS standards for steel sections.

Title: Re: Draw structural beam with lisp
Post by: like_citrus on April 01, 2023, 10:58:30 PM
Thanks for responses.

Quote
You've selected a channel. That's all you can make.
I was trying to suggest that it may be possible for an I beam. Could not find the relevant code though.

Quote
Just add lines for the shape you want to add.
I understand this will be easier and will probably have to do this.
Title: Re: Draw structural beam with lisp
Post by: BIGAL on April 02, 2023, 05:46:25 AM
In the suggested programs there are data files just open 1 up and have a look can make your own.
Title: Re: Draw structural beam with lisp
Post by: 57gmc on April 02, 2023, 05:40:37 PM
If you are going to select one, the first app you showed shouldn't make you enter in all the variables. There are standard sizes. You should just be able to select a 150x75 UB, like the first one in BigAl's picture. If you want something free, the first place I would check is download the Plant3D toolset (https://www.autodesk.com/products/autocad/included-toolsets/autocad-plant-3d). It comes with a lot of 3D content and is free to AutoCAD subcribers.

I took another look at that website and their screenshots show that you can select the UB or UC category and then select a standard size.
Title: Re: Draw structural beam with lisp
Post by: like_citrus on April 02, 2023, 11:27:09 PM
Thanks 57gmc, what I'm trying to say is that I want to draw by entering the data.
Title: Re: Draw structural beam with lisp
Post by: danAllen on April 03, 2023, 11:56:13 AM
It doesn't seem like there is a ready made solution to provide a dialog where the beam data is entered manually. I think this is because if you had to do this repeatedly for multiple shapes, it is faster to put the data in a file, or convert from another data format such as excel. And for just rare single instances, the work to make the dialog and lisp isn't worth the effort vs just manually modifying a block.
Title: Re: Draw structural beam with lisp
Post by: like_citrus on April 03, 2023, 11:10:45 PM
OK thanks for confirming.
Title: Re: Draw structural beam with lisp
Post by: BIGAL on April 04, 2023, 05:39:47 AM
You could make a dynamic block then set values, the only way to get a USER "I" beam is by welding plate together. I have seen beams with angles welded to them but again 2 parts of off the shelf beams.
Title: Re: Draw structural beam with lisp
Post by: catoscuro on April 09, 2023, 06:55:51 PM
Yo uso este block dinamico, lo puedes modificar en la tabla de dimensiones