GDL
About building parametric objects with GDL.
SOLVED!

project2{4}

Paalanen
Booster

Hello everybody!

project2{4} again, sorry: Seems I cannot avoid the projected filltype overriding the cut filltype. I.e. I can't control the two fills separately, as I can the pens:

methodx=3+32+512
partsi=1+2+4+8



project2{4} 4, 0,
0, 0,
0,
methodx, partsi,
12, ! cut fill
1, 0,
0, 0, -SYMB_ROTANGLE,
cutPen, SYMB_LINETYPE, ! cutLinePen, cutLineType

0, ! projected fill overrides cut fill !!!
0, 0,
0, 0, 0,
projectPen, SYMB_LINETYPE, ! projectedLinePen, projectedLineType



Any comments appreciated!

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

Yes, it can be called a bug.

If there are no other cut lines in your projection, you can use flag 32 in the method parameter to override the cut line attributes.

https://gdl.Graphisoft.com/tips-and-tricks/explore-the-project23-command

Péter Baksa
Software Engineer, Library as a Platform
Graphisoft SE, Budapest

View solution in original post

16 REPLIES 16
Peter Baksa
Graphisoft
Graphisoft

Hi Paalanen,

 

This is how it works, from AC20 project2{4} and project2{3} the attributes of the cut polygons are defined by the cover fill of the outer surfaces (in case the addition modifier 32 is not set).

 

There is a rather complicated workaround:
– each piece of the model that has the same building material can be projected using project2{3} ... parameters to model only that part, fills overridden with the attributes from a “Building_Material_info” request.
– the visible and overhead parts have to be projected in a separate call, they show correctly only with a full model.
For an example see “CWFrameRegDouble” macro.

Péter Baksa
Software Engineer, Library as a Platform
Graphisoft SE, Budapest
Paalanen
Booster

Thank you very much. I'll take a look at the macro.


Paalanen
Booster

Péter, is it so, that the (possible) parameters at the end of project2-commands cannot be arrays?

If you mean the PARAMETERS passed to the library part, they can, if they are array parameters in the object.

Péter Baksa
Software Engineer, Library as a Platform
Graphisoft SE, Budapest
Paalanen
Booster

Thank you very much for your reply. Below's what I mean. The commented "basic" parameters work just fine. But a corresponding array-parameter-attempt gives the error "Missing parameter value". Any thoughts?

 

project2{4} 3, 0,
0, 0,
1,
leikk[1], !-Cut height

methodx, partsi,
1, !---Fill
2, 0, !---FillPen, FillBgPen
0, 0, -SYMB_ROTANGLE,
21, 1, !---cutLinePen, cutLineType
0, !---Fill
19, 0, !---FillPen, FillBgPen
0, 0, 0,
1, 1, !---projectedLinePen, projectedLineType

0, 0,
1, !---Fill
1, 1, !---FillPen, FillBgPen
0, 0, -SYMB_ROTANGLE,
1, 1, !---cutLinePen, cutLineType
1, !---Fill
1, 1, !---FillPen, FillBgPen
0, 0, 0,
1, 1, !---projectedLinePen, projectedLineType

! parameters test1 = 1,
! test2 = 0

parameters test[1] = 1,
test[2] = 0

Only whole arrays can be passed:

 

dim _test[] ! using underscrore to keep original test parameter's values in the rest of the script
_test[1] = 1
_test[2] = 0
project2{4} ... parameters test = _test

 

Péter Baksa
Software Engineer, Library as a Platform
Graphisoft SE, Budapest
Paalanen
Booster

Ah, beautiful! Köszönöm szépen!

Paalanen
Booster


Hello Péter,

Been working with the project2{4} command quite successfully until now. Holes using cutform punched into my projected prism are projected as cut shapes instead of projections. Tried and failed fiddling with the status and mask codes.

Attaching a screenshot of a prism projected from the front - The circles are "cutforms", the left one is an infinite cut (status 1+8+16) and the right semi-infinite (status 1+16). The correctly projected rectangular opening is defined in the prism itself.

Would be super greatful for some guidance once again.


image.png

What is your code for this?

Péter Baksa
Software Engineer, Library as a Platform
Graphisoft SE, Budapest

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!