Anders Juul

Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: Centerpoint in simpel 2D symbol #2994
    Anders Juul
    Participant

    Hi David

    Can you give my an examble? My GDL skills is not the best 🙂

    in reply to: Centerpoint in simpel 2D symbol #2991
    Anders Juul
    Participant

    Thanks for your reply. I programed the symbol, and now the symbol scale from the center when I change the paper size 🙂

    One more question. How do I make al fill, so the symbol gets a colour : Se se attached

    / Anders

    _paperToModel = GLOB_SCALE / 1000
    bb = bb_mm * _paperToModel

    mul2 a, b
    add2 0, 0
    pen penAttribute_1
    line_property 0

    ! Firkant line
    line2 -500*bb,-500*bb,-500*bb,500*bb
    line2 -500*bb,500*bb,500*bb,500*bb
    line2 500*bb,500*bb,500*bb,-500*bb
    line2 500*bb,-500*bb,-500*bb,-500*bb
    ! pil line
    line2 -500*bb,0*bb,-50*bb,400*bb
    line2 -50*bb,400*bb,300*bb,400*bb
    line2 300*bb,400*bb,50*bb,150*bb
    line2 50*bb,150*bb, 400*bb,150*bb
    line2 400*bb,150*bb, 400*bb,-150*bb
    line2 400*bb,-150*bb, 50*bb,-150*bb
    line2 50*bb,-150*bb, 300*bb,-400*bb
    line2 300*bb,-400*bb, -50*bb,-400*bb
    line2 -50*bb,-400*bb, -500*bb,0*bb

    Attachments:
    in reply to: Centerpoint in simpel 2D symbol #2980
    Anders Juul
    Participant

    Thanks David

    But if the symbol is more complex like attached. Do i have to rewrite the code to?
    I created this symbol by select the drawings, and use “save selection as object”

    ___

    _paperToModel = GLOB_SCALE / 1000
    _size1_model = Str_mm * size1_mm * _paperToModel
    _size2_model = Str_mm * size2_mm * _paperToModel

    mul2 _size1_model , _size2_model
    add2 -6.838723289463, -2.084918350452
    pen penAttribute_1
    fill fillAttribute_1
    poly2_b{5} 15, 2, 0, 3, penAttribute_1, penAttribute_2,
    0, 0, 1, 0, 0, 1, 0,
    6.838723289463, 2.484918350452, 1,
    6.838723289463, 2.084918350452, 1,
    7.238723289463, 2.084918350452, 1,
    7.238723289463, 2.284918350453, 1,
    7.063723289463, 2.109918350452, 1,
    6.938723289463, 2.109918350452, 1,
    7.063723289463, 2.234918350452, 1,
    6.863723289463, 2.234918350452, 1,
    6.863723289463, 2.334918350452, 1,
    7.063723289463, 2.334918350452, 1,
    6.938723289463, 2.459918350452, 1,
    7.063723289463, 2.459918350452, 1,
    7.238723289463, 2.284918350453, 1,
    7.238723289463, 2.484918350452, 1,
    6.838723289463, 2.484918350452, 1
    pen penAttribute_3
    fill fillAttribute_1
    poly2_b{5} 10, 2, 0, 3, penAttribute_3, penAttribute_3,
    0, 0, 1, 0, 0, 1, 0,
    7.063723289463, 2.334918350452, 1,
    6.863723289463, 2.334918350452, 1,
    6.863723289463, 2.234918350452, 1,
    7.063723289463, 2.234918350452, 1,
    6.938723289463, 2.109918350452, 1,
    7.063723289463, 2.109918350452, 1,
    7.238723289463, 2.284918350453, 1,
    7.063723289463, 2.459918350452, 1,
    6.938723289463, 2.459918350452, 1,
    7.063723289463, 2.334918350452, 1
    _____

    Attachments:
Viewing 3 posts - 1 through 3 (of 3 total)