A thought on topological naming error fixing, the process

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Post Reply
freedman
Veteran
Posts: 3472
Joined: Thu Mar 22, 2018 3:02 am
Location: Washington State, USA

A thought on topological naming error fixing, the process

Post by freedman »

Just an idea, could be a duplicate, I don't know. Maybe a little simplistic just to get the idea across....

FreeCADs GUI does all the work of organizing the model data and then hands the data off to OCC. At that point the GUI waits for the OCC result. When OCC returns the data-set we either have a broken model because of a topological naming problem or all is good. We all know this....

Here's the concept: FreeCAD would keep two separate instances of the model. One instance is the last valid recomputed model and the other instance is the latest version (where you changed something). FreeCAD will always give OCC the modified model and let it process it, if OCC shows no errors then FreeCAD makes it the new valid model, if there are errors then the user has to figure out what to fix. There could be a icon button that allows us to flip between the new and prior model. This way we could identify the new face names and remap.

With OCC always being a "flip of the coin" (and TNP in general) this concept would be bullet proof, you have new and old.

The next step would be to show what's broken so the user can react.
Last edited by freedman on Mon Nov 23, 2020 4:54 pm, edited 1 time in total.
chrisb
Veteran
Posts: 54280
Joined: Tue Mar 17, 2015 9:14 am

Re: A thought on a topological naming error fix process

Post by chrisb »

As there are improvements in the queue, it may be useless additional effort for the developers to implement this. You can of course open a second FreeCAD instance and open the model there a second time. Not quite as convenient as your proposal, but before big changes to previous steps you should save anyway.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: A thought on a topological naming error fix process

Post by jmaustpc »

It doesn't work the way you think and its more complex. If this was so easy to fix it would have been fix a decade ago.
freedman wrote: Mon Nov 23, 2020 6:19 am FreeCAD will always give OCC the modified model and let it process it, if OCC shows no errors then FreeCAD makes it the new valid model, if there are errors then the user has to figure out what to fix.
The errors are not always OCC errors, in fact usually are not. The error is often FreeCAD applying the OCC result or sending OCC wrong/unexpected data,

In some ways, FreeCAD sort of already does this anyway. If you have a PartDesign Feature fail (as in really fail not just be put in the wrong place) then FreeCAD does not change/update the later features, it just puts the error icon over the invalid feature's icon. Sometime those "genuine" fails are FreeCAD errors and only sometimes OCC. By genuine error I mean things that could not make a valid result, e.g. a line with no length, a Body with disconnected solids, etc.
freedman
Veteran
Posts: 3472
Joined: Thu Mar 22, 2018 3:02 am
Location: Washington State, USA

Re: A thought on a topological naming error fix process

Post by freedman »

Hopefully these conversations help the developers and are thought provoking.

If you (a programmer) have a modeling error and you have two complete data sets to look at, you can start to analyze and highlight faces or give visual feedback using coordinates from both models. You would have reference placement for everything. You could get a visual face from the prior model and bring it into the current model (highlighted) to display an error, for instance.

Another advantage is almost a free "Revert" button, you wouldn't have to recompute the model, just reload the prior. We could swap between the current and the prior.
Sometime those "genuine" fails are FreeCAD errors and only sometimes OCC.
This adds more possible errors.

It just seems to me that a good starting place to recover from an error is to have a good path back to a valid model. Something easy to reference without using an algorithm to figure out where things used to be. I know if I had to tackle error handling in CAD that's what I would want.
Thanks
drmacro
Veteran
Posts: 9001
Joined: Sun Mar 02, 2014 4:35 pm

Re: A thought on a topological naming error fix process

Post by drmacro »

Or, maybe this discussion is "insert some period of time here" late. 8-)

Since it seems the problem has been solved in another branch that has not been merged with the master branch sometime in the 0.20 development cycle.

Because what regression bugs could a few thousand changed lines of code cause? ;)

Head on over to github and get said branch and help test it...

:?:
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
freedman
Veteran
Posts: 3472
Joined: Thu Mar 22, 2018 3:02 am
Location: Washington State, USA

Re: A thought on topological naming error fixing, the process

Post by freedman »

Are you talking about Assembly3? I downloaded the latest ASM3 and created the middle plate (highlighted) on the XY plane. I then create a sketch on a side face and extruded, you can see the shape created on the outside face. Then the real test, I went back to the main first sketch and created a cutout under each shape. I did that 8 times. I would say that is pretty good topological naming control.

It must be time to give ASM3 another try. Every time I have tried in the past things didn't work out very well because there was so much development going on.
Attachments
TNP_pic.JPG
TNP_pic.JPG (48.38 KiB) Viewed 530 times
Post Reply