File breakage when using FreeCAD 0.19

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!
xryl669
Posts: 32
Joined: Fri Jul 31, 2020 1:19 pm

File breakage when using FreeCAD 0.19

Post by xryl669 »

I've started a body design (see attachment).
I was able to open it and modify it numerous time, but now it doesn't load anymore (try to open the first sketch, it'll fail)

It does not load with error (nothing else than these two lines):

Code: Select all

07:18:11  SketchObject::onChanged(): Unmanaged change of Constraint Property results in invalid constraint indices
07:18:11  SketchObject::onChanged(): Unmanaged change of Constraint Property results in invalid constraint indices
Please notice that I'm using a Spreadsheet for parametric variables

I've copied the file to try to open with FreeCAD 0.20.25065 and also opened the FCStd1 file in 0.19.22960 too and none work.

The tried Freecad version:
What I used for making the file (reading/writing):
OS: Manjaro Linux (KDE/plasma)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.22960 (Git) AppImage
Build type: Release
Branch: master
Hash: c5a4b01d2e4218bcc0eb6650337650a6c65ef0e4
Python version: 3.8.6
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: French/France (fr_FR)

The latest version I could find to try to open the file (only reading):
OS: Manjaro Linux (KDE/plasma)
Word size of FreeCAD: 64-bit
Version: 0.20.25065 (Git) AppImage
Build type: Release
Branch: master
Hash: 4de2ad46b2b9c78ac2721a0dbea7c19306261095
Python version: 3.9.4
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.2
Locale: French/France (fr_FR)
Attachments
ClipTable.FCStd
The broken file
(119.83 KiB) Downloaded 34 times
User avatar
Willem
Veteran
Posts: 1854
Joined: Fri Aug 12, 2016 3:27 pm
Location: Lisse, The Netherlands

Re: File breakage when using FreeCAD 0.19

Post by Willem »

I think this problem is OS related because on my system the file opens without problem and can be edited.
Another possibly is corrupted config files. These can be reset under preferences

My system
OS: Ubuntu 18.04.5 LTS (ubuntu:GNOME/ubuntu)
Word size of FreeCAD: 64-bit
Version: 0.20.
Build type: Release
Branch: unknown
Hash: 728c001421868d6bdf01eebc047469b181127388
Python version: 3.6.9
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.5.1
Locale: Dutch/Netherlands (nl_NL)
User avatar
papyblaise
Veteran
Posts: 8015
Joined: Thu Jun 13, 2019 4:28 pm
Location: France

Re: File breakage when using FreeCAD 0.19

Post by papyblaise »

at home, sketch is empty :!:
Did you delete it by mistake :?:
chrisb
Veteran
Posts: 54278
Joined: Tue Mar 17, 2015 9:14 am

Re: File breakage when using FreeCAD 0.19

Post by chrisb »

Willem wrote: Wed Jun 16, 2021 6:04 am I think this problem is OS related because on my system the file opens without problem and can be edited.
I wonder how you can edit "Sketch". I looked at the file itself into Document.xml and there is no geometry at all in the sketch. There are, however many constraints on the non existant geometry.

It looks to me as if this file was intermediately edited with an old 0.18 version.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
xryl669
Posts: 32
Joined: Fri Jul 31, 2020 1:19 pm

Re: File breakage when using FreeCAD 0.19

Post by xryl669 »

I've edited the file with both linux and macos. The macos version is 0.19 too. The sketch is also empty for me, and the XML file is also missing the sketch' data.
I don't think I still have a 0.18 version, so I don't think I edited it with a 0.18 version.
@Willem, if you can edit the file sketch, can you re-save it and post it here please ?
TheMarkster
Veteran
Posts: 5513
Joined: Thu Apr 05, 2018 1:53 am

Re: File breakage when using FreeCAD 0.19

Post by TheMarkster »

You can recover the sketch, but you will need to constrain again. And this will probably need to be done for all the sketches. You will likely also need to reattach subsequent sketches. In the file below I only worked on recovering the first sketch.

Go to part workbench, select the sketch and extrude. Then take a cross section of the new extrude object using the cross section tool. Go to draft workbench and use draft to sketch tool on the cross section to recreate the sketch geometry. Drag/drop the new sketch into the body and change the pad's profile property to point to the new sketch.

It is generally not recommended at this time to attach sketches directly to faces. It is more robust/stable to attach the sketch to one of the major planes and modify the attachment offset to place the sketch in the desired position. It is a pain, but can prevent some issues if later you go back up the tree and modify earlier sketches. There is a fix for this known issue in the works, but as I have been occupied with other things lately I do not know if the fix has yet made it into the latest development code.
Attachments
ClipTable-partially-fixed-markster.FCStd
(98.63 KiB) Downloaded 24 times
un1corn
Posts: 245
Joined: Sat Dec 26, 2015 2:06 pm

Re: File breakage when using FreeCAD 0.19

Post by un1corn »

I had a similar problem a year or so ago in V18, A file was saved with an error and kept resaving with that error.
Look for it in file explorer and you may find several same name files saved with long alpha/numeric extensions.
Try renaming them one at a time with FCStd1 as an extension, if you can recover a good file, delete the rest.
This worked for me.
xryl669
Posts: 32
Joined: Fri Jul 31, 2020 1:19 pm

Re: File breakage when using FreeCAD 0.19

Post by xryl669 »

@TheMarkster Thanks for the tip. Indeed it's not obvious but hopefully good to know you can recover sketches this way.
Concerning attaching sketches to face, I'm always doing it and it's the first time it failed this way. While it's possible to attach to a datum or to a major plane, it's not always possible to do, when you are extruding/pocketing from a non orthogonal plane (XY, XZ, YZ), and I don't really want to compute the axis and rotation by myself.

Again I'd like to thank you for your tip, you saved me a lot of time.

@un1corn I've tried to recover FCStd1 files but none worked. I guess I should have been more aware of the sketch broken icon and do this when it appeared but I failed to notice it and I probably hit Ctrl+S multiple time, overwriting the backup files.
xryl669
Posts: 32
Joined: Fri Jul 31, 2020 1:19 pm

Re: File breakage when using FreeCAD 0.19

Post by xryl669 »

@TheMarkster, With the latest 0.20.25065, if I understand correctly, there are fixes for topological naming issues and indeed, I've seen less breakage when modifying sketches in initial functions than in 0.19 version where it usually required to re-attach the sketches to face. I wonder if this bug I'm reporting here is linked with the Spreadsheet feature used for specifying constraints.
In my initial file, all constraints where computed from the spreadsheet variables, if it's of any help.
drmacro
Veteran
Posts: 9000
Joined: Sun Mar 02, 2014 4:35 pm

Re: File breakage when using FreeCAD 0.19

Post by drmacro »

Unless the tnp fix was added in the last 24 hours, I don't think the fix has been merged.

🤔
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
Post Reply