-
Notifications
You must be signed in to change notification settings - Fork 35
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
Add ORANGE surface construction components #1001
Conversation
* id. | ||
* | ||
* The second case adds the surface so that multiple nearby surfaces can be | ||
* \em chained together, even if the tolerance between the furthest apart is |
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.
I understand the purpose of the em-dashes above, but not in this paragraph.
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.
The em
is the <em>
html tag aka "emphasis" (i.e., italicized).
inline LocalSurfaceId operator()(S const& surface); | ||
|
||
private: | ||
using MapSurfId = std::unordered_map<LocalSurfaceId, LocalSurfaceId>; |
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.
>>> TYPES
, >>> HELPER FUNCTIONS
, >>> DATA
for consistency, but not necessary
src/orange/surf/FaceNamer.cc
Outdated
|
||
//---------------------------------------------------------------------------// | ||
/*! | ||
* Construct a name for a sphere. |
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.
centered sphere
/*! | ||
* Construct a name for a sphere. | ||
*/ | ||
std::string FaceNamer::Impl::operator()(Sphere const&) const |
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.
Are sphere and centered sphere supposed to have the same name?
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.
Yeah, that's how it is in the current SCALE builder. I can't think of any shape that has anything but a single sphere...
This adds two classes necessary for constructing surfaces from shapes:
LocalSurfaceInserter
which deduplicates surfaces, including chaining nearly-adjacent surfaces (see test) which is something the SCALE ORANGE fails to doFaceNamer
which constructs surface extensions (e.g.px
,p1
,s
) to be combined with shape names to form surface namesCurrently inserting N surfaces with deduplication is an
O(N^2)
operation because the initial implementation does not use hashing to reduce the number of surfaces needed to test. However, in opt mode (on my laptop) 32k surface insertions take under a second, and a debug build takes just over a second to do 8k surfaces.