Skip to content

Error when trying to cut Boxes: "invalid point-in-polygon test result ('101')" #54

@dkd0m

Description

@dkd0m

Hello, first of all, thank you for this library.

I was trying to cut a box with another box and got the mentioned error.
Unfortunately i couldn't figure out why it's not working.
Here are the logs and the Meshes in question:

dispatching MCUT
---------------
Debug message ( 0 ): construct halfedge mesh
Source: API

Type: Other

Severity: notification

---------------
Debug message ( 0 ): Build source-mesh BVH
Source: API

Type: Other

Severity: notification

---------------
Debug message ( 0 ): Build cut-mesh BVH
Source: API

Type: Other

Severity: notification

---------------
Debug message ( 0 ): construct halfedge mesh
Source: API

Type: Other

Severity: notification

---------------
Debug message ( 0 ): Check source-mesh for defects
Source: API

Type: Other

Severity: notification

---------------
Debug message ( 0 ): Check cut-mesh for defects
Source: API

Type: Other

Severity: notification

---------------
Debug message ( 0 ): Find potentially-intersecting polygons
Source: API

Type: Other

Severity: notification

---------------
Debug message ( 0 ): Polygon-pairs found = 12
Source: API

Type: Other

Severity: notification

---------------
Debug message ( 0 ): dispatch kernel
Source: Kernel

Type: Other

Severity: notification

 ---------------
Debug message ( 0 ): GENERAL_POSITION_VIOLATION : invalid point-in-polygon test result ('101')
Source: Kernel

Type: Error

Severity: high

operator()(...) -> incomplete kernel execution (EventID=0xdecb0)
mcDispatch result:
MC_INVALID_OPERATION

src-mesh.off

OFF
8 12 0
20 20 20 # 0
-20 20 20 # 1
-20 -20 20 # 2
20 -20 20 # 3
20 -20 -20 # 4 
-20 -20 -20 # 5
-20 20 -20 # 6
20 20 -20 # 7
3 1 2 0  # top 1 👍
3 2 3 0  # top 2 👍
3 3 2 4  # front 1 👍
3 2 5 4  # front 2 👍
3 2 1 5  # left 1 👍
3 1 6 5  # left 2 👍
3 7 4 6  # bottom 1 👍
3 4 5 6  # bottom 2 👍
3 0 3 7  # right 1 👍
3 3 4 7  # right 2 👍
3 1 0 6  # back 1 👍
3 0 7 6  # back 2 👍

cut-mesh.off - basically the same mesh, just translated by 20 in the X,Y and 2 in the Z direction

OFF
8 12 0
40 40 22
0 40 22
0 0 22
40 0 22
40 0 -18
0 0 -18
0 40 -18
40 40 -18
3 1 2 0  
3 2 3 0  
3 3 2 4  
3 2 5 4  
3 2 1 5  
3 1 6 5  
3 7 4 6  
3 4 5 6  
3 0 3 7  
3 3 4 7  
3 1 0 6  
3 0 7 6  

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions