Very complicated sketch when importing from STEP file

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!
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Very complicated sketch when importing from STEP file

Post by abdullah »

easyw-fc wrote: Tue Dec 22, 2020 7:49 pm it seems that at some point FC0.19 broke the tool... sketch should have changed its properties:

Code: Select all

if not g.Construction: # adding only non construction geo

'Part.Circle' object has no attribute 'Construction'
Example minimal change to use facade list instead of geometry.
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: Very complicated sketch when importing from STEP file

Post by easyw-fc »

abdullah wrote: Wed Dec 23, 2020 5:55 am Example minimal change to use facade list instead of geometry.
Thanks @abdullah .. it will be a little time to digest these changes to be implemented in my WB (I use quite a lot your sketcher and the constrainator ;) ) ... Anyway we are going to a holiday period and I will have some spare time to play with the code ... my will is to be back compatible as always in my WBs.
The occasion to wish you Happy Holidays!
Image
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Very complicated sketch when importing from STEP file

Post by abdullah »

easyw-fc wrote: Wed Dec 23, 2020 9:38 am
abdullah wrote: Wed Dec 23, 2020 5:55 am Example minimal change to use facade list instead of geometry.
Thanks @abdullah .. it will be a little time to digest these changes to be implemented in my WB (I use quite a lot your sketcher and the constrainator ;) ) ... Anyway we are going to a holiday period and I will have some spare time to play with the code ... my will is to be back compatible as always in my WBs.
The occasion to wish you Happy Holidays!
Image
You will see there is little to change. Merry Christmas!! :)
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: Very complicated sketch when importing from STEP file

Post by easyw-fc »

abdullah wrote: Wed Dec 23, 2020 11:32 am You will see there is little to change.
I just noticed that if I create a simple sketch in FC0.19, this will not be valid anymore in FC0.18.4. The sketch will be impossible to edit and FC will print:

Code: Select all

PropertyContainer::Restore: Unknown C++ exception thrown
bspline-test.FCStd
(4.17 KiB) Downloaded 23 times
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Very complicated sketch when importing from STEP file

Post by abdullah »

easyw-fc wrote: Thu Dec 24, 2020 10:49 pm
abdullah wrote: Wed Dec 23, 2020 11:32 am You will see there is little to change.
I just noticed that if I create a simple sketch in FC0.19, this will not be valid anymore in FC0.18.4. The sketch will be impossible to edit and FC will print:

Code: Select all

PropertyContainer::Restore: Unknown C++ exception thrown
bspline-test.FCStd
Indeed, migration works as backwards compatible, but not as forward compatible. Internally the storage of Part::Geometry has changed. While it is possible to provide code to migrate-back by doing a point release 0.18.5 and have a certain degree of forward compatibility, this migrate-back cannot reasonably support all the sketcher new features. Therefore, the new features would not be fully supported when opening in a hypothetical 0.18.5 with this code, or we would be bringing the whole 0.19 sketcher to 0.18, which does not make much sense. With the new improvements, I expect a mass migration towards 0.19 as soon as it is released.
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: Very complicated sketch when importing from STEP file

Post by easyw-fc »

abdullah wrote: Fri Dec 25, 2020 4:47 am Indeed, migration works as backwards compatible, but not as forward compatible.
the big issue is that the file can be opened without any warning and may be saved back as 0.18 version, not allowing the user that the sketch is broken and the same for the file.
It would be useful to have at least a pop up warning to allow the user that the format is not compatible with FC 0.18.
kisolre
Veteran
Posts: 4166
Joined: Wed Nov 21, 2018 1:13 pm

Re: Very complicated sketch when importing from STEP file

Post by kisolre »

Sketch is nor broken. It is written in incompatible format with older version but not "broken". I cant test now but maybe there is something about the conversion in the report view when the file is loaded?
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: Very complicated sketch when importing from STEP file

Post by easyw-fc »

kisolre wrote: Fri Dec 25, 2020 2:02 pm Sketch is nor broken.
In FC0.18 the sketch is definitely broken.. it is 'impossible to edit' it and it is displayed as 'invalid'. And if the file is saved and open back in FC0.19 the issue will be permanent for the file itself.
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: Very complicated sketch when importing from STEP file

Post by easyw-fc »

the new release of kicadStepUp WB should be fine now...
Post Reply