This is a great question, Unfortunately I also don't have a workaround at the moment
An Annotation object has a ZIndex which controls order/arrangement:
If we could get a similar Pset/value for objects that would be very useful and achieve this
I had the (possibly stupid) idea of simply adding a void to the wall where the column is (which I'm guessing would be right for things like qto??? But anyway, it looks good when activating the camera, but then throws an exception when generating the drawing:
Python: Traceback (most recent call last):
File "/home/steve/.config/blender/4.2bonsai/extensions/.local/lib/python3.11/site-packages/bonsai/bim/module/drawing/operator.py", line 279, in execute
linework_svg = self.generate_linework(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/steve/.config/blender/4.2bonsai/extensions/.local/lib/python3.11/site-packages/bonsai/bim/module/drawing/operator.py", line 746, in generate_linework
self.merge_linework_and_add_metadata(root)
File "/home/steve/.config/blender/4.2bonsai/extensions/.local/lib/python3.11/site-packages/bonsai/bim/module/drawing/operator.py", line 1261, in merge_linework_and_add_metadata
for subpath in path.attrib["d"].split("M")[1:]: ~~~^^^^^
File "src/lxml/etree.pyx", line 2547, in lxml.etree._Attrib.getitem
KeyError: 'd'
[Addendum: It seems to specifically when the void causes a hole in the plan, rather than a cutout.]
I couldn't figure out a perfect workaround for this, but I think I found the idea of it.
If you can somehow change the opacity for the fill colors of the wall and the column, the column's outlines are displayed.
Configuring CSS settings will do this, but I don't know much about how to manipulate...
When an SVG file is created with BBIM, it would be ideal if the layers of IfcWall are located under IfcColumn.
Hmmm. Maybe I'm oversimplifying things, but what about the css z-index? I checked after reading the message from @yoayo and the column is there in the svg, it is just hidden behind the wall object. So if you z-index the column above the wall, that should do what you want, right?
Edit: Might help if I provide the relevant link: https://www.w3schools.com/cssref/pr_pos_z-index.php
@theoryshaw said:
Yes, that seems like it would work too, but adding z-index to the default.css, didn't seem to work, for me.
There seems to be some requirements regarding "positioning" on the spec page:
Note: z-index only works on positioned elements (position: absolute, position: relative, position: fixed, or position: sticky) and flex items (elements that are direct children of display:flex elements).
Per the following, the Order of Elements in the SVG worked in my manual test... https://chatgpt.com/share/6717e86a-0314-8013-886f-d5f1dd103988
...
We could maybe hardcode (or have some preference) where certain classes such as Ifcbeam, IfcColumn, etc, are always at the end... so they're always 'above' the walls.
...
Haven't been down this rabbit hole yet.
Yeah, my bad, reading a bit further SVG 1.1 is strictly defined by order of elements in the file. z-index is more for html div tags/images.
You could wait for SVG2 (which appears to support z-indexing), and then for Bonsai and Inkscape to support it, but Godot might arrive first.
I think your best bet is my first suggestion using voids, but you'd need to get a bug raised to fix the vertical voids through walls issue I hit.
Oh. I had an evil thought... Split the wall where the column is and put a half the column void on one wall, half the void on the other wall. Quick test time... Muhahahaha!!!! I'm a clever sod!
Actually, I've now thought of a problem. Isn't this going to make all beams / columns in a drawing show above everything else in the drawing? Would it not be better to make this dependant on a custom pset value or using the filter queries? That way you could force any item you want to the top in a more targeted way.
I've just realised that the beams I used to create lintels and sills around my windows are now going to pop up over everything else :-( although I realise you left a TODO in the commit.
I was thinking more like OD_Generic.OD_OnTop=True on any item pulls it to the top. Is your setting a filter (which would work with the OD_Generic.OD_OnTop too), or just a type list?
Does this actually work? Isn't it only seeming to work in this scenario because the beam is actually cut? I don't think this solution works for projection elements obscured by others (i.e. typical in structural plans when you want the beams to show through the slab).
If so, instead should it generate the drawing in two passes, one being the "on top" pass and another being the regular pass?
not 100% sure.
Would it make sense to be able to be able to 'order' the svg classes with projection lines w/ a preference. that is for example, have IfcBeams show over IfcColumns, or the other way, if you wanted. Or show both through transparency?
Too much pressure to decide. ha. ;)
ping @Ace, if you have additional thoughts.
In the case of a column buried in a wall, either fully or partially; it would be more appropriate to create a subtraction of the column from the wall ? Similar to the "join" command in Revit
@FranSeoane said:
In the case of a column buried in a wall, either fully or partially; it would be more appropriate to create a subtraction of the column from the wall ? Similar to the "join" command in Revit
Comments
Intuitively it seems like adding a Plan/Annotation/PLAN_VIEW to the column would do it.

This is a great question, Unfortunately I also don't have a workaround at the moment

An Annotation object has a ZIndex which controls order/arrangement:
If we could get a similar Pset/value for objects that would be very useful and achieve this
I had the (possibly stupid) idea of simply adding a void to the wall where the column is (which I'm guessing would be right for things like qto??? But anyway, it looks good when activating the camera, but then throws an exception when generating the drawing:
Python: Traceback (most recent call last):
File "/home/steve/.config/blender/4.2bonsai/extensions/.local/lib/python3.11/site-packages/bonsai/bim/module/drawing/operator.py", line 279, in execute
linework_svg = self.generate_linework(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/steve/.config/blender/4.2bonsai/extensions/.local/lib/python3.11/site-packages/bonsai/bim/module/drawing/operator.py", line 746, in generate_linework
self.merge_linework_and_add_metadata(root)
File "/home/steve/.config/blender/4.2bonsai/extensions/.local/lib/python3.11/site-packages/bonsai/bim/module/drawing/operator.py", line 1261, in merge_linework_and_add_metadata
for subpath in path.attrib["d"].split("M")[1:]:
~~~^^^^^
File "src/lxml/etree.pyx", line 2547, in lxml.etree._Attrib.getitem
KeyError: 'd'
[Addendum: It seems to specifically when the void causes a hole in the plan, rather than a cutout.]
Addendum 2: Seems to be specifically walls it doesn't like enclosed voids in. Slabs and user-created geometry/elements (a cube) are fine.
I couldn't figure out a perfect workaround for this, but I think I found the idea of it.


If you can somehow change the opacity for the fill colors of the wall and the column, the column's outlines are displayed.
Configuring CSS settings will do this, but I don't know much about how to manipulate...
When an SVG file is created with BBIM, it would be ideal if the layers of IfcWall are located under IfcColumn.
Brilliant!.. that's the way to do it!
Hmmm. Maybe I'm oversimplifying things, but what about the css z-index? I checked after reading the message from @yoayo and the column is there in the svg, it is just hidden behind the wall object. So if you z-index the column above the wall, that should do what you want, right?
Edit: Might help if I provide the relevant link: https://www.w3schools.com/cssref/pr_pos_z-index.php
Yes, that seems like it would work too, but adding
z-index
to the default.css, didn't seem to work, for me.One drawback of the transparency approach, is that it exposes the wall joints in the drawing...


There seems to be some requirements regarding "positioning" on the spec page:
Did you have that in mind when testing?
Per the following, the
Order of Elements in the SVG
worked in my manual test...https://chatgpt.com/share/6717e86a-0314-8013-886f-d5f1dd103988
...
We could maybe hardcode (or have some preference) where certain classes such as Ifcbeam, IfcColumn, etc, are always at the end... so they're always 'above' the walls.
...
Haven't been down this rabbit hole yet.
Yeah, my bad, reading a bit further SVG 1.1 is strictly defined by order of elements in the file. z-index is more for html div tags/images.
You could wait for SVG2 (which appears to support z-indexing), and then for Bonsai and Inkscape to support it, but Godot might arrive first.
I think your best bet is my first suggestion using voids, but you'd need to get a bug raised to fix the vertical voids through walls issue I hit.
Seems like you could reorder the svg tags with IfcBeam, IfcColumn, etc, last...
Seems like it would happen in this file.
https://github.com/IfcOpenShell/IfcOpenShell/blob/v0.8.0/src/bonsai/bonsai/bim/module/drawing/operator.py
Enough digging for today. :)
Oh. I had an evil thought... Split the wall where the column is and put a half the column void on one wall, half the void on the other wall. Quick test time... Muhahahaha!!!! I'm a clever sod!

Took a stab.. seems to work: https://github.com/IfcOpenShell/IfcOpenShell/commit/f62b1ed3268a07f92760c7983ed8179aa31ebb99
Actually, I've now thought of a problem. Isn't this going to make all beams / columns in a drawing show above everything else in the drawing? Would it not be better to make this dependant on a custom pset value or using the filter queries? That way you could force any item you want to the top in a more targeted way.
I've just realised that the beams I used to create lintels and sills around my windows are now going to pop up over everything else :-( although I realise you left a TODO in the commit.
Yeah, maybe it's drawing specific...
I was thinking more like OD_Generic.OD_OnTop=True on any item pulls it to the top. Is your setting a filter (which would work with the OD_Generic.OD_OnTop too), or just a type list?
@theoryshaw, @sjb007,
You guys are a way ahead of my understanding!
https://github.com/IfcOpenShell/IfcOpenShell/commit/f8ebc2d156631532e1052a99fbf79c034c622f8e


Does this actually work? Isn't it only seeming to work in this scenario because the beam is actually cut? I don't think this solution works for projection elements obscured by others (i.e. typical in structural plans when you want the beams to show through the slab).
If so, instead should it generate the drawing in two passes, one being the "on top" pass and another being the regular pass?
Yes, this only works in a 'cutting' scenario.
But yes, having an approach like you descripted would be great too.
Would think it would allow for things like this: https://community.osarch.org/discussion/2037/blenderbim-css-hatchpatterns-multiply-or-transparent-fill-on-cut-elements-objects
and seeing things like beams and headers beyond, that are embedded or cross a bearing wall.
For example:
For developing this, is there any value in having N layers, or just a base layer and a "top" layer?
not 100% sure.
Would it make sense to be able to be able to 'order' the svg classes with projection lines w/ a preference. that is for example, have IfcBeams show over IfcColumns, or the other way, if you wanted. Or show both through transparency?
Too much pressure to decide. ha. ;)
ping @Ace, if you have additional thoughts.
In the case of a column buried in a wall, either fully or partially; it would be more appropriate to create a subtraction of the column from the wall ? Similar to the "join" command in Revit
can +1, or elaborate on this feature request: https://github.com/IfcOpenShell/IfcOpenShell/issues/5278