Parameter changes break the model even when no change is made.

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!
Post Reply
DrC
Posts: 32
Joined: Tue Sep 13, 2016 1:12 am

Parameter changes break the model even when no change is made.

Post by DrC »

I have what I believe is a pretty robust design for a lump of plastic. It was designed from the ground up to match a set of dimensions that would change for each user. There are a couple of constants used for wall and shelf thicknesses, and to provide mechanical stability, but the rest is user defined.

You can see it in detail at https://forum.freecadweb.org/viewtopic.php?f=24&t=61675

Even opening and closing the sketch defining the window width breaks it. Can anybody tell me why? I have tried everything, even down to avoiding internal cross references where rounding errors might leave vestiges of solid hanging in mid air, but to no avail.

I am using the latest public release 0.19

Thanks,

DrC

OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.23141 (Git)
Build type: Release
Branch: master
Hash: 0eba78d40096720f7a637a9a73c382a08b820bca
Python version: 3.8.6
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: English/United Kingdom (en_GB)
chrisb
Veteran
Posts: 53939
Joined: Tue Mar 17, 2015 9:14 am

Re: Parameter changes break the model even when no change is made.

Post by chrisb »

A recompute reveals the same as opening and closing a sketch: The broken sketches have redundant constraints.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Parameter changes break the model even when no change is made.

Post by GeneFC »

In addition to the redundancies in most sketches the entire model is somewhat fragile due to the practice of attaching every new sketch to the preceding geometry. While this will work fine if the model remains unmodified, it will almost certainly cause topological naming problems (TNP) when parametric changes are made.

Best practice for sketches calls for fully constraining sketches before closing (recommended) and ensuring there are no error messages (mandatory). Most of your sketches show errors.

Gene
DrC
Posts: 32
Joined: Tue Sep 13, 2016 1:12 am

Re: Parameter changes break the model even when no change is made.

Post by DrC »

Thank you for being there and responding.

I have looked into all that. Turning auto-compute off helped me to make some progress ...

Converting every sketch to exclude reference points from earlier stages breaks much of the value of a parametric modelling system but I did it anyway - still got problems.

I then deleted everything the system might dislike, features, sketches, everything, starting at the final stage until only the initial cuboid and the rectangular window cut out were left.

Still a problem.

Something has been left behind in the model that shouldn't be there. Reloading FreeCad doesn't help - so what is it and why?

The initial design renders OK, slices OK and shows every promise of 3D printing OK.

Very puzzling. I hope whatever it is can be sorted for 2.0

DrC
Attachments
ChrisPortraitPad.png
ChrisPortraitPad.png (75 KiB) Viewed 2013 times
ChrisPortraitSketch.png
ChrisPortraitSketch.png (114.2 KiB) Viewed 2013 times
ChrisPortraitPocket.png
ChrisPortraitPocket.png (71.52 KiB) Viewed 2013 times
ChrisBroken.png
ChrisBroken.png (99.75 KiB) Viewed 2013 times
ChrisPortrait.FCStd
(24.1 KiB) Downloaded 47 times
User avatar
Shalmeneser
Veteran
Posts: 9475
Joined: Wed Dec 23, 2020 12:04 am
Location: Fr

Re: Parameter changes break the model even when no change is made.

Post by Shalmeneser »

DrC wrote: Sat Aug 28, 2021 6:35 am Something has been left behind in the model that shouldn't be there. ... so what is it and why?
I open the support of Sketch(000) then close it immediatly, then it's ok. :lol: :ugeek:
User avatar
Shalmeneser
Veteran
Posts: 9475
Joined: Wed Dec 23, 2020 12:04 am
Location: Fr

Re: Parameter changes break the model even when no change is made.

Post by Shalmeneser »

For Rosie, there is a redondant constrain in Profile sketch. I just have to try to shake the sketch then it's ok. :lol: :ugeek:
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Parameter changes break the model even when no change is made.

Post by GeneFC »

DrC wrote: Sat Aug 28, 2021 6:35 am Converting every sketch to exclude reference points from earlier stages breaks much of the value of a parametric modelling system
Sorry, that is not what I was trying to suggest. There are definitely methods to include reference points. Expressions, spreadsheets, master sketches, etc.

What does not work well is directly attaching a sketch to pre-existing geometry.

If you need more assistance with making a truly parametric model then this is the place to get help. Spell out exactly what you want to accomplish, along with a sample file, and you will get answers.

Gene
DrC
Posts: 32
Joined: Tue Sep 13, 2016 1:12 am

Re: Parameter changes break the model even when no change is made.

Post by DrC »

Shalmeneser wrote: Sat Aug 28, 2021 8:24 am For Rosie, there is a redondant constrain in Profile sketch. I just have to try to shake the sketch then it's ok. :lol: :ugeek:
Sounds like you have discovered 'Parameter changes mend the model even when no change is made' !!

Something changes. Why?
DrC
Posts: 32
Joined: Tue Sep 13, 2016 1:12 am

Re: Parameter changes break the model even when no change is made.

Post by DrC »

GeneFC wrote: Sat Aug 28, 2021 3:21 pm
Spell out exactly what you want to accomplish, along with a sample file, and you will get answers.

Gene
Thanks Gene - I'm a user rather than an expert, so that is really appreciated.

Usually I have no problem but this model excited so much comment from friends and family that I thought I would publish it in spite of the difficulties it was presenting. I'm sure it is in the software, and many of the less helpful comments seem to confirm it. I too get 'broken sketches' after an error, though I can freely go back to make changes until then. I never leave a sketch until the UI reports a 'Fully constrained sketch', and that does seem to be a genuine property of that sketch until something happens elsewhere.

I love FreeCad (thanks to all the team) and I make time to bug hunt when the opportunity presents itself, which is why I submitted the stripped down example of a 'left over' issue in a cuboid subtracted from a larger cuboid. Clearly the simple model I am left with after removing all the rest of the larger model is different in detail from what the UI says it is. I don't have the skill to understand what the difference is from looking at the model code, but more important is what was it, in the larger model, that made the difference.

I have restructured the model in a less simple form by making the working profile (the parabola and the quarter circle arc) the last stage. Now I can go back and change parameters with no problem, so it looks like something in that last stage makes further additions corrupt something. It really is up to the software team to find it!

Incidentally, as
Shalmeneser wrote: Sat Aug 28, 2021 8:24 am I just have to try to shake the sketch then it's ok. :lol: :ugeek:
it would seem my problems are caused by the inclusion of something I had removed for the simple example.

I hope this all helps make FreeCad better,

DrC

btw I did Spell out exactly what I want to accomplish, along with a sample file, but in the Users Showcase forum. I should have referenced it. Sorry.
Post Reply