View Full Version : Drawing Steel Sections

Alex Morris
08 August 2003, 11:46 AM
OK lets see if anyone's here this time;)

This is where all that drawing stuff ended up. I'm still having fun with unpredictable errors in the drawing routine....looks like the weld thresholds although I can't seem to get consistent results.

But most of all I'd appreciate some help in organising the script and data better.........I'm not from a programming background. I'm thinking particularly of the use of structures for the sections, and getting these values out to the dialogue spinners.

I think there are still some issues with variable scope too

Also in terms of getting the script to be more useable I'd like to get some mouse input going.........maybe click and drag with the shape outline in place for custom section sizes?

This routine needs the avgdlx50 extension to work as it stands.
I've also assumed that units are set to metres (the section dimensions are in millimetres in the data).

Attached is the script and data files.......bitmaps to follow

Alex Morris
08 August 2003, 11:54 AM
Heres the first of the images zipped up (1 of 3)

Alex Morris
08 August 2003, 11:55 AM
heres the second

Alex Morris
08 August 2003, 11:57 AM
and heres the third (3 of 3)

Alex Morris
09 September 2003, 09:47 AM
OK, ok, its a bit of a rambling script.
I've now posted on the discreet forum due to lack of interest on this one:hmm:

Hasn't anyone got any comments?

09 September 2003, 04:29 PM
I'm looking at it, get back to you monday.

Keith Morrison

Alex Morris
09 September 2003, 04:54 PM
Thanks Keith,

Got a few suggestions from Swami on variable scope, and fixed a few other things in the meantime.

Here's the latest version of the script

I'm currently rejigging the interface and tidying up in general

09 September 2003, 05:24 PM
I just kicked it around for a bit too..

Here's MY version.. ha ha...

The globals have been removed by declaring eveything local within an over all () set.

the welding of verts so close is going to be an issue. having such a small threshold. check out. Splineops.weld()

I would rewrite the spline drawing function to draw a single line to begin with. Pass the node name along to each drawing segment and keep adding to segment 1, then use the close command after your last point.

Good luck...

Let me know when it's done, we build beams from time to time...

Keith Morrison

Alex Morris
09 September 2003, 03:51 PM
OK Keith,

After a weekend of fun, here's a totally revised (and working) interface, new drawing routine, and a few other goodies.

The main problem now is to create parametric versions of each section that can be scaled interactively in the viewport under the custom option.

09 September 2003, 06:37 PM
that all sounds interresting ..but it doesn't seems to work with viz4 (?)

--function to load values from a text file
fn load_values data_array textfilestring =
if data_array[1] != undefined do
(data_array = #())
opf = openfile textfilestring
while eof opf != true do

got " -- No ""eof"" function for undefined


ok, i got it now.. dL all files and extract all archives ..even if they are packed again.. thx.

it's sad that there is no way to add a shape to the bevel profile modifier with maxscript...

Alex Morris
09 September 2003, 04:45 PM
OK so 5 people have downloaded it......are 5 people using it, and if so are there any comments?

Is it useful? Are there any things that you think should change?
Any comments on the code would be welcome.

09 September 2003, 01:09 PM
My first suggestion: make it easier to install :p

I first got the problem seismograph explained so i tried his solution and added all the image and data files form the other packs, but now i get a "-- Unknow property "count" is undefined"

Maybe it's real simple if i knew maxscript but i seem to be one of the few non-scripters that enter this subforum (don't the other maxers understand that even though you can't script yourself you can get really helpful script from this subforum?)

09 September 2003, 09:07 PM
Hi Alex,
i think it can be a very very usefull script!

for the mouse code, go and dL the blindsscript from ... i made a little variation of that script here: ..but i forgot how the mouse code exactly works...

Alex Morris
09 September 2003, 02:30 PM
Sorry about the install guys. Unfortunately the upload size for the forum meant that I had to split up the files. I'll try and get everything in one zip file for the next release.

I think that I have now sorted the mouse side of things, but will check out that script - thanks seismo!

Things are getting a bit busy at work right now so it might take a few weeks for me to get all the parametric stuff done (the math!).

Any other code suggestions would be great.

CGTalk Moderation
01 January 2006, 01:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.