App::link of sketch in PD Body

About the development of the Part Design module/workbench. PLEASE DO NOT POST HELP REQUESTS HERE!
realthunder
Posts: 1810
Joined: Tue Jan 03, 2017 10:55 am

Re: App::link of sketch in PD Body

Postby realthunder » Thu Mar 05, 2020 12:17 am

emills2 wrote:
Thu Mar 05, 2020 12:09 am
realthunder wrote:
Wed Mar 04, 2020 11:32 pm
Yes it does, and better than Link in some use case, because unlike Link, the binder knows what is a Shape, and it will make a copy of the linked shape
is this documented?
There is the 'PartialLoad' property of the binder to control the auto/manual loading of external document. I added some brief description of various properties in SubShapeBinder in that PR. Use mouse hovering in property view to see it.
Try Assembly3 (latest version 0.11) along with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
emills2
Posts: 631
Joined: Tue Apr 28, 2015 11:23 pm

Re: App::link of sketch in PD Body

Postby emills2 » Thu Mar 05, 2020 2:49 am

OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.19697 (Git)
Build type: Release
Branch: master
Hash: 8832356802011bf5d70e9d6f0efa89c47bc70a91
Python version: 3.7.3
Qt version: 5.12.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United States (en_US)

this is a pretty recent FreeCAD.

shown below are all the different model structures i tried:
cross_file_bind_00.PNG
cross_file_bind_00.PNG (7.89 KiB) Viewed 750 times
cross_file_bind_01.PNG
cross_file_bind_01.PNG (12.09 KiB) Viewed 750 times
cross_file_bind_02.PNG
cross_file_bind_02.PNG (14.09 KiB) Viewed 750 times
cross_file_bind_03.PNG
cross_file_bind_03.PNG (16.3 KiB) Viewed 750 times
cross_file_bind_04.PNG
cross_file_bind_04.PNG (16.41 KiB) Viewed 750 times
in every single case, drag sketch drop to binder, and also ctrl-drop to binder results in a hard crash, no error messages.

it hangs with the + or arrow icon on the mouse, then shuts down the FreeCAD window. a few times, my mouse turned into a system waiting icon but mostly frozen custom icon on mouse, and crash within seconds.
emills2
Posts: 631
Joined: Tue Apr 28, 2015 11:23 pm

Re: App::link of sketch in PD Body

Postby emills2 » Thu Mar 05, 2020 2:57 am

now with the regular binder:
cross_file_bind_05.PNG
cross_file_bind_05.PNG (38.36 KiB) Viewed 748 times
editing the support link reveals that only the current file is in scope
cross_file_bind_06.PNG
cross_file_bind_06.PNG (34.86 KiB) Viewed 748 times
direct drag and drop is explictly prohibited

these are the only methods i have found so far to interact with the contents of the binder.

if the body is active in the source file and i select the sketch and hit the create subshapebinder button, crash.

if the body is inactive in the source file and body is active in the receiving file, crash.
emills2
Posts: 631
Joined: Tue Apr 28, 2015 11:23 pm

Re: App::link of sketch in PD Body

Postby emills2 » Thu Mar 05, 2020 3:04 am

in this last attempt:

set body active in receiving file, select entire body in source file, hit create subshape binder:

-activates body in source file
-creates binder within source file body
-cyclic dependecy error
-removes binder from source file body
-no crash
cross_file_bind_07.PNG
cross_file_bind_07.PNG (24.66 KiB) Viewed 745 times
if the current subshape binder handles cross file bindings, it is well hidden. maybe some other combination of active parts /active bodies? i tried a lot of variations there as well.
realthunder
Posts: 1810
Joined: Tue Jan 03, 2017 10:55 am

Re: App::link of sketch in PD Body

Postby realthunder » Thu Mar 05, 2020 4:56 am

emills2 wrote:
Thu Mar 05, 2020 2:49 am
Hash: 8832356802011bf5d70e9d6f0efa89c47bc70a91

this is a pretty recent FreeCAD.
Well, not recent enough. There is a fix of the crash six days ago.

Here is an easy way to create cross file binding. Create the body in the target file, without selecting anything (i.e. clear the selection), click the green binder button. This will create an empty binder. Then just drag the feature from the other file and drop to this binder. And once my last PR is accepted, you can use link property editor to select external object too. See the following screencast. Notice that the first think I did after created the body is to unselect it. When you click the binder button, it will create a binder that binds to the selection if there is any.

