Skip to content

Subtract leaves trailing vertices #9

@OGPowell

Description

@OGPowell

I'm using the substract function to subtract two concave solids from each other, and I've run into an issue where vertices are "left over" from the subtraction process.

Here is a graphical representation of the issue. The subtract process should leave something like this:
CSGeometrySuccess

But instead, the substract function leaves trailing vertices, like this:
CSGeometryFail

Do you know what might be the issue here? Attached is the link to a failing test, and a .json file with the points of a test solid.
https://github.com/OGPowell/Csg/blob/master/Csg.Test/SubtractTest.cs#L62

[[[744.585, 734.575, 97.125],
[1062.208, 734.575, 97.125],
[1062.208, 276.028, 97.125],
[889.654, 276.028, 97.125],
[889.654, 504.099, 97.125],
[744.585, 504.099, 97.125]],

[[744.585, 734.575, 1297.125],
[1062.208, 734.575, 1297.125],
[1062.208, 734.575, 97.125],
[744.585, 734.575, 97.125]],

[[1062.208, 734.575, 1297.125],
[1062.208, 276.028, 1297.125],
[1062.208, 276.028, 97.125],
[1062.208, 734.575, 97.125]],

[[1062.208, 276.028, 1297.125],
[889.654, 276.028, 1297.125],
[889.654, 276.028, 97.125],
[1062.208, 276.028, 97.125]],

[[889.654, 276.028, 1297.125],
[889.654, 504.099, 1297.125],
[889.654, 504.099, 97.125],
[889.654, 276.028, 97.125]],

[[889.654, 504.099, 1297.125],
[744.585, 504.099, 1297.125],
[744.585, 504.099, 97.125],
[889.654, 504.099, 97.125]],
    
[[744.585, 504.099, 1297.125],
[744.585, 734.575, 1297.125],
[744.585, 734.575, 97.125],
[744.585, 504.099, 97.125]],

[[744.585, 734.575, 1297.125],
[744.585, 504.099, 1297.125],
[889.654, 504.099, 1297.125],
[889.654, 276.028, 1297.125],
[1062.208, 276.028, 1297.125],
[1062.208, 734.575, 1297.125]]]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions