Skip to content

Convert PolyhedralSurface Z (WKT) to solid mesh and compute 3D intersection / common faces #218

@Mganjirad

Description

@Mganjirad

Hi,
I’m writing a .NET 8 service and need to work with two closed 3D solids.

What I have:
Two WKT strings, each representing a PolyhedralSurface Z (a closed set of 3D polygons; essentially a solid boundary).

What I need:

3D intersection – the solid (or mesh) resulting from the volumetric overlap.

Common boundary detection – determine if the two solids share a face, and if so, extract that shared face/plane.

Touching faces – detect faces that lie on the same plane without volume overlap.

My plan (with geometry3Sharp, dotnet8 branch):

Parse or convert the WKT PolyhedralSurface Z into a mesh (e.g., DMesh3).

Then use MeshBoolean (or other 3D boolean tools) to compute the intersection.

Finally, examine the result’s faces to find common/touching faces.

Questions:

What is the recommended way to convert a PolyhedralSurface Z (WKT) into a closed DMesh3 that represents the solid? Is there built-in WKT reading in geometry3Sharp, or do I need to manually triangulate the polygons and build the mesh?

Once I have two closed DMesh3 solids, what is the correct method to compute their intersection? Is MeshBoolean robust enough for this?

After the intersection, how do I extract the common boundary faces (i.e., the faces that belong to both original surfaces along the contact plane)?

A short code snippet showing the conversion step and the boolean operation would be extremely helpful. I'm targeting the dotnet8 branch for .NET 8 compatibility.

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions