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

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

Hi Andrew,

Thanks for the explanation, now I understand your code. It would be a nice 
enhancement to have this in Apache Commons Math!

I think there are still some indices issues. As far as I understand, for each 
facet of the cube, the current indices do not define two triangles sharing one 
diagonal, but rather two triangles with the crossing diagonals (i.e. they 
overlap on some part of the fact, and a quarter of the facet is missing. If I 
replace the indices array from:
{noformat}
{0, 1, 2, 1, 2, 3,
 4, 7, 6, 7, 6, 5,
 0, 4, 5, 4, 5, 1,
 1, 5, 6, 5, 6, 2,
 2, 6, 7, 6, 7, 3,
 4, 0, 3, 0, 3, 7}
{noformat}

to
{noformat}
{0, 1, 2, 2, 3, 0,
 4, 7, 6, 6, 5, 4,
 0, 4, 5, 5, 1, 0,
 1, 5, 6, 6, 2, 1,
 2, 6, 7, 7, 3, 2,
 4, 0, 3, 3, 7, 4}
{noformat}

it seems to work (I had no time for thorough testing though). Note the pattern 
of the change on the last three columns.

Could you tell me if this work for you ang give expected results ?

                
> 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

        

Reply via email to