Tuesday
I'm in the process of building a GDL joist hanger and I've come across a problem using groups.
I'm using 2 simple prisms to create the basic shape, and using 2 more prisms to cutting out the geometry using the GDL version of SEOs.
This is what my geometry currently looks like:
I've shaded the prisms which represent the subtraction geometry. I've used ADDX, ADDY and ADDZ to move the origin to create the prisms and the positions and dimensions are correct.
I'm using a 3d sphere to show the origin for debugging.
However when I copy the script and make the prisms in groups and place them (their counterparts are the wire frame geometry), none of the offsets I used to create the original geometry are respected. I can't use ADDn commands to reposition the groups.
I can't find anything in the GDL cookbook about this. I'm hoping I have missed something obvious.
Is it just a limitation I have to deal with by using absolute coordinates for the base geometry in the group definitions?
Solved! Go to Solution.
Tuesday - last edited Thursday by Laszlo Nagy
Hi Jim,
All the transformations inside the group are ignored after the group is made (effectively an automatic del the number of transformations in the group).
the group is always set at the origin point and it assumes you will move the local origin before you use the placegroup command (effectively moving the new element to its new location)
in the example i move the elements in the group so it is 0.5,0.5,0.5 from the local origin of the group.
you see that the local coordinate shown by coordinate arrow only moves by the transformation outside the group.
i.e.
block 0.1,0.2,0.5
group "body of object to be cut"
material 3
add 0.5,0.5,0.5
block 0.4,0.5,1
endgroup
placegroup ("body of object to be cut")
material 2
add 0.1,0.1,0.1
block 0.1,0.2,0.5
so if your local coordinates for the group don't match then things wont cut.
there is no movement of the local origin of the cutting group so it sits at the global origin.
block 0.1,0.2,0.5
group "body of object to be cut"
material 3
add 0.5,0.5,0.5
block 0.4,0.5,1
endgroup
group "object to do cutting"
material 5
block 0.4,0.5,1
endgroup
placegroup ("body of object to be cut")
placegroup ("object to do cutting")
in this example the global origin is still 0,0,0 shown by coordinate arrows, and the cutting object is offset an extra 0.1,0.1,0.1 to do the cut
block 0.1,0.2,0.5
group "body of object to be cut"
material 3
add 0.5,0.5,0.5
block 0.4,0.5,1
endgroup
group "object to do cutting"
add 0.6,0.6,0.6
material 5
block 0.4,0.5,1
endgroup
placegroup ("object to do cutting")
placegroup subgroup("body of object to be cut","object to do cutting")
you see if the global coordinates move in-between transformations, it doesn't effect local coordinates in the groups(i made the cutting element a bit smaller in the one so you can see the cut element is a little bigger, but in the same position
block 0.1,0.2,0.5
group "body of object to be cut"
material 3
add 0.5,0.5,0.5
block 0.4,0.5,1
endgroup
add 0.1,0.1,0.1
group "object to do cutting"
add 0.5,0.5,0.5
material 5
block 0.4,0.5,0.95
endgroup
placegroup ("object to do cutting")
placegroup subgroup("body of object to be cut","object to do cutting")
the answer is you have to put the transformation inside the cutting group,
but you can place the original group inside a new group
and remember the kill group commands at the end.
block 0.1,0.2,0.5
group "body of object to be cut"
add 0.5,0.5,0.5
material 4
block 0.4,0.5,1
endgroup
group "object to do cutting"
add 0.1,0.1,0.1
material 5
placegroup "body of object to be cut"
endgroup
placegroup ("object to do cutting")
placegroup subgroup("body of object to be cut","object to do cutting")
killgroup "object to do cutting"
killgroup "body of object to be cut"
i was just showing the cutting element for effect
without placing the cutting element to get:
block 0.1,0.2,0.5
group "body of object to be cut"
add 0.5,0.5,0.5
material 4
block 0.4,0.5,1
endgroup
group "object to do cutting"
add 0.1,0.1,0.1
material 5
placegroup "body of object to be cut"
endgroup
placegroup subgroup("body of object to be cut","object to do cutting")
killgroup "object to do cutting"
killgroup "body of object to be cut"
I hope this helps
Tuesday - last edited Thursday by Laszlo Nagy
Hi Jim,
All the transformations inside the group are ignored after the group is made (effectively an automatic del the number of transformations in the group).
the group is always set at the origin point and it assumes you will move the local origin before you use the placegroup command (effectively moving the new element to its new location)
in the example i move the elements in the group so it is 0.5,0.5,0.5 from the local origin of the group.
you see that the local coordinate shown by coordinate arrow only moves by the transformation outside the group.
i.e.
block 0.1,0.2,0.5
group "body of object to be cut"
material 3
add 0.5,0.5,0.5
block 0.4,0.5,1
endgroup
placegroup ("body of object to be cut")
material 2
add 0.1,0.1,0.1
block 0.1,0.2,0.5
so if your local coordinates for the group don't match then things wont cut.
there is no movement of the local origin of the cutting group so it sits at the global origin.
block 0.1,0.2,0.5
group "body of object to be cut"
material 3
add 0.5,0.5,0.5
block 0.4,0.5,1
endgroup
group "object to do cutting"
material 5
block 0.4,0.5,1
endgroup
placegroup ("body of object to be cut")
placegroup ("object to do cutting")
in this example the global origin is still 0,0,0 shown by coordinate arrows, and the cutting object is offset an extra 0.1,0.1,0.1 to do the cut
block 0.1,0.2,0.5
group "body of object to be cut"
material 3
add 0.5,0.5,0.5
block 0.4,0.5,1
endgroup
group "object to do cutting"
add 0.6,0.6,0.6
material 5
block 0.4,0.5,1
endgroup
placegroup ("object to do cutting")
placegroup subgroup("body of object to be cut","object to do cutting")
you see if the global coordinates move in-between transformations, it doesn't effect local coordinates in the groups(i made the cutting element a bit smaller in the one so you can see the cut element is a little bigger, but in the same position
block 0.1,0.2,0.5
group "body of object to be cut"
material 3
add 0.5,0.5,0.5
block 0.4,0.5,1
endgroup
add 0.1,0.1,0.1
group "object to do cutting"
add 0.5,0.5,0.5
material 5
block 0.4,0.5,0.95
endgroup
placegroup ("object to do cutting")
placegroup subgroup("body of object to be cut","object to do cutting")
the answer is you have to put the transformation inside the cutting group,
but you can place the original group inside a new group
and remember the kill group commands at the end.
block 0.1,0.2,0.5
group "body of object to be cut"
add 0.5,0.5,0.5
material 4
block 0.4,0.5,1
endgroup
group "object to do cutting"
add 0.1,0.1,0.1
material 5
placegroup "body of object to be cut"
endgroup
placegroup ("object to do cutting")
placegroup subgroup("body of object to be cut","object to do cutting")
killgroup "object to do cutting"
killgroup "body of object to be cut"
i was just showing the cutting element for effect
without placing the cutting element to get:
block 0.1,0.2,0.5
group "body of object to be cut"
add 0.5,0.5,0.5
material 4
block 0.4,0.5,1
endgroup
group "object to do cutting"
add 0.1,0.1,0.1
material 5
placegroup "body of object to be cut"
endgroup
placegroup subgroup("body of object to be cut","object to do cutting")
killgroup "object to do cutting"
killgroup "body of object to be cut"
I hope this helps
Wednesday
Perfect - detailed and clear, thanks!
Wednesday
All working in 3d - just the 2d to complete!
yesterday
All done and uploaded to BimComponents.
Modifications actively encouraged!
I haven't added options for skewed hangers, that would take quite a lot of my time and there's only so much swearing my colleagues in the office can tolerate, especially now use of Microsoft Teams is common...
What would be cool would be a joist component with hangers at the ends. Or just one.
I could do that, in fact I might because I do want to create an object which is an array of elements like the railing tool or joist tool object, but is more flexible and easier to use for joists, posts, battens, panels, rafters etc.
But not right now.