We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

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

Desctivating a cutplane from 2D script

Nader Belal
Mentor
Hi there,

I´m creating a complex object that is being controlled by a myriad of parameters and conditions ... to which I have used cutplane and project2{4} to generate it's cut view in plan.

So I tried to generate an elevation view on plane of the object using project2 (along side the plan cut), and as expected , the elevation view on plan was presented with a cut.

Can anyone of you tell me how to bypass this bummer ?
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
Nader Belal
Mentor
@Lingwisyer & @Barry Kelly

I think I have just found the solution , that can by pass my problem, but it's not optimised although it will work perfectly.

This solution needs a little bit of imagination.

Solution:
  • First, create 2 groups, one for the object in it upright position "object_untrimmed", and the other for the cutting plane & the previous defined group "object_trimmed"; all at the top of the "3D Script".
  • Second, always place the group "object_trimmed", that way you will always get the correct cut plan representation in plans.
  • Third, create a parameter for activating elevation on plan.
  • Fourth, in the "3D Script" create an "if" condition that will place the "object_untrimmed" rotated around one of the X or Y or Z axis.
    That way you will always use the same "PROJECT2" (or one of its variants) for the same purpose view type.
  • Fifth, in case you need to modify the Elevation on plan in the 2D view, you will have to remember that you will have to control it in the "3D Script".
  • Sixth, don't forget to kill the groups.
Please if you have a better idea than this one, I will gladly hear/read it.
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.

View solution in original post

18 REPLIES 18
Lingwisyer
Guru
If GLOB_VIEW_TYPE = 2 THEN				!Plan view
	CUTPLANE 0, cutplane_height
endIf

Though, why are you using a cutplane? Project2{4} already creates cutplanes. If it is due to the object being a windows / doors instead of a "wall with openings" include:

If GLOB_VIEW_TYPE = 2 THEN				!Plan view
	Rotx 90
endIf

The cutplane in Project2{4} only works in the z-axis, so for doors and windows which are modelled in the x/y-axis, you need to rotate the object for the cutplanes to work. Rather annoying as you can choose a view type which is made redundant in this version due to the above fact....

generate an elevation view on plane of the object using project2 (along side the plan cut)

If you are talking about creating multiple views of your object in the floor plan, this should also fix that as then the cutplane is contained withing the projection rather than externally to it.



Ling.

AC22-23 AUS 7000Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win11 | i9 10850K | 64GB | RX6600 Win10 | R5 2600 | 16GB | GTX1660
Nader Belal
Mentor
I think I didn't make myself clear

I have already created the plan view using a cut (because I couldn't find the right combination of parameters values using project2{4} and with it, it will fit just nice).

I have already used the GLOB_VIEW_TYPE, but what I need/wish is to be able to deactivate the cutplane in the 2D script (or another trick that would have the same result) so that I the elevation representation on Plan, alongside with the cut plan view.

Anyway, the a trial that wasn't good enough, is to pass the 2D & 3D script that generate those view to the Master Script, but it didn't work as was planned, as the cutend messes things up in the plan view
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.
Barry Kelly
Moderator
If you want the cut plane active only in the plan view then
If GLOB_VIEW_TYPE = 2 THEN				!Plan view
	CUTPLANE 0, cutplane_height
endIf

... 3D model script ...

If GLOB_VIEW_TYPE = 2 THEN				!Plan view
	CUTEND
endIf

So this way both the cutplane and cutend will only activate in plan view.

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
Lingwisyer
Guru
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

add2 0, 0.05
PROJECT2 4, -90, 3

AC22-23 AUS 7000Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win11 | i9 10850K | 64GB | RX6600 Win10 | R5 2600 | 16GB | GTX1660
Nader Belal
Mentor
Using a cutplane in 3D script and the following code


project2{4}	3,	270,	0,	0,	1,		__h,

			3,	1+2+8,
			1,	1,	1,	0.0,	0.0,	0.0,	1,	1,
			1,	1,	1,	0.0,	0.0,	0.0,	1,	1,

			3,	1+2+4+8,
			1,	1,	1,	0.0,	0.0,	0.0,	1,	1,
			1,	1,	1,	0.0,	0.0,	0.0,	1,	1

And I get this result:
But without the cutplane and with the modifications of @Lingswisyer, I get the following result

project2{4}	3, 270,	0, 0,	1,		__h,
			3+64,	1+2+8+64,
			1,	1,	1,	0.0,	0.0,	0.0,	1,	1,
			1,	1,	1,	0.0,	0.0,	0.0,	1,	1,

			3+64,	1+2+4+8,
			1,	1,	1,	0.0,	0.0,	0.0,	1,	1,
			1,	1,	1,	0.0,	0.0,	0.0,	1,	1

So I need the a way to get the first result, without recurring to a cutplane.
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
Another thing that I tried to do is to create a condition in the 3D script that in some way should have forced to excute the 2D script twice.

Once for the cut plan view with cutplane, and the second with the elevation on plan without the cutplane.

And I have failed .
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
Did you include this at the start of your 3D script?

If GLOB_VIEW_TYPE = 2 THEN				!Plan view
	Rotx 90
endIf



Ling.

AC22-23 AUS 7000Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win11 | i9 10850K | 64GB | RX6600 Win10 | R5 2600 | 16GB | GTX1660
Nader Belal
Mentor
@Lingwisyer
rotating around the X-axis is not the solution, and yes I have already tried it out.
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
What is the object type?

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