No support for setting up blender orientation slots for multiple
containers or for non-spatial elements. Setting the default container
switches to an appropriate orientation slot if the orientation of this
container isn't global.
Trying to create orientation slots for all spaces could potentially
involve a lot of duplicate method calls because blender has no way to
query the list of existing orientation slots, so we can't check to see
if setting a slot is necessary.
So this patch now simply creates/overwrites and uses a single
orientation slot whenever the user switches the default spatial
container, and then only if the spatial orientation is non-world.
create_orientation_slots() can be given an element and it will find the
highest matching parent product orientation via elements and/or
spatial elements
relating_type_id now relies on type_elements which relies on ifc_class_current and they wasn't updated when ifc_class was changed.
Typical failing test looked like "TypeError: bpy_struct: item.attr = val: expected a string enum, not int".
If data was already loaded for BIMTool ("all") this ` elif ifc_element_type == "all" and AuthoringData.data["ifc_element_type"] is not None:` would always fail and this `AuthoringData.data["ifc_element_type"] != ifc_element_type` would always result to True, constantly recalculating data on every draw call.
This may uncover some issues that were hidden by the constant update (e.g. the bug fixed in the next commit).
Simplified it so now ifc_element_type is almost always referring to either ifc class or None. It's still using "all" in the BIMTool itself but then it's converted to None when passed to draw methods.
Currently you can edit container name directly from spatial manager, so this operator is no longer needed (and it also was missing from UI either way).
Blender supports named UCS coordinate systems. Refreshing the spatial
decomposition panel now creates orientation slots for each unique
spatial element orientation.
Additionally, setting the default spatial container selects an
appropriate orientation slot. eg. if a building is rotated, selecting to
work in a storey will set the orientation to the building orientation.
These slots are only created/updated in the spatial decomposition panel,
maybe they should also be created when loading the file and other
places.
The blender API doesn't currently allow listing custom orientation slots
for deletion, so if a spatial element is deleted or renamed, the old
orientation slot will persist for the rest of the session.
Fixes mapping of vertical alignment parabola business logic to geometry. Adds creation function of h and v alignment. Adds stationing referent at start of alignment. Fixes utility functions
(I hope I don't miss anything, no tests seem to fail and performance is increased significantly) but because `subelement_queue` initiated with the `traverse` all `element`'s subelements will be traversed inside `while` loop twice - once as a part of initial queue and another time when `element` is traversed inside the loop and all those elements added to the queue again.
Now we just initiate the `queue` with the `element` and it will be traversed inside the loop like any other element.