cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Learn to manage BIM workflows and create professional Archicad templates with the BIM Manager Program.

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

Solid Element Operations in GDL

Barry Kelly
Moderator
Is it possible to exclude part of a GDL object from being trimmed by a Solid Element Operation?

I have two profiled capping objects that overlap in a coner.
I want to use SEO to trim each one from the other (shame we don't have an extrude sideways - that would solve everything).

An SEO on its own won't work because of the shape of the profile.
So I have sripted in a false prism (or extrusion) to fill the shape of the recess.
This is only active when an SEO operation is invoked.

if GLOB_CONTEXT > 40 and GLOB_CONTEXT < 50 then
EXTRUDE 5, 0, Hgt_Dff, a, 1+2+4+16+32+mask_cap,
-0.0005, -0.1795, 0,
0.0045, -0.1708397459622, 0,
0.0045, -0.08316025403784, 0,
-0.0005, -0.0745, 0,
-0.0005, -0.1795, -1
endif


Great, I can subract the first object from the second.
But when I want to subtract the second object from the first I can't as the prism (or extrude in my case) has been cut as well and no longer works as an operator.

Is there a way of excluding an element in GDL so it is imune from actually being trimmed by an SEO?

Barry.

SEO_trim.jpg
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
9 REPLIES 9
ztaskai
Graphisoft Alumni
Graphisoft Alumni
For cutting in SEO, you can use solid bodies only. On the other hand, you have CUTFORM in GDL which is faster and easy to use for simple polygon-based cuts like yours.

Regs,
Zsolt Táskai
ArchiCAD Development - GDL Team
AC13, AC14 and upwards...
Anonymous
Not applicable
Confused here. I think you're saying you have two extruded objects you want to trim. Can't you perform your SEO on both simultaneously? This seems like a natural for a complex profile. A complex profile would turn the corner without the extra bit you're trying to trim.
For cutting in SEO, you can use solid bodies only.
Isn't extrude a solid body?
Barry Kelly
Moderator
You can't see it from the image but these are two separate objects.
One is a barge capping that runs up the side of a roof (inclined) and the other is a skillion capping that runs along the back of the roof horizontally but the top and bottom (can't see that in the image) surfaces angle to suit the roof pitch.
There is actually a third fascia object that sits under the low horizontal (gutter) side of the roof.

So using an extruded complex profile won't work.
SEOs don't work either because we can only subtract or subtract with upwards/downwards extrusion. None of these are suitable because of the profile shape - subract sideways will be perfect!
So I have resorted to adding a prism the shape of the recess that only becomes real when the object is used in an SEO - ie the GLOB_CONTEXT = 43 for an SEO operator in 3D view.

Now the thing is the first object can be successfuly subtracted from the second and looks great. But when I want to cut the second from the first I can't because the second one has been trimmed and there is no overlap to trim from the first object.
That is why I would like to be able to make part of the script impervious to SEOs. ie the invisible prism that only works in an SEO. It only turns up when an SEO is invoked and you can't see it at any other time but I don't want it trimmed by the SEO

I probably haven't explained myself very well.
I will see if I can add a setting or two to my objects so you can see what I mean and I will post them here.

Barry.
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Barry Kelly
Moderator
ztaskai wrote:
For cutting in SEO, you can use solid bodies only. On the other hand, you have CUTFORM in GDL which is faster and easy to use for simple polygon-based cuts like yours.

Regs,
These objects are solid bodies so that is fine.
I could use a cutform but the two objects can be different profiles and raking at different angles.
So a cutform in one object won't know what the shape and angle of the second object is.

The GLOB_CONTEXT = 43 recognises that the object is being used as an operator in an SEO and so turns on my trimming prism and subtracts it from the other object.
The thing is the other object is the target so technically the trimming prism in the script is ignored and not modeled but it still gets cut.
So when I try the revers and subratct the second from the first the here is no prism to do the trimming.

barry.
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Barry Kelly
Moderator
Here are the objects if you want to play with them.
It is not elegent scripting but it does the job.

Create a rectanguar roof plane with a slope of 8 degrees (it can be any pitch but you will need to alter the objects to suit.
Place the barge on the raking side (front side to the outside of the roof) - use gravity to snap to the low end of the rake.
Stretch the other end to the high end of the roof once you have placed it.

Place the skillion capping on the high end of the roof (again with gravity).
They should meet at the corner - stretch if not.


There is a parameter called "Show cutting prism" that will turn on the prism that fills in the recess for the cutting - turn it off again as it is just to show the prism so you can see what I a talking about.

There is also a parameter called "Use SEO prism". This is off by default so you can see what happens if you try to SEO the two objects.
Now turn this parameter on and you wil see how one trims but the other doesn't.

Barry.
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
ztaskai
Graphisoft Alumni
Graphisoft Alumni
OK, I see. I thought it was about the SEO commands of GDL. But we are in ArchiCAD between objects. OK.

It was a good try to use the forties interval of the GLOB_CONTEXT. In this case it doesn't help, of course. I'm afraid there is only one possibility here: to define an ending angle parameter for the elements and to the joints manually:( At least, that's what we do in the AC Library.

Regs,
Zsolt Táskai
ArchiCAD Development - GDL Team
AC13, AC14 and upwards...
Anonymous
Not applicable
Mitering the end of each element with a 45º angle might work well enough with an 8º pitch.

Another strategy might be to duplicate the second element element. Now you have Objects A and B and B duplicate. A cuts B. B duplicate cuts A. Put B duplicate in a hidden layer. I have a layer dedicated to this sort of thing.
Barry Kelly
Moderator
There is a mitre built in to the objects and it works OK but does leave tiny remnants where the profiles don't match perfectly.
The more the pitch changes the worse it gets.

having a second hidden duplicate object seems to be the only way to get to work at the moment.


It would be great if what was concealed within the "if GLOB_CONTEXT = 43 ..... "routine was ignored when the object was not being used as an SEO operator (ie it was the target).
It kind if is ignored now as it doesn't display in 3D but still manages to be trimmed by the other operator object.

Barry.
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Anonymous
Not applicable
I expected the miter would get worse as the pitch gets steeper making the cut more complicated.

A couple more global variables defining the operator and the subject would be useful for your situation.