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

Unclear script of project2{4}

Nader Belal
Mentor
Hi everyone,

I was investigating project2{4} using the downloadable example supplied by Graphisoft in this page.

So by simple editing of the original script

for i = 1 to iCutPlanes
	put cutElevation + (i-1) * sliceHeight
next i


for i = 0 to iCutPlanes
	put 1+32,				! method
		2,					! parts
		1,					! cutFillIndex
		1,					! cutFillFgPen
		1,					! cutFillBgPen
		0.0,				! cutFillOrigoX
		0.0,				! cutFillOrigoY
		0.0,				! cutFillDirection
		1,					! cutLinePen
		1,					! cutLineType
		1,					! projectedFillIndex
		1,					! projectedFillFgPen
		1,					! projectedFillBgPen
		0.0,				! projectedFillOrigoX
		0.0,				! projectedFillOrigoY
		0.0,				! projectedFillDirection
		1,					! projectedLinePen
		1					! projectedLineType
next i


project2{4} 3, 270,						
	0,					! useTransparency	
	0,					! statusParts		
	iCutPlanes,			! numCutplanes		
	get (nsp)

It will provide this result in the 2D view

But when I reedit the script in the following way

project2{4} 3, 270,						
	0,					! useTransparency	
	0,					! statusParts		
	1,			! numCutplanes		
	5000,

1+32,				! method
			2,					! parts
			1,					! cutFillIndex
			1,					! cutFillFgPen
			1,					! cutFillBgPen
			0.0,				! cutFillOrigoX
			0.0,				! cutFillOrigoY
			0.0,				! cutFillDirection
			1,					! cutLinePen
			1,					! cutLineType
			1,					! projectedFillIndex
			1,					! projectedFillFgPen
			1,					! projectedFillBgPen
			0.0,				! projectedFillOrigoX
			0.0,				! projectedFillOrigoY
			0.0,				! projectedFillDirection
			1,					! projectedLinePen
			1,					! projectedLineType

1+32,				! method
			2,					! parts
			1,					! cutFillIndex
			1,					! cutFillFgPen
			1,					! cutFillBgPen
			0.0,				! cutFillOrigoX
			0.0,				! cutFillOrigoY
			0.0,				! cutFillDirection
			1,					! cutLinePen
			1,					! cutLineType
			1,					! projectedFillIndex
			1,					! projectedFillFgPen
			1,					! projectedFillBgPen
			0.0,				! projectedFillOrigoX
			0.0,				! projectedFillOrigoY
			0.0,				! projectedFillDirection
			1,					! projectedLinePen
			1					! projectedLineType
It simply doesn't work, the 2D space is empty.

Can someone explain me how to make this work ??
A good friend of mine have once told me that I´m so brute that I´m capable of creating a GDL script capable of creating GDLs.
1 ACCEPTED SOLUTION

Accepted Solutions
Solution
Lingwisyer
Guru
Your cuts are through a vertical surface so the shading is covering up the lower cuts which does not happen with wireframe?

AC22-23 AUS 7000Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win10 | R5 2600 | 16GB | GTX1660 

View solution in original post

12 REPLIES 12
Nader Belal
Mentor
Ok, I have narrowed the problem to one parameter ...

Why do I need the to use parameter buffer for "cutElevation" Parameter ???
A good friend of mine have once told me that I´m so brute that I´m capable of creating a GDL script capable of creating GDLs.
Lingwisyer
Guru
Works fine for me without using a buffer.

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

*From my own object.



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 
Lingwisyer
Guru
I tried out the example object and I cannot seem to get it to work either...



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 
Nader Belal
Mentor
I have been toying around the values of the parameters, and here what I have found:

*PS: To make it simple lets just assume you work with only one cut surface

1- Method works fine only when you use the same for the cut and uncut parts. This doesn't apply for methods (16 -> 8192)

2- Parts can prove itself a little bit tricky but not that much.

3- The most difficult part is to get the right combination between Methods a Parts, as not all will be the one you need.
A good friend of mine have once told me that I´m so brute that I´m capable of creating a GDL script capable of creating GDLs.
Nader Belal
Mentor
@Lingwisyer

Anyway I have took the script to an object that I´m working on, stripped it from "32" method. It worked.

The problem that I have now, that the object I´m working on have openings that can change in type, size or location, so in the wire frame mode to works perfectly but in the coloured mode, I just can't make it work
A good friend of mine have once told me that I´m so brute that I´m capable of creating a GDL script capable of creating GDLs.
Solution
Lingwisyer
Guru
Your cuts are through a vertical surface so the shading is covering up the lower cuts which does not happen with wireframe?

AC22-23 AUS 7000Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win10 | R5 2600 | 16GB | GTX1660 
Nader Belal
Mentor
Thanks
A good friend of mine have once told me that I´m so brute that I´m capable of creating a GDL script capable of creating GDLs.
Lingwisyer
Guru
Could you include an "If glob_view_type = 2" statement near the start of your script that will set all of your openings to the same height when viewed in plan? In this way you can cut them all with a single cutplane. No need to worry about overlapping shadings either.



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 
Nader Belal
Mentor
Thanks a lot,

I was going to write to you the same answer right now, before seeing your question.

Is GDL is enhancing our telepathic abilities ???
A good friend of mine have once told me that I´m so brute that I´m capable of creating a GDL script capable of creating GDLs.

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!