OSArch Community

Detect non-manifold geometries using IfcOpenShell and OpenCascade

  1. M

    Sometimes, IFC models can contain shape representations that are not manifold. Is there a way to detect them using IfcOpenShell and OpenCascade ?

    An example of shape that is not manifold

  2. M

    @aothms might know.

  3. A

    We have an implementation here in C++ https://github.com/IfcOpenShell/IfcOpenShell/blob/v0.7.0/src/ifcgeom_schema_agnostic/base_utils.cpp#L91 (which you can adapt to pythonocc if needed).

    The bigger problem than (pure-topological) non-manifoldness is self-intersections I'd say. By default we already do a check on face boundary and extrusion basis self-intersections https://github.com/IfcOpenShell/IfcOpenShell/blob/v0.7.0/src/ifcgeom_schema_agnostic/wire_utils.cpp#L376 Which may lead to non-manifoldness in the shell, but self-intersecting faces is a more severe problem.

    Hope that helps a bit. There's quite a few geometric problems typically in ifc models. We're also checking some aspects of those in validate.buildingsmart.org (https://github.com/buildingSMART/ifc-gherkin-rules/blob/main/features/GEM001_Closed-shell-edge-usage.feature)

  4. A

    Are there models that illustrate the different cases of non-manifoldness ? I can try to generate and provide some myself

    Not exhaustively, I think that would be a great idea, also when considering the different geometry modes of IFC, IfcManifoldSolidBrep, IfcTriangulatedFaceset IfcTesselatedFaceset IfcAdvancedBrep etc.

    topology module of OCCUtils

    I personally don't use it because I'm familiar enough with the main OCC API..

  5. M

    A minor note that the built-in 3D print add-on in Blender also has a manifold geometry check, but that might not be what you're looking for.

  6. M

    Regarding the first scenario, are you considering using the topology module of OCCUtils ?

    Are there models that illustrate the different cases of non-manifoldness ? I can try to generate and provide some myself

  7. B
    • import in FreeCAD

    • convert to a FreeCAD Mesh object

    • use Analyse Tools of FreeCAD Mesh to find and maybe even repair the geometry (it has special tool to find nonmanifolds)

    • convert back to a FreeCAD Part object

    • export back to IFC

    Is what I have done very often on corroupted geometry.

    All this might be possible in Python too.

    cheers bernd

Login or Register to reply.