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.