commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Willis (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MATH-780) BSPTree class and recovery of a Euclidean 3D BRep
Date Tue, 24 Apr 2012 02:14:35 GMT

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

Andrew Willis commented on MATH-780:
------------------------------------

The indices you have above work. Thanks. 
Try these
{noformat}
            float[] coordVals = {
1.000000f, -1.000000f, -1.000000f, 
1.000000f, -1.000000f, 1.000000f, 
-1.000000f, -1.000000f, 1.000000f, 
-1.000000f, -1.000000f, -1.000000f, 
1.000000f, 1.000000f, -1f, 
0.999999f, 1.000000f, 1.000000f, 
-1.000000f, 1.000000f, 1.000000f, 
-1.000000f, 1.000000f, -1.000000f};
int[] coordIdxs = {
0, 1, 2, 0, 2, 3, 
4, 7, 6, 4, 6, 5, 
0, 4, 5, 0, 5, 1, 
1, 5, 6, 1, 6, 2, 
2, 6, 7, 2, 7, 3, 
4, 0, 3, 4, 3, 7};
{noformat}
Then change the coord 0.999999f to 1.0f as follows:
{noformat}
float[] coordVals = {
1.000000f, -1.000000f, -1.000000f, 
1.000000f, -1.000000f, 1.000000f, 
-1.000000f, -1.000000f, 1.000000f, 
-1.000000f, -1.000000f, -1.000000f, 
1.000000f, 1.000000f, -1.000000f, 
1.000000f, 1.000000f, 1.000000f, 
-1.000000f, 1.000000f, 1.000000f, 
-1.000000f, 1.000000f, -1.000000f};
coordIdxs = {
0, 1, 2, 0, 2, 3, 
4, 7, 6, 4, 6, 5, 
0, 4, 5, 0, 5, 1, 
1, 5, 6, 1, 6, 2, 
2, 6, 7, 2, 7, 3, 
4, 0, 3, 4, 3, 7};
{noformat}

I get an error on the first set of coordinates but not on the second. The indices are the
same. This is the original data which gave rise to the bug report.

Let me know what you find.
thanks,
andrew

                
> 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