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
[Problem] User Models break when topological entities change name (Topological Naming Issue) #8432
Comments
An almost on-topic question: any recommendations for a good way to do breakpoint-style debugging the C++ code in FreeCAD. I figured I'd ask before I started diving in head-first. Up to this point I've just been analyzing code and mapping out connections. My normal flow for cpp work is JetBrains CLion for my editor and a newish 16-core laptop running PopOS! (an Ubuntu variant). But I've got lots of tools available including Visual Studio and a 4-core Win10 laptop; and I am happy to switch if there is an advantage. |
I'm concerned. As someone who has been working with C++ for less than a year I was hoping to learn something from the methodology of the paid professional. I was surprised then to find him needing help to do something as trivial as setting a breakpoint. I looked at his YouTube channel, and nothing there is C++ related, and his only C++ github repository is FreeCAD. |
You just questioned the credentials of a new contributor to the project by misquoting him. You left off the in FreeCAD part of his question. This is a person you've never met and your first comment is meant to undermine him. You should be ashamed. The Github issue discussions should have a higher standard of professional discourse and courtesy. In the future, please try to keep your comments constructive. |
Just so it's recorded someplace: the trick to getting CLion to work with FreeCAD is you need to explicitly "Build All" -- for some reason it doesn't get the "ALL_BUILD" target that you would have in Visual Studio. |
I too use CLion and there was no trick when I did this a couple of weeks ago. Just do debug build and away you go. Breakpoints work immediately. |
You all have a preferred place for a Gantt chart? If not, I'll throw something into a public repo using https://www.diagrams.net/ . I should have a crude starting point up this coming week. (I actually have done one, but I already see holes and errors. I'm going to dive into some more code first.) |
I don't know whether it fits your needs, but you can embedded Gantt charts directly in markdown files on github via mermaid, see https://github.com/mermaidjs/mermaid-gitbook/blob/master/content/gantt.md As a lokal playground, https://kroki.io works great. |
Does the following table and interpretation from the code look correct to you:
(above edited based on RealThunder's feedback) And anything else is most likely an operation. (for ref: look through code in And so, the interpretation of the simple
MappedName portion begins
MappedName portion stops
|
I apologize for not responding sooner. I am a generalist. While it is true that I've been using C++ since version 2.0 in the late 90s; that isn't enough. I've learned that most large systems; especially ones written in non-idiomatic languages like C++, C, and assembler, are never in a predictable pattern. Each system has a team that has learned behaviors, formatting, tools, and institutional knowledge. So, I'm happy to ask basic questions like "what is the recommended way of doing such and such". Not just because it can help (it can), but the questions usually bring in more insight. Any more, I also like to pair program for a bit with a new client, but I'm not sure I can pull that off with an open source group :-) As to the need to do ALL_BUILD at least once. On my machine, it seems to be a requirement as CLion is not detecting that a lot of the supporting elements have not been generated/moved/etc (such as SVG files, etc.) until it is run at least once. After that, I can simply use the 'Debug FreeCadMain` icon on the toolbar and away it goes. |
@JohnAD In my code, I call those Correction: the
Just some quick notes. I'll add more later. |
Wouldn't the first step of investigating this TopoNaming issue be to trace the usage and whereabouts of the 2 functions https://github.com/realthunder/FreeCAD/blob/LinkDaily/src/App/ComplexGeoData.cpp#L1587 at least that's where I would begin the journey |
Breaking this into to planning parts. First, the general pattern: flowchart TD
id1([Prepare])
id2([Implement])
id3([Integrate])
id4>Enable]
id5(Optimize)
id1 --> id2
id2 --> id3
id3 --> id4
id4 --> id5
id5 --> id5
|
Only 13 individual steps so far, but I'm sure there will be more as we discuss things. Any and all insight/feedback is great as you all have much experience with the structure of FreeCAD. The Much of this is mild reorganization since the basics are already written by RealThunder. But adding test cases and slower migration will help with organizing this stuff in our collective heads.
|
The steps are not in a gantt chart yet as I'm still untangling order in my head for steps 3 and 4; but I'm not far. |
Here's the start of a Gantt chart.
In other words, assuming anything about 'when' by reading this chart is foolish. It's guaranteed to be wrong. gantt
title Toponaming Fix Plan
dateFormat YYYY-MM-DD
section Prepare
start : milestone, m1, 2023-03-15,2min
IndexedName :p1, after m1, 10d
MappedName :p2, after m1 , 10d
ElementMap.h :p3, after m1 , 10d
end : milestone, m2, after p3,2min
section Implement
ComplexGeoData.cpp classes :i1, after m2, 10d
ComplexGeoData.cpp/h selection view visibility :i2, after i1, 10d
ElementMap.cpp :i3, after i2 , 10d
user-defined element naming :i4, after i3, 10d
end : milestone, m3, after i4, 2min
Release V0.21: milestone, R1, after m3, 2min
section Integrate
Adjustments to Sketcher workbench :ii3, after R1 , 10d
Adjustments to Part workbench :ii2, after R1 , 10d
Adjustments to ComplexGeoDataPy :ii4, after R1 , 10d
end : milestone, m4, after ii4 ,2min
section Enable
Adjustments to Save / Restore processes :e1, after ii4 , 10d
Adjustments to Sketcher workbench :e3, after ii4 , 10d
Adjustments to Part workbench :e2, after ii4 , 10d
end : milestone, m5, after e3, 2min
section Optimize
MappedName hashing? :o1, after e3 , 10d
IndexedName? int:string map cache per-project or system-wide. :o2, after e3 , 10d
end : milestone, m6, after o2, 2min
|
Considering that sketcher is the one that will get the strongest stability and already provides a lot of functionality outside of it, and in light of many previous comments from zolko, is it possible to do sketcher first and then Part? Or is the Part side an unavoidable prerequisite for doing it in sketcher? |
This is very nice and desired (and I think not currently provided by rt's solution), but the mapped names seem very long and not too user friendly, is this what will be displayed? Can we find something else? Like unique numbers or something. |
The long mapped names would only be seen in the Selection View window. Elsewhere only the short name is seen. And, certainly, we can even change that behavior later during the optimization phase. There is no real need for the end user to see the mapped names; it is more of a developer convenience. Perhaps during the optimization dev phase, we could have a global flag settable in the Python Console that lets developers see the mapped name, otherwise the simpler name is shown? |
I've made edits to the charts above based on changes made in a meeting with other devs this morning. |
I've added the first 4 cards as Issues and edited the above chart. I'll start generating Phase 2 cards next. Those get somewhat more complicated but shouldn't be too bad. |
I'm subscribed to this issue because I stumbled across the topo naming problem a few times and am excited for upcoming fixes for it. I read through this issue, but have trouble understanding if it will be fixed by this and what the fix will actually be. Is the problem, current state and solution documented somewhere? As a newish user of freecad it would be helpful to know how likely this will solve the problem from a users perpective and what the connection to @realthunder 's branch is. Should I be using that? Should I just wait for the next official release? I assume I'm not the only one stumbling over this issue, maybe someone can link an issue to read up on the plans |
Proposed cards for Phase 3: Phase 3: Integrate
Phase 3
|
Please make comments and suggestions. I know more about the Part workbench than the Sketcher workbench; so all Sketcher help is extra appreciated 😄 . |
Over the course of the next 24 hours, I will be creating 32-or-so Issues named in the form of:
They will be linked into the opening comment/description at the top of this issue; and they will be linked to the TopoNaming project. |
After starting up the cards, it appears that the "TopoShape and TopoShapeEx (BIG card)" mentioned in Part 2 the list above must be done before the remaining parts of Part 1. So, I'm adding moving that card after card 1 and before card 2. Essentially:
|
Any updates? Phase 3 was planned some time ago, but the work wasn't started. |
We are working on the TopoShape class -- it is massive (94 added methods in 10,000 lines of code). Right now we are waiting for some additional documentation about a caching mechanism from @realthunder. |
Great to hear this is still being worked on! |
Many thanks for the work everyone is doing towards solving this issue. For those of us who are following the progress, would it be possible for a maintainer to add the "Phase 3" issue list (in #8432 (comment) or by the list of issue references to the main issue description? This is just a suggestion to make it easier to potential contributors to see what's being done and one left from a SSoT (Single Source of Truth) position without having to navigate through all the comments. If it helps, here's the markdown to copy and paste the current list of issues
Thanks! |
this should be what you're looking for https://github.com/orgs/FreeCAD/projects/2, let me know if that helps |
I'm aware of the GitHub project, which is also mentioned in the issue description. But thanks for pointing it out in any case! |
Wow, it looks like there has been a lot of progress lately! Keep it up! ❤️ |
Problem description
The FreeCAD Topological Naming issue is well known. It has been a concern for years but no issue exists for it.
The resolution of this issue will involve many individual Pull Requests and probably create numerous secondary issues.
This issue is being created to centralize information, coordinate discussion, and track related topics.
Realthunder has demonstrated a viable solution to the problem in his Link branch. Merging this into master has proven difficult for a variety of reasons.
Anything else?
Realthunder has described how his algorithm works
Related Issues
There's an associated project which gives a nice kanban style view of the progress
Implementation Plan
Phase 1
Phase 2
Other Communication Channels
There's a telegram group for realtime chat about toponaming issues.
Code of Conduct
The text was updated successfully, but these errors were encountered: