[SOLVED-ish] Weirdness : "migration process from legacy PartDesign / broken structure"

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!
Tilli
Posts: 93
Joined: Thu Jan 25, 2018 10:38 pm

[SOLVED-ish] Weirdness : "migration process from legacy PartDesign / broken structure"

Postby Tilli » Wed Apr 25, 2018 8:16 pm

Hi Again

Still trying, still failing. Same question : me or the software..?

Over the last couple of days I've suddenly started getting the following :

MigrationProcess-BrokenStructure.png
MigrationProcess-BrokenStructure.png (51.76 KiB) Viewed 791 times


With search-engines in mind, the transcribed text is :

Code: Select all

The document "<filename>" seems to be either in the middle of the migration process from legacy PartDesign or have a slightly broken structure. 

Do you want to make the migration automatically? 

Yes 
Migrate Manually 
Show Details...


As mentioned in a previous post --- and FWIW, the inconsistent behaviour with Body/Feature highlighting is still an issue, despite the Tip mode always showing as set to "Through" --- I'm still trying to model a corrugated sheet with a profile which repeats at a 200 mm interval.

At first when I'd tried clicking the "Yes" option, every time it resulted in a very unexpected miscellany of Bodies and broken Clones within a yellow Part! That seemed suspicious and the instant gut reaction was "buggy." IIRC these first encounters were with the project files created in v17. So, this current file (attached) was freshly created in v18 FreeCAD Daily, although I'll admit, the sketches were Copied from earlier and Pasted-in. (Two reasons, 1: the time it takes me to create the sketches and 2: surely Sketcher objects would not have been made incompatible needing migration, yes??? )

Using only Sketcher-WB and PartDesign-WB, my intended strategy was to :
  • create master-sketches of the repeated basic unit plus the asymmetrically-truncated left and right sides
  • copy and paste these three sketches then create Bodies in which to Pad them
  • clone the basic 200 mm unit four times, and then stick these Clones into Bodies shifted laterally to form the main part of the sheet
  • after multiple failed attempts at Booleans last week, and aware of the repeat posts about rounding-errors and gaps and overlaps, I'd decided to create sketches to be Padded into solids to bridge the joins in a fashion similar to Biscuit-Joints in Carpentry
  • do a Boolean Fuse on the whole lot to make a single solid sheet
That was the intention.

I've been dismissing the "migration/broken-structure" message with the "migrate manually" button, but now at the stage of wanting and trying to Pad the biscuit-joint sketches, it actually refuses to proceed any further, the Pad is not created. It's brought me to a grinding halt.

OTOH, clicking the "Yes" still results in an unexpected new yellow Part containing Bodies each containing an error-flagged Clone.

MigrationProcess-UnexpectedPartBodiesClones.png
MigrationProcess-UnexpectedPartBodiesClones.png (44.2 KiB) Viewed 791 times


I've not taken this further. I can't believe the sudden appearance of a strange new Part with broken contents is the intended behaviour. So I've not ploughed on and re-linked each one manually. I've restarted the project and tried slightly different steps each time.

Surely the "make the migration automatically" option shouldn't give this level of breakage, no..?

Comments welcome.

Thanks

:?


RoofSheet-007-06-by-MasterSketch-in-v18.fcstd
(554.32 KiB) Downloaded 12 times


From the PPA my FreeCAD-Daily is now v18 :

Code: Select all

OS: Linux Mint 18.1 Serena
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.13588 (Git)
Build type: None
Branch: master
Hash: 1e2b9758cc7f6872da018ee71983a82499866508
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/UnitedKingdom (en_GB)

[ EDIT 20180501 : marked as SOLVED-ish ]
Last edited by Tilli on Tue May 01, 2018 8:24 pm, edited 1 time in total.
User avatar
DeepSOIC
Posts: 7600
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: Weirdness : "migration process from legacy PartDesign / broken structure"

Postby DeepSOIC » Wed Apr 25, 2018 9:06 pm

Confirmed, the migration pops up, but it totally shouldn't.

Looking at dependency graph, I see one clue. Contents of Body (Basic200mmBody) are not shown as being in the body; the body is shown as a regular object with no links to children. Since migration looks for body-less Pad and friends to trigger the migration, that might be related.
But inspecting the actual links of Body - weird! All links are in place and correct, the ownership is not broken. I'll have to dig more for pointers...
chrisb
Posts: 24293
Joined: Tue Mar 17, 2015 9:14 am

Re: Weirdness : "migration process from legacy PartDesign / broken structure"

Postby chrisb » Wed Apr 25, 2018 9:35 pm

The failed migration is an issue, but it is more interesting what you did before.
From what I can see instead of using clones in the bodies you should rather use ShapeBinders, but I'm not sure because your file is not easy to get sorted. If you want to trace it down you should try to create a minimal example showing just the issue. Then we can concentrate far better on the matter.
User avatar
DeepSOIC
Posts: 7600
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: Weirdness : "migration process from legacy PartDesign / broken structure"

Postby DeepSOIC » Wed Apr 25, 2018 9:40 pm

Haha, found it. Had to fire up a debugger for that. PD clones outside of bodies are the problem.

Here is a minimalistic example.
false-migration-trigger-test3.fcstd
(3.7 KiB) Downloaded 9 times
Open the file, activate body, create sketch -> migration prompt.
The issue is likely to appear only after you save and reopen a project with PD clones.

