License delivery maintenance is planned for Saturday, July 26, between 12:00 and 20:00 CEST. During this time, you may experience outages or limited availability across our services, including BIMcloud SaaS, License Delivery, Graphisoft ID (for customer and company management), Graphisoft Store, and BIMx Web Viewer. More details…

GDL
About building parametric objects with GDL.
SOLVED!

Avoid unification of materials in GDL

zunino
Contributor

Is it possible to prevent elements of the same material from being unified in the cut? I am developing a GDL object for carpentry, and I would like to avoid this unification. Here is an example image:

Bancada.jpg

 

1 ACCEPTED SOLUTION

Accepted Solutions
Solution
Barry Kelly
Moderator

Two ways I can think of to control it.

 

One is to use SECT_FILL before each PRISM (or 3D shape) with the same but different fills.

By that I mean you need similar fills as different attributes - i.e. empty fill, air space, 0%.

The same fill but just duplicated with a different name.

 

Two is to use BODY 4 after the 3D shape.

This will force it to be a surface when the body is cut, but you lose the fill if that is important to you.

 

BarryKelly_0-1748411110688.png

 

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

View solution in original post

7 REPLIES 7
Lingwisyer
Guru

You might be able to cheese it with Planes which are only active when the View is a Section using GLOB_VIEW_TYPE? So while the cabinetry will merge, you will have a cut line of your secondary material that you assigned to the plane.

 

Ling.

AC22-28 AUS 3110Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win11 | i9 10850K | 64GB | RX6600 Win11 | R5 2600 | 16GB | GTX1660
Solution
Barry Kelly
Moderator

Two ways I can think of to control it.

 

One is to use SECT_FILL before each PRISM (or 3D shape) with the same but different fills.

By that I mean you need similar fills as different attributes - i.e. empty fill, air space, 0%.

The same fill but just duplicated with a different name.

 

Two is to use BODY 4 after the 3D shape.

This will force it to be a surface when the body is cut, but you lose the fill if that is important to you.

 

BarryKelly_0-1748411110688.png

 

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
Dave Seabury
Advocate

I get around this issue by setting up a loop, modeling the object first as SOLID and then as WIRE

 

FOR m=1 TO 2
    IF m=1 THEN
        MODEL SOLID
    ENDIF
    IF m=2 THEN
        MODEL WIRE
    ENDIF
    "your script"
NEXT m
END

 

David

AC 19-26 Windows 10 64 bit, Dell Prercision 7820, Xeon Silver 2414R ( 12 Cores), 64 GB Ram, Quadro RTX 4000 8GB
Thank you for your reply.

However, I am new to GDL, could you explain better what the code would be like using GLOB_VIEW_TYPE?

GLOB_VIEW_TYPE is used to control what is happening in a given view

sense you are trying to control the section view you would use 

 

IF GLOB_VIEW_TYPE = 4 

 

I haven't used Planes as Lingwisyer has suggested, he might be a 

able to explain that better.

 

AC 19-26 Windows 10 64 bit, Dell Prercision 7820, Xeon Silver 2414R ( 12 Cores), 64 GB Ram, Quadro RTX 4000 8GB

Solved. Your tip was perfect. I used SECT_FILL before each PRISM, with similar fills, but with different attributes. After understanding the dynamics of the command, it is easy to control the views in the cuts

bancada1.jpg

bancada2.jpg

 

I have not tried it before, I would create a Plane with the material Air at each joint. The verticies can all just be copied from those of your panels. In that way, when you take a section of your cabinetry, while the timber may get merged due to a common SECT_FILL or MATERIAL, you should still get a cut line for the Plane. Ideally you would include a GLOB_VIEW_TYPE before you generate these planes so that they are not drawn on 3D as intersecting faces often creates odd artifacts which may impact performance in addition to the increased poly count.

 

Regarding the  SECT_FILL solution, could you DEFINE the duplicate fills in-script to avoid filling your template with junk?

 

Ling.

AC22-28 AUS 3110Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win11 | i9 10850K | 64GB | RX6600 Win11 | R5 2600 | 16GB | GTX1660

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!