GDL
About building parametric objects with GDL.

Automatically generate '2d Symbol' from shape of GDL object.

Anonymous
Not applicable
Is it possible to have a '2D Symbol' automatically generated from the shape of a GDL object that was created from written code (not created from the "Save Selection as..." command)?
11 REPLIES 11
Joachim Suehlo
Advisor
The simpliest way is to use the following line:
PROJECT2 3, 270, 2
I hope, that this is what you meant.
The rest of the script can be commented (with ! at the beginning of each line)
Joachim Suehlo . AC12-27 . MAC OSX 13.5 . WIN11
GDL object creation: b-prisma.de
Anonymous
Not applicable
Thanks. That does do what I asked but I should have been more specific. The object I'm creating is a window. I need the '2d Symbol' to be cutting through the object like a section but in plan.
Lingwisyer
Guru
https://archicad-talk.graphisoft.com/viewtopic.php?f=6&t=62584&start=10

PROJECT2{4} 3, -90,										!projection_code, angle,
	0, 1+2,												!useTransparency, statusParts,		
	1,													!numCutplanes,
	gs_fw_lower + gs_int_fw + 2*gs_louvre_width,		!cutplaneHeight1, ..., cutplaneHeightn,

	3+32, 1+2+4+8+64,									!method1, parts1,
	gs_fill_type,										!cutFillIndex1,
	gs_fill_pen, gs_back_pen,							!cutFillFgPen1, cutFillBgPen1,
	0, 0, 0,											!cutFillOrigoX1, cutFillOrigoY1, cutFillDirection1,
	gs_cut_pen,	1,										!cutLinePen1, cutLineType1,
	65,													!projectedFillIndex1,
	19, 19,												!projectedFillFgPen1, projectedFillBgPen1,
	0, 0, 0,											!projectedFillOrigoX1, projectedFillOrigoY1, projectedFillDirection1,
	gs_pen_2D, 1,										!projectedLinePen1, projectedLineType1

	4+64, 1+2,											!method1, parts1,
	gs_fill_type,										!cutFillIndex1,
	gs_fill_pen, gs_back_pen,							!cutFillFgPen1, cutFillBgPen1,
	0, 0, 0,											!cutFillOrigoX1, cutFillOrigoY1, cutFillDirection1,
	gs_cut_pen,	4,										!cutLinePen1, cutLineType1,
	65,													!projectedFillIndex1,
	19, 19,												!projectedFillFgPen1, projectedFillBgPen1,
	0, 0, 0,											!projectedFillOrigoX1, projectedFillOrigoY1, projectedFillDirection1,
	gs_pen_2D, 4										!projectedLinePen1, projectedLineType1

This post should probably be moved to the GDL thread.




Ling.

AC22-23 AUS 7000Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win10 | R5 2600 | 16GB | GTX1660 
Anonymous
Not applicable
I pasted your code into the 2d script area but there is still nothing showing up in plan, are there any other steps I need to take?

How do I move this post to the GDL thread?
Karl Ottenstein
Moderator
[Topic moved by moderator]
One of the forum moderators
AC 27 USA and earlier   •   macOS Ventura 13.6.6, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB
Anonymous
Not applicable
Not sure what changed but it is working now, thanks. It's not yet doing exactly what i need, but I will play with it for a bit and see what I get.
Anonymous
Not applicable
Lingwisyer, the code you posted only shows up as a single line in plan, see image below.
Lingwisyer
Guru
	gs_fw_lower + gs_int_fw + 2*gs_louvre_width,		!cutplaneHeight1, ..., cutplaneHeightn,

You will need to change those parameters to a cut height that works for you.

Also, since your object is a window, you will need to add a line to your code that rotates it when in plan view as the axis rotation is different between walls and doors / windows.

IF GLOB_VIEW_TYPE = 2 then				!Plan view
	ROTx 90
ENDIF

See the link in my previous post.



Ling.

AC22-23 AUS 7000Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win10 | R5 2600 | 16GB | GTX1660 
Anonymous
Not applicable
That worked great. Thanks.

Is there anyway to only see the cut line and not the rest of the object beyond the cut line?

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!