-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make create faces optional #935
Conversation
if (meshGL.runOriginalID.empty()) { | ||
// FIXME: This affects Impl::InitializeOriginal, and removing this | ||
// apparently make things fail. Not sure if this is expected. | ||
meshRelation_.originalID = Impl::ReserveIDs(1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI @pca006132 I fixed this as part of the rest of this cleanup.
for (int i = 0; i < numTri; ++i) { | ||
for (const int j : {0, 1, 2}) { | ||
triProperties[i][j] = idx++; | ||
triProperties[i][j] = pImpl->halfedge_[3 * i + j].startVert; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This bug was causing duplicate propVerts to be created unnecessarily.
CalculateNormals(); | ||
InitializeOriginal(); | ||
CreateFaces({}); | ||
SimplifyTopology(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI @Kushal-Shah-03 I simplified the hull setup - hopefully improves the speed a bit.
CreateFace()
scales pretty poorly with model size and isn't always needed, so I'm removing it from a bunch of our functions and expecting users to callAsOriginal()
instead when they want coplanar faces identified. I've also simplified some tests, which identified some existing bugs, particularly inSetProperties
, so there are some fixes here as well.I'm still thinking through the API implications of all this and trying to make sure I have the right shape. I've also removed
propertyTolerance
from our constructors - it is only needed forCreateFaces
, so now it's just an input toAsOriginal
.Next I'm going to work on a follow-on that splits the concepts of
faceID
and coplanarity. I believe this will allow me to remove the slow part ofCreateFaces
entirely (connected components) and allowWarp
andRefine
to retain their mesh relations - currently those get destroyed since coplanarity gets broken.