Bent plate, best way to add feature and avoid topo errors

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
kisolre
Posts: 3017
Joined: Wed Nov 21, 2018 1:13 pm

Re: Bent plate, best way to add feature and avoid topo errors

Postby kisolre » Thu Mar 19, 2020 8:39 am

Did not read all but here is last file with datum plane attached to the sketch:
.
AttachmentExample.JPG
AttachmentExample.JPG (108.96 KiB) Viewed 286 times
Attachments
Datum_sloped_1_kiss.FCStd
(19.46 KiB) Downloaded 8 times
kisolre
Posts: 3017
Joined: Wed Nov 21, 2018 1:13 pm

Re: Bent plate, best way to add feature and avoid topo errors

Postby kisolre » Thu Mar 19, 2020 9:25 am

Sorry, did not recalculate previous file. Here is a corrected one with imported support edge for proper positioning of geometry relative to the resulting face.
Attachments
Datum_sloped_1_kiss.FCStd
(20.6 KiB) Downloaded 9 times
chrisb
Posts: 30846
Joined: Tue Mar 17, 2015 9:14 am

Re: Bent plate, best way to add feature and avoid topo errors

Postby chrisb » Thu Mar 19, 2020 2:02 pm

It is sort of reassuring to see that as time goes by modeling standards evolve: I had attached the DatumPlane in the same way as kisolre.

Freedman's arguments cannot be neglected just with a fingersnip and we probably all want to learn how to handle topological naming issues without getting too emotional. So I provoked situations where the "attached model" (shortcut for the "model having the DatumPlane attached") could break, while the unattached stays sort of stable. As base I took a slightly modified version of kisolre's model.
  • I removed a coincidence ...
    Snip macro screenshot-c04391.png
    Snip macro screenshot-c04391.png (4.34 KiB) Viewed 269 times
    ... and added an additional corner. The result is as good as it can get, no additional action was necessary:
    Snip macro screenshot-62bfe1.png
    Snip macro screenshot-62bfe1.png (8.99 KiB) Viewed 269 times
  • The same but due to rounding errors changed the angle:
    No additional action was necessary
  • Decreasing the height before or after one of the previous steps did not let the model break. No additional actions were necessary.
  • Next I deleted the upper line and remade it. This caused in sketcher a renumbering from the upper edge from 3 to 6. That breaks the slot_padded with a multiple-solids message independent from a change in the angle.

    While the plane itself still seems to be ok, it seems to have turned around:
    Snip macro screenshot-2be6f5.png
    Snip macro screenshot-2be6f5.png (12.27 KiB) Viewed 269 times
    I could with some difficulties (they will be subject of another topic) change the attachment and after reversing the pad things were roughly in their old position.
  • Decreasing after that the height did not let the model break.
  • I then did the same with the detach/reattach method.
    No additional actions were necessary, the DatumPlane could stay detached.
  • With changing the angle:
    - Double click DatumPlane
    - select the same attachment mode as before
    - select Deactivated
    -confirm
  • For changing the height - before or after - the same additional actions as in the previous case were necessary
  • Then I redid the use case from above with deleting and recreating the upper line
    Usually I had expected that no additional actions were necessary, and that the DatumPlane could stay detached. But I had rounded the dimensions so the angle had changed.
    - without angle change: no additional action was necessary
    - with angle change: the same atachment difficulties as above + detach
  • A height change after a no-angle-change requires the same new attachment with the additional difficulties as above.
So there seem to be some odds against each method which can be more or less tedious or serious. With the detach/reattach method trivial actions have to be made rather often, the benefit is that in some cases true attachment changes don't have to be performed at all.
You need at least FreeCAD 0.19.23300 to edit my current sketches.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
freedman
Posts: 1735
Joined: Thu Mar 22, 2018 3:02 am
Location: Washington State, USA

Re: Bent plate, best way to add feature and avoid topo errors

Postby freedman » Thu Mar 19, 2020 4:18 pm

chrisb, I performed the same tests you did with the same results, nice write-up. In reference to using sketch attachment, I could live with an error popping up or a modeling halt but that isn't what I get, I get a contorted model that can really mess with your head to fix, often times when these breaks occur they mess up down stream features.

For comparison: The same model using re/deactivation.
With the plane deactivated, I removed a coincidence and the model threw an error as expected, with the coincidence replaced the model recomputed no problem.
I then added a cutout on the sketch and changed the angle, this of coarse did not compute correctly because the datum plane is deactivated. With a couple mouse clicks I do an automated or a manual face-datum plane reattachment. Everything is correct.

The big difference I see here is when changes need to be done and I'm in the midst of a complex model, I don't want sketches rotating or swapping sides, it just freaks me out. :) I fixed many of those in the beginning and got pretty good at it but when you have a 100 hours into a customer model and it breaks somewhere back at it's beginning, well the blood pressure goes up for a while.

I found by using the deactivation method I get consistant results (when changing any sketch or feature) and I always let FreeCAD do the attachment so I know the dimensions and placements are correct. When topo errors are fixed then all datum planes can be activated.

I know everyone here has there own way of doing things and I can't change that (don't want to), but what about how do we teach the new users. What do you think?
chrisb
Posts: 30846
Joined: Tue Mar 17, 2015 9:14 am

Re: Bent plate, best way to add feature and avoid topo errors

Postby chrisb » Thu Mar 19, 2020 5:26 pm

Short version: I think we should teach here how to properly attach. Telling them to detach after that may be more confusing. As I hope that the situation will improve anyway, this way is future safe too - no asking which version, before xxx? please detach, after xxx? please attach.

It takes quite some effort - usually more that it seems from the rather simple example we have here - to get maximum stability. On the other hand usually the base shape is quite well known and I hardly forget edges in a sketch or have too many. So the modifications here are almost always stable.

However, with the current version things can get worse than what we saw in the example above: I had hoped for a jumping to another plane, but it didn't :? . In reality such jumping can cause external references to become invalid or even worse to mess up a sketch so that it has to be reworked even after reattaching. What I would like to have is a possibility to do what you do always: detach things to be defined automatically until they are reattached.
I hope we won't need such tool after realthunder's toponaming improvements.
You need at least FreeCAD 0.19.23300 to edit my current sketches.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
freedman
Posts: 1735
Joined: Thu Mar 22, 2018 3:02 am
Location: Washington State, USA

Re: Bent plate, best way to add feature and avoid topo errors

Postby freedman » Fri Mar 20, 2020 12:01 am

this way the future is safe too - no asking which version, before xxx? please detach, after xxx? please attach.
Ya! That's exactly what would happen. So for now, instruct on how to attach and then reference the stable model documentation to follow the current state of the program.

Seeing what happened here wouldn't it be prudent to modify the text here: https://www.freecadweb.org/wiki/Feature ... ble_models

Thanks for all the testing.