BB: quick way to select/deselect all objects that have a IfcSweptAreaSolid class associated with it?
Is there a quick way to select/deselect all objects that have a IfcSweptAreaSolid
class associated with it?
For example, we want to quickly assess which objects in this file are not IFC extrusions.
Comments
Don't know if it is the best way, but you can use this script in the Text Editor. For deselecting, just change "True" to "False" in the last line:
Very cool!
As you see from this video it seems to only pick some of the extrusions.
Any ideas why?
Per this video, even if it seems that it's an extrusion, if you 'Update Mesh as Arbitrary Extrusion', on the object, that the script works again. Strange.
The script assumes that all your elements are
IfcBuildingElementProxy
, so it won't pick upIfcCovering
or similar. It also assumes that theBody
representation is the first representation, but this is unlikely to be a problem unless you have multiple representations.Thanks Bruno. With these large scale details, all the objects are classified as
IfcBuildingElementProxy
elements.But yeah, maybe it has something to do with
Body
representation... not sure.Yeah, I made it too specific regarding the element type. Also, I don't fully understand Ifc Representation, I'll have to take a closer look at it. I'll try to write another version later.
This element:
..has two representations:
The first representation is
BoundingBox
:The second representation is the
SweptSolid
:The code should do something like this (untested):
Thanks, @brunopostle! It's working better, but it still left a few objects that supposed to be extrusions. I checked one of them, and I got this value for its representation
(#127142=IfcShapeRepresentation(#27,$,'SweptSolid',(#127141)),)
. I noticed that it doesn't have a Representation Identifier, and I guess that's why the script didn't work for it. It makes sense just to erase this condition and look just for the Representation Type?Yes, the
RepresentationIdentifier
is unnecessary since aSweptSolid
can only beBody
anyway.Here's the full script after the improvements:
nicely done @bruno_perdigao!
I wonder if IFC should have something like an SQL query language for this sort of thing:
Alternatively, blenderbim could have a function like autocad 'quick select', with a dynamic filter displaying available properties in context - but this wouldn't be as powerful
Was getting these errors
So added the following...