View Issue Details

IDProjectCategoryView StatusLast Update
0002507PartDesignBugpublic2018-01-03 14:29
ReporterickbyAssigned Toickby 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
PlatformLinuxOSUbuntu OS Version15.04
Product Version0.17 
Target Version0.17Fixed in Version0.17 
Summary0002507: Migration of 0.16 files fail
DescriptionAttached files cannot be migrated to 0.17 PartDesign workflow. As they are PartDesign features only this must work
Steps To Reproduce1. Load file into FreeCAD
2. Start migration routine
3. Find exclamation marks at multiple features
Tagsmigration

Relationships

related to 0003095 closed PartDesign Manual migration from 0.16 models to 0.17 models not possible 
related to 0002087 new Assembly The Part Design migration needs to be tested and updated to new structure 
related to 0002512 closedickby PartDesign Pad/Pocket does not work with independent figures in sketch (new Partdesign) 

Activities

ickby

2016-04-15 07:48

developer  

MISE_cf_retainer_1.6.FCStd (410,611 bytes)

ickby

2016-04-15 07:48

developer  

M3SE_top_cover_1.6.FCStd (790,410 bytes)

cox

2016-04-15 09:55

reporter   ~0006972

Tried to migrate the attached bejant's file from this post http://forum.freecadweb.org/viewtopic.php?f=3&t=15240&hilit=rotate&start=10#p121655 and it also fails. Do not know if it is the same issue but could be handy to test.

cox

2016-04-15 09:55

reporter  

20160414a-NutTom.fcstd (26,013 bytes)

wmayer

2016-04-17 08:12

administrator   ~0006983

Note, the errors you get are not related to the migration function. You can easily test this with the Force-Recompute macro.

The code:
import FreeCAD
if FreeCAD.ActiveDocument:
 for obj in FreeCAD.ActiveDocument.Objects:
  obj.touch()
 FreeCAD.ActiveDocument.recompute()

When running this macro then afterwards exactly the same objects are broken as when running the migration function.

For MISE_cf_retainer_1.6.FCStd these are: Pocket, Fillet, Fillet007

For M3SE_top_cover_1.6.FCStd these are: screw posts001, screw holes001, power vga nic holes 001, front wall holes001, Pad008, Pad009

For 20160414a-NutTom.fcstd this is Pad001

So, the big question is what's the actual reason. It could be also related to the topological naming issue.

wmayer

2016-04-17 08:56

administrator   ~0006984

For 20160414a-NutTom.fcstd and the broken pocket in MISE_cf_retainer_1.6.FCStd the reason is clearly the limited capabilites of the new pad/pocket function.
In the past it supported to get a compound of faces when filling a sketch (which may have several wires). Now the function ProfileBased::getVerifiedFace always expects a *single* face which might be OK for the very first sketch in the model history but is wrong for any subsequent sketch (at least as long as a single solid is the result of the following operation)

The error then is raised in line 206 where makeFace still correctly returns a compound of faces but the cast TopoDS::Face raises the exception.

Btw, makeFace may also return an empty shape which getVerifiedFace doesn't check at all. Here it should check for this and raise an exception with a meaningful text.

ickby

2016-04-17 18:18

developer   ~0006986

yes this is clearly wrong behavior, the enforcement of a single solid should happen elsewhere.

bkw

2016-04-21 16:13

reporter   ~0006995

I don't know if something changed or if I could have done this before, but today I am able to work on the MISE_* documents above by just answering No to the migrate prompt that pops up. Everything seems to work exactly the same as before, allowing for a couple issues that don't have anything to do with this bug. (Delete option removed from right-click menu on model tree items. Start page keeps re-appearing and minimizing my drawing page even though I had closed it.)

Kunda1

2017-05-02 21:51

manager   ~0008866

Related forum thread: https://forum.freecadweb.org/viewtopic.php?f=22&t=21674

normandc

2017-06-17 23:51

manager   ~0009433

Last edited: 2017-06-17 23:51

View 2 revisions

Since bug severity was set as major by @ickby, I'm setting target version to 0.17 so this report appears in the roadmap.

wmayer

2018-01-02 17:02

administrator   ~0010672

Behaviour has changed somewhat. For file 20160414a-NutTom.fcstd on recompute the sketch solver reports an error about conflicting constraints. When removing them then a recompute creates a fully valid document.

When creating a Part container then the migration works successfully.

wmayer

2018-01-02 18:20

administrator   ~0010675

Looking a bit further.

The real problem was the function ProfileBased::getVerifiedFace which didn't support multi-wire sketches but this has been fixed with
https://github.com/FreeCAD/FreeCAD/commit/83ce80f1337e7302d00b41be0f05ea349b793c41#diff-3372d16fd551ade4b3032beac4424ab8
(and https://github.com/FreeCAD/FreeCAD/commit/320763d78ab8ab11cd1e77545a0eef187d9d136c#diff-3372d16fd551ade4b3032beac4424ab8)
And as said above the errors you get is not due to a broken migration function but because the model has some flaws.
 
Currently the real limitation is that the Part container isn't created automatically any more as it was in the past. So, by doing this the ticket can be considered as fixed.

wmayer

2018-01-03 14:29

administrator   ~0010684

Automatic creation of the part container was broken with https://github.com/FreeCAD/FreeCAD/commit/dd8709467289a1a4a3da7c325cda9a503521896d (removal of PartDesign_Part command) and is fixed with https://github.com/FreeCAD/FreeCAD/commit/433f36630403e5bec095111d4b887c837a393566

Issue History

Date Modified Username Field Change
2016-04-15 07:48 ickby New Issue
2016-04-15 07:48 ickby Status new => assigned
2016-04-15 07:48 ickby Assigned To => ickby
2016-04-15 07:48 ickby File Added: MISE_cf_retainer_1.6.FCStd
2016-04-15 07:48 ickby File Added: M3SE_top_cover_1.6.FCStd
2016-04-15 09:55 cox Note Added: 0006972
2016-04-15 09:55 cox File Added: 20160414a-NutTom.fcstd
2016-04-17 08:12 wmayer Note Added: 0006983
2016-04-17 08:56 wmayer Note Added: 0006984
2016-04-17 11:39 wmayer Relationship added related to 0002512
2016-04-17 18:18 ickby Note Added: 0006986
2016-04-21 16:13 bkw Note Added: 0006995
2017-05-02 21:51 Kunda1 Note Added: 0008866
2017-06-17 23:51 normandc Product Version => 0.17
2017-06-17 23:51 normandc Target Version => 0.17
2017-06-17 23:51 normandc Note Added: 0009433
2017-06-17 23:51 normandc Note Edited: 0009433 View Revisions
2017-06-22 16:08 Kunda1 Relationship added related to 0003095
2017-06-22 16:10 Kunda1 Relationship added related to 0002087
2017-06-22 16:10 Kunda1 Tag Attached: migration
2018-01-02 17:02 wmayer Note Added: 0010672
2018-01-02 18:20 wmayer Note Added: 0010675
2018-01-03 14:29 wmayer Status assigned => closed
2018-01-03 14:29 wmayer Resolution open => fixed
2018-01-03 14:29 wmayer Fixed in Version => 0.17
2018-01-03 14:29 wmayer Note Added: 0010684