The screencast also shows the effect of 'PartialLoading'.



Image
Try Assembly3 (latest version 0.11) along with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
emills2
Posts: 631
Joined: Tue Apr 28, 2015 11:23 pm

Re: App::link of sketch in PD Body

Postby emills2 » Thu Mar 05, 2020 10:49 am

realthunder wrote:
Thu Mar 05, 2020 4:56 am
not recent enough
Thanks realthunder. i'm gonna get 0.19.1975 for now. i don't really know how to relate the version number to the commit number, but eventually the fixes will reach dev builds!
emills2
Posts: 631
Joined: Tue Apr 28, 2015 11:23 pm

Re: App::link of sketch in PD Body

Postby emills2 » Thu Mar 05, 2020 12:46 pm

latest dev build, 6 days ago. i'm not sure if this capture the fix you mentioned

OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.19758 (Git)
Build type: Release
Branch: master
Hash: c165edd52c7f06ac09f992e5b5bf1d37661a8c0f
Python version: 3.7.3
Qt version: 5.12.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United States (en_US)

works for a binder to an extrusion inside a body. partial loading does not load change made in source file, and that's ok, i don't mind the source file being open.

trying to drop just a sketch into the binder still crashes though

making a Part > make face from wires (applied to the sketch) works!
cross_file_bind_08.PNG
cross_file_bind_08.PNG (47.11 KiB) Viewed 659 times
so i have now correctly bound between files, but it's not a sketch, so the part designs tools won't operate on it in the receiving document. still progress! i can use the geometry as external geometry in a new sketch, so i could trace it, if i absolutely needed to get something done today.

it's kind of curious, since i can bind the sketch between bodies in the same document, and it does extrude directly, but that ability goes away when binding between files

it's not easy to always remember the selection sequence so that the receiving doc doesn't collapse in tree view when i got to select the source file sketch. if it does collapse, i can't drop to the binder.
realthunder
Posts: 1810
Joined: Tue Jan 03, 2017 10:55 am

Re: App::link of sketch in PD Body

Postby realthunder » Thu Mar 05, 2020 9:45 pm

emills2 wrote:
Thu Mar 05, 2020 12:46 pm
latest dev build, 6 days ago. i'm not sure if this capture the fix you mentioned
I think still not. The PR is submitted earlier, but got merged I think just a day after.

it's kind of curious, since i can bind the sketch between bodies in the same document, and it does extrude directly, but that ability goes away when binding between files
There is another PR submitted 3 days ago to allow extrusion directly by selecting the whole binder, even the binder has multiple faces inside.
Try Assembly3 (latest version 0.11) along with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
triplus
Posts: 9475
Joined: Mon Dec 12, 2011 4:45 pm

Re: App::link of sketch in PD Body

Postby triplus » Sat Mar 07, 2020 2:03 am

During the development of App::Link the shape(less) nature came up often. During the development of PartDesign NEXT the (non)inclusive nature of the workflow came up often. This is what i guess @emills2 is asking about in this thread.

P.S. Eventually both areas will get tackled to the extent most people will accept the solutions as suitable and at that point FreeCAD will reach zen again. ;)
User avatar
-alex-
Posts: 642
Joined: Wed Feb 13, 2019 9:42 pm
Location: France

Re: App::link of sketch in PD Body

Postby -alex- » Tue Mar 17, 2020 11:00 pm

realthunder wrote:
Fri Feb 28, 2020 10:18 am
As for the PartDesign modeling using multiple bodies, I have plan to add property support for that. Multiple sub-bodies (or Solids) can be created inside the current PartDesign Body as an optional branch on the current linear history. Unlike body, each solid will not have its own placement, which is crucial so that the features that construct those solids can be freely referenced by other features without requiring a binder or link. In other words, features of solids within the same body all live in the same coordinate system.
Sorry i'm late about this, and want not hijack this thead again... but I add my 2 cents :?
I could agree with Zolko, maybe add another level with a new container could be quite painful. However, AFAIK and as realthunder said those sub-bodies could alows direct Xrefs by avoiding the use of shape binder between bodies.
If i had to choose, I would prefer sub-bodies rather to use shapebinders everywhere between actual bodies.
@Realthunder: you mind about sub-bodies created by user right? Manually? Or do you mind maybe sub-bodies generated automaticaly, where each sub-body would be a single solid?