Use fill from surface in 2D-symbol?

Home Forums General discussions Use fill from surface in 2D-symbol?

This topic contains 9 replies, has 3 voices, and was last updated by  Mats Knutsson 5 months, 1 week ago.

  • Author
    Posts
  • #18697

    Mats Knutsson
    Participant

    Hi,
    As always I understand nothing. I scripted a simple floor drain and I can’t manage to get the fill orientation to follow the object instead of the global origin. I tried poly2{2} but couldn’t figure it out. I tried project2{2} but couldn’t figure that one out either. I just suck at this. Please help me with an example script. I lack examples intensely when it comes to the gdl documentation… or I’m just to stupid to understand.
    /Mats

  • #18699

    James Murray
    Participant

    POLY2_B{2} can do it. There are parameters for fill origin and angle. You need add 8 to the frame_fill to get it to respect the local origin.

    James M

  • #18700

    David Shorter44
    Participant

    hi Mats
    Just out of interest is the fill symbolic or a real representation of the grill pattern?

    ArchiCAD 4.1-22
    MacBook RetinaDisplay
    16Gb RAM 500Gb SSD
    BIMXdocs

    • #18701

      Mats Knutsson
      Participant

      A symbolic pattern. Should be diagonal (45 degrees) to the object. I use a regular ANSI fill. Will try to figure out how to code it according to James’s tips. I just would like to see a code example to learn from.

  • #18702

    David Shorter44
    Participant

    Here is a script, 8 sets the rotation to match the rotation of the object
    a/2, b/2 puts the origin of fill at the centre of the object.
    pen penAttribute_1
    fill fillAttribute_1
    poly2_b{5} 5, 2, 0, 8, penAttribute_1, penAttribute_2,
    a/2, b/2, 1, 0, 0, 1, 0,
    0, 0, 1,
    a, 0, 1,
    a, b, 1,
    0, b, 1,
    0, 0, 1

    the screenshot shows the parameters

    ArchiCAD 4.1-22
    MacBook RetinaDisplay
    16Gb RAM 500Gb SSD
    BIMXdocs

    • #18705

      Mats Knutsson
      Participant

      Rally thank you! Works like charm. Now for the definition of B{5} to understand what’s going on.

    • #18706

      Mats Knutsson
      Participant

      Really thank you! Works like charm. Now for the definition of B{5} to understand what’s going on.

  • #18703

    David Shorter44
    Participant

    missing screenshot attached

    Attachments:

    ArchiCAD 4.1-22
    MacBook RetinaDisplay
    16Gb RAM 500Gb SSD
    BIMXdocs

  • #18709

    David Shorter44
    Participant

    Mats
    I have to confess I cheated.
    I drew a fill block on the floor plan and saved it as a object.
    I created it at the origin to a known size (600×600) using a fill geometry ‘linked to the fill origin.
    I then selected it and saved it as an object, opened the object and edited the 2D script.
    I can go into more detail if that would help but I’m not sure how much you know.
    Let me know if you need more guidance.
    Hope this helps

    ArchiCAD 4.1-22
    MacBook RetinaDisplay
    16Gb RAM 500Gb SSD
    BIMXdocs

  • #18717

    Mats Knutsson
    Participant

    This is my master piece (huge irony)

    I used a GOSUB for the fills in 2D but need to change to a fill that allows me to control the outline colour.
    The 3D is pure cheat in that sense I have three different “complete” geometries (GOSUB). I guess the holes in the slab can be done with a FOR … NEXT loop but that’s for later.
    Thanks for all kind help?

    Next venture is UI.

The forum ‘General discussions’ is closed to new topics and replies.