-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
[Core] Create ElementMap.h
and tests
#8923
Conversation
As mentioned in a comment in the issue, I have not moved constants from |
@realthunder are there any other constants that can be stored here? Also, question, where are the mod/gen/upper/lower strings in your own branch? |
My thinking of moving the TopoShapeOpCode items was that future programmers would find it convenient to have a single place to "interpret the meaning" of a particular mapped name. Since since these are simple constants from a standard default workbench, it would not add much complication to the Part workbench later. Is the new TopoShapeOpCode.h file more about the naming algorithm or more about the Part workbench? It is both; so there is not a clear answer for where to put them. If you are keeping them separate, you might consider placing the |
48d3747
to
3205a6f
Compare
Is there a reason to store constants as |
11a67a1
to
e3ced6c
Compare
src/App/ElementMap.h
Outdated
const std::string POSTFIX_MOD = ";:M"; | ||
const std::string POSTFIX_GEN = ";:G"; | ||
const std::string POSTFIX_MODGEN = ";:MG"; | ||
const std::string POSTFIX_DUPLICATE = ";D"; |
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.
Why is this the only one that doesn't have a :
? It looks odd. And for that matter, why do all the others have a :
anyways?
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 believe the answer to the first is there may be other meanings when the :
is not used. As for why this particular postfix doesn't have the colon, I'm just taking it from the issue. I don't see it used in the development/toponaming
branch, but RT may have just not merged it.
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.
@JohnAD @realthunder could you pitch in?
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.
My intention is for ;:
as the separator for a postfix
that may be used for parsing later on. ;D
is not exposed in my original code as a postfix
. It is internally used as a default way to rename duplicated element that may be overridden by derived class.
Note that I'm very much an amateur so don't take me too seriously. |
AFAIK Part is used in those WB's as well. I do expect there may be other such WB specific names. Can't think of operations right now, but I'm sure there may be operations that are defined for, say path, but not used in part. |
e3ced6c
to
5fdde9d
Compare
@chennes I've replaced the |
Awesome. I'm thinking we'll hold the merge for a short time here to see if either @realthunder or @JohnAD can comment on the |
5fdde9d
to
125eacd
Compare
The first priority of the topo naming encoding scheme is to generate unique and stable names for geometry elements. Decoding and history tracing is a With that in mind, you'll see that |
Test is a dummy for now. `ElementMap.h` only contains const values.
f0e9d86
to
2aca160
Compare
Constants to be used in the future. Apply suggestions from code review Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2aca160
to
27a9879
Compare
@AjinkyaDahale this looks ready to merge to me -- anything else you want to do before that happens? |
@chennes no I think we're fine. |
ElementMap.h
for now contains a list of constants which will be used in theElementMap
class in a future phase of toponaming solution.Intended to fix #8768.