Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

6.0->8.1 Causes EXTRUDE Error

Anonymous
Not applicable
I bought an object that was written in 6.0, but it needed some modifications. AC informed me that it was going to update it to AC8.1R2, and now the extrusions don't work.

What is wrong with the following code?

PUT 0, wr/2, 0,
ld, wr/2, 0,
ld, lt+wr/2, 0,
lt, lt+wr/2, 0,
lt, ld+wr/2, 0,
0, ld+wr/2, 0,
0, wr/2, 0
ROTy 90-jang
ROTz tilt
ADDz -seat
EXTRUDE nsp/3,0,0,tchord,55,USE(nsp)
MULy -1
EXTRUDE nsp/3,0,0,tchord,55,USE(nsp)
DEL 2
ADD jd,0,(vst/2)-ld
MULx -1
EXTRUDE nsp/3,0,0,bchord,55,USE(nsp)
MULy -1
EXTRUDE nsp/3,0,0,bchord,55,USE(nsp)
DEL 2
ADDz ld
ROTy -90
3 REPLIES 3
Anonymous
Not applicable
Jay wrote:
What is wrong with the following code?
I Have not found any problem (AC8.1)!

CU mirco
Daniel Lindahl
Contributor
Jay wrote:
I bought an object that was written in 6.0....now the extrusions don't work.

What is wrong with the following code?....
Jay

I recognize that code!

I started working on your code until I realised it's a joist, then I opened up my Open Web Joist object that I have been selling on Objects Online for a few years now. That's when I discovered the code was mine!

In answer to what's wrong, the joist is made up of equal angles, so the "ld" parameter refers to leg dimensions of the angle iron. "lt" refers to the metal thickness, and should always be much smaller than "ld".

If you mistakenly thought "lt" referred to the second leg of an unequal angle, and made it larger than "ld", the resulting polygon path for the extruded section will cross over itself, figure-8 fashion, and you will have problems.

You mentioned modifying the object. If you want unequal angles in the chords of the truss, define the the existing "ld" as "angle depth", and introduce the following new parameter:

"lw" and define it as "angle width"

then change the "PUT" statement as follows:

PUT 0, wr/2, 0,
ld, wr/2, 0,
ld, lt+wr/2, 0,
lt, lt+wr/2, 0,
lt, lw+wr/2, 0,
0, lw+wr/2, 0,
0, wr/2, 0

You might also want to change the definition of "lt" to "L-iron metal thickness" to clarify what this parameter is for.

Hope this sorts out your problem!
cheers
Daniel
-------------------------------------
Daniel Lindahl Architecture
AC24 | Dell Inspiron 16+ | Windows 11
Karl Ottenstein
Moderator
Daniel wrote:
That's when I discovered the code was mine!

In answer to what's wrong, the joist is made up of equal angles, so the "ld" parameter refers to leg dimensions of the angle iron. "lt" refers to the metal thickness, and should always be much smaller than "ld".
Perhaps you could post a 'fix' for Jay and others that includes appropriate IF statements to error-check the parameter values to prevent any AC error messages or distorted geometry? 😉

Karl
One of the forum moderators
AC 28 USA and earlier   •   macOS Sequoia 15.2, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB