Skip to content

[meshes3d] bugs in clipConvexPolyhedronByPlane and intersectPlaneMesh #206

Description

@joneumann

matlab version: 23.2.0.2380103 (R2023b) Update 1
matGeom version: bdc8c65

Dear Monsieur Legland,

i tried to revive a code that i wrote ~8 years ago but experienced severals errors, particularly concerning clipConvexPolyhedronByPlane. I tried to go back in history, but since the function has been renamed, the history seems broken somehow.

There, i get an error:

Index exceeds the number of array elements. Index must not exceed 1.

Error in clipConvexPolyhedronByPlane (line 116)
    if minDists(2) < tol

or

Index exceeds the number of array elements. Index must not exceed 1.

Error in clipConvexPolyhedronByPlane (line 99)
        inds(indNews(2)) = Nn + 2;

I looked into this, particulary trying to run the examples, that are in the headers, but they also throw errors.
demo file attached.
I had to change the file extension, because github doesn't let me attach *.m.
I also get 2 errors running the test suite, however, it seems unrelated.

debug_matGeom.txt

Your help is kindly appreciated.

Regards
Johannes Neumann

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