The add-on LabPP_GoodwinGDL was created to enhance the capabilities of ARCHICAD when managing BIM objects.
For example, you create a GLD BIM object that has rules for pricing, cover options, and so on.
But this object must be laid on the floor in a certain form.
For example, laminate.
On one board this is inconvenient and how to cut the boards?
If you create a site, how to set its shape? How to make cutouts, where there is no laminate?
It seems reasonable such algorithm:
The user draws a 2d hatching element. It is possible with cut-outs.
Put your project in the project.
Selects both the hatch and the object.
Presses the LabPP_GoodwinGDL button and the hatch coordinates are translated directly into the parameters of your object.
Your object is to draw a shape using 3d and 2d scripts.

Here is an example of a BIM GDL object created on the basis of hatching technology.
This is a frame. First, a hatch of arbitrary shape is created on the cut.
Then the frame object is selected simultaneously with this hatching.
By clicking the LabPP_GoodwinGDL button, the coordinates of the hatch boundaries are written to the parameters of the object.
The object plays this form. You do not need to create a new object.
If desired, you can restore the hatching in the shape of the frame. Make the changes and re-record the frame.
So you can create a framework of completely arbitrary form. The length of the baguette is also considered.

Create section ARCHICAD      Hatching is drawn on the section BIM GDL object of arbitrary shape
For add-ons to work with your object, you need to create parameters with the appropriate names.
(you can take as a basis the object that is available in the distribution).

The GoodwinGDLAssignDataMethods parameter

This is a numeric array.
In fact, the table.
In the first column, the number of the LabPP_GoodwinGDL button.
In the second column - the number of the algorithm by which your object will be filled with data when this button is pressed.
In the third column is a mask to execute the algorithm. Specifies the type of masks in GDL as the sum of 1 * j1 + 2 * j2 + 4 * j3 + 8 * j4, etc., where j1, j2, ..., jn are options when the algorithm is executed.
You can specify more than one button.
The button numbers are shown in the figure below.

Button description of the LabPP_GoodwinGDL

The remaining parameters are used to record the results of operations.
For different algorithms and buttons, these parameters can be different.


The basic scenario for this button is this.
The user draws a hatch.
It is possible with cut-outs.
Put your object into the project.
Selects the hatch and the object.
Press the 1 button.
The program LabPP_GoodwinGDL writes the hatching data to the object in accordance with the selected algorithm, which you specified in the array GoodwinGDLAssignDataMethods for the button 1.

Algorithm No. 1

The data is prepared for direct use of the hatching coordinates in the GDL command of EXTRUDE.
Coordinates in the correct form will be written to the GoodwinGDLPoints array.
The number of coordinates will be recorded in the GoodwinGDLPointsCount parameter.
If you create the following variables in the object, then they will be written quantitative indicators:
GoodwinGDLSurface - the surface area (already without cut-outs),
GoodwinGDLHolesSurface - the area of cuts,
GoodwinGDLPerimeter - perimeter (along with the perimeters of the cutouts),
GoodwinGDLHolesPerimeter - perimeter of cutouts.

Here such a fragment of the 3d script will show the former shading in the form of a three-dimensional object.

define texture "owntile" "texture_wood.jpg",1,1,256,GoodwinGDLAngle

define material "tilemat" 21,
0.7,0.7,1,
0.15,0.95,0,0.0,
0,0,
ind(fill,"fillAttribute_1"),1,
ind(texture,"owntile")
material tilemat
material tilemat

count = GoodwinGDLPointsCount
for i=1 to count
  PUT GoodwinGDLPoints[i][1],GoodwinGDLPoints[i][2],GoodwinGDLPoints[i][3]
next i
if count<>0 then
EXTRUDE count,0,0,0.04, 1+2+4+16+32,
    GET(NSP)
endif

Adjust the thickness of the object by changing the value of the variable thickness.

In a 2d object, you can display this as follows:

pen     penAttribute_1
fill fillAttribute_1
project2{2} 3,270,3+32+64, 0,0,0,360-GoodwinGDLAngle+90


Then if you specify a hatch type in the object - horizontal lines, then the direction of hatching will correspond to the direction.


The basic scenario for this button is this.
The user selects the object.
Press the button 2.
The program LabPP_GoodwinGDL prompts the user to specify the first point of the line segment, then the second.

Algorithm No. 1

Then calculates the slope angle of the segment.
The angle is measured from the direction down. The values range from -180 to 180 degrees. Clockwise - in plus, counterclockwise - in the negative.
The program then writes this angle in degrees to the object in the GoodwinGDLAngle parameter.