Workaround? Use Draft Clone instead.
User avatar
DeepSOIC
Posts: 7600
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: Weirdness : "migration process from legacy PartDesign / broken structure"

Postby DeepSOIC » Wed Apr 25, 2018 9:59 pm

User avatar
NormandC
Posts: 18534
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Weirdness : "migration process from legacy PartDesign / broken structure"

Postby NormandC » Thu Apr 26, 2018 3:34 am

I don't deny the bugs you're encountering but, man, are you making your life waaaay more complicated that it should be. ;)

So here's an alternative with a single Body and a Draft Array. What's missing are the ends, easily added. But if you want to do them in PartDesign, you'll need to create a BaseFeature out of the Array and work in that new Body. Because, if it's supposed to be a single sheet, you should not create multiple bodies...

An important thing to follow when using PD Bodies in other workbenches: PartDesign_Body#Interaction_with_other_workbenches

FYI, I didn't bother following all the exact measurements.

Caveat:
DeepSOIC wrote:
Wed Apr 25, 2018 9:06 pm
Looking at dependency graph, I see one clue. Contents of Body (Basic200mmBody) are not shown as being in the body; the body is shown as a regular object with no links to children.
DeepSOIC wrote:
Wed Apr 25, 2018 9:40 pm
Workaround? Use Draft Clone instead.
As soon as I create a Draft object (Clone, Array) or PartDesign Clone of a Body, the Body loses its link to its children in the Dependency graph. :?
Attachments
FC018_Tilli_corrugated_sheet_example_nc1.fcstd
(501.12 KiB) Downloaded 11 times
Tilli
Posts: 93
Joined: Thu Jan 25, 2018 10:38 pm

[SOLVED?] re: Weirdness : "migration process from legacy PartDesign / broken structure"

Postby Tilli » Thu Apr 26, 2018 9:53 am

DeepSOIC wrote:
Wed Apr 25, 2018 9:06 pm
Confirmed, the migration pops up, but it totally shouldn't . . .
chrisb wrote:
Wed Apr 25, 2018 9:35 pm
The failed migration is an issue . . .
DeepSOIC wrote:
Wed Apr 25, 2018 9:40 pm
Haha, found it . . . PD clones outside of bodies are the problem . . .
DeepSOIC wrote:
Wed Apr 25, 2018 9:59 pm
wrote issue #0003447
NormandC wrote:
Thu Apr 26, 2018 3:34 am
I don't deny the bugs you're encountering . . .

Thanks @DeepSOIC @chrisb and @NormandC for taking a look. It never ceases to amaze, how active and helpful this community is. Thanks for confirming there's an issue. I'm glad I was able to help reveal it, but I do have to smile... there's a little quote I've encountered several times over the years, something which is probably relevant : "When you're building a Foolproof System, never underestimate the ingenuity of Fools!" :D And indeed, Mea Culpa!

And for completeness, for anyone wondering about the apparent complexity and madness in my workflow and this file, I'll try (in a subsequent post) to explain the reasoning behind it, because it might shed light on some misapprehensions easily picked up by a new user.

I'll certainly look at the alternatives you suggest, and report back in due course.

For now, unless you think it premature, I'll mark this as [SOLVED].

Thanks

:)
wearyhacker
Posts: 41
Joined: Fri May 18, 2018 9:07 pm

Re: [SOLVED-ish] Weirdness : "migration process from legacy PartDesign / broken structure"

Postby wearyhacker » Sat May 19, 2018 7:47 am

Hi,

I am seeing this problem with a much simpler file.

I only installed freeCAD from the Ubuntu stable ppa a couple of days ago. So it is the latest stable release. As soon as I use clones in a file and save it and reload it. I am unable to create new parts or bodies in the part design workbench. This is an absolute stopper for me. Help!

I have attached a simple test file that illustrates the problem.

Any help gratefully received.
Attachments
testfile.fcstd
Sample test file
(26.66 KiB) Downloaded 8 times
User avatar
NormandC
Posts: 18534
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: [SOLVED-ish] Weirdness : "migration process from legacy PartDesign / broken structure"

Postby NormandC » Sun May 20, 2018 4:46 pm

Hi wearyhacker,

We chatted on Gitter yesterday.

The migration dialog is actually not preventing you from creating new Part or Body containers. You just have to click on "Migrate manually", the window will close without changing the file, and a new Body will be added in the Model tree.

But in this very topic, DeepSOIC specifically recommended using Draft Clone instead of PartDesign Clone to circumvent this issue.

Besides, your method of cloning repeatedly and then setting coordinates for each clone is not very efficient. I recommend you have a look at Draft Array. This will save you a lot of time. I made a modified file using it. The Std DependencyGraph lists an undamaged Body container. It does not suffer from the migration issue.

I also suggest not changing the placement of your Body, it simplifies use of Draft Array, as you don't need to set a specific rotation point and keep it at (0,0,0). You just need to change the placement of the Part container instead.

testfile_nc1.png
testfile_nc1.png (60.57 KiB) Viewed 593 times

OS: Ubuntu 18.04 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13522 (Git)
Build type: None
Branch: releases/FreeCAD-0-17
Hash: 3bb5ff4e70c0c526f2d9dd69b1004155b2f527f2
Python version: 2.7.15rc1
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: French/Canada (fr_CA)
Attachments
testfile_nc1.fcstd
(20.29 KiB) Downloaded 7 times