commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luc Maisonobe (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MATH-780) BSPTree class and recovery of a Euclidean 3D BRep
Date Sun, 29 Apr 2012 20:09:50 GMT

    [ https://issues.apache.org/jira/browse/MATH-780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13264594#comment-13264594
] 

Luc Maisonobe commented on MATH-780:
------------------------------------

I have made some progress analyzing this issue.
First, I confirm there is a problem in the code.
It appears that during the build, a very thin triangle occurs on a facet. In the facet plane,
the coordinates of the three vertices of this triangle are (0.9999999997583233 -0.999998986721039),
(-1.0000000000000002 -0.9999989867210387) and (-1.0000000000000002 -1.0). While extracting
the vertices of this triangle, the public getVertices method in PolygonsSet first build the
segments and then calls the private followLoop method to identify their topology (i.e. how
they connect to each other). The segments are properly built and identified, but the followLoop
method fails to connect them. It hits a dedicated conditional statement considering the loop
is below some predefined threshold (despite it really is above this threshold) and it ignores
the triangle completely. Later, this breaks things as a node in the tree without a boundary
must be a leaf node which must contain a boolean attribute. However, here we are not a a leaf
node, we are at an internal node with an ignored boundary.

So I think there are two bugs here. One bug for not identifying correctly the triangle, and
one bug for misclassifying an internal node as a leaf node.

The triangle identification bug will probably take some time to fix. The internal/leaf node
bug will probably be easy to fix.

I'll look into that, hopefully in the next few days.

                
> BSPTree class and recovery of a Euclidean 3D BRep
> -------------------------------------------------
>
>                 Key: MATH-780
>                 URL: https://issues.apache.org/jira/browse/MATH-780
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 3.0
>         Environment: Linux
>            Reporter: Andrew Willis
>              Labels: BSPTree, euclidean.threed
>         Attachments: BSPMesh2.java, BSPMesh2.java, BSPMesh2.java, BSPMesh2.java, BSPMesh2.java
>
>
> New to the work here. Thanks for your efforts on this code.
> I create a BSPTree from a BoundaryRep (Brep) my test Brep is a cube as represented by
a float array containing 8 3D points in(x,y,z) order and an array of indices (12 triplets
for the 12 faces of the cube). I construct a BSPMesh() as shown in the code below. I can construct
the PolyhedronsSet() but have problems extracting the faces from the BSPTree to reconstruct
the BRep. The attached code (BSPMesh2.java) shows that a small change to 1 of the vertex positions
causes/corrects the problem.
> Any ideas?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message