bbercovici / SBGAT

The implementation of the Small Bodies Geophysical Analysis Tool (SBGAT)
MIT License
4 stars 2 forks source link

Current extract edge usage breaks #57

Closed cephid13 closed 6 years ago

cephid13 commented 6 years ago

The extractedges usage around line 200 of SBGATPolyhedronGravityModel.cpp doesn't preserve the vertex IDs compared to the facet table from the OBJ file, so this breaks if the OBJ file wasn't ordered in a certain way. We can discuss, but need to preserve the same IDs; I can provide a fix but probably a better way.

bbercovici commented 6 years ago

Could you share with me the OBJ file that revealed this issue?

cephid13 commented 6 years ago

No because it is a Ryugu shape.

But, I think all you need is a shape where the vertices are not ordered nicely in the facet table. What I noticed is that the tool wants numbering such that the first facet in the table is

f 1 2 3

and then in a row-wise manner new vertex numbers are introduced.

The shape I was using had a first facet as something like

f 1 67 20

ie arbitrary vertex numbers not in a nice row-wise order.

You should be able to reproduce if you just reorder facets in a current shape model.

bbercovici commented 6 years ago

I was able to replicate the issue. stay tuned.

bbercovici commented 6 years ago

The issue was fixed in the latest release of SBGAT. Update SbgatCore and re-run your simulations