App::link of sketch in PD Body

About the development of the Part Design module/workbench. PLEASE DO NOT POST HELP REQUESTS HERE!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
emills2
Posts: 889
Joined: Tue Apr 28, 2015 11:23 pm

Re: App::link of sketch in PD Body

Post by emills2 »

realthunder wrote: Fri Feb 28, 2020 12:33 am ...
Glad to hear that all these options are on the table.
emills2
Posts: 889
Joined: Tue Apr 28, 2015 11:23 pm

Re: App::link of sketch in PD Body

Post by emills2 »

realthunder wrote: Fri Feb 28, 2020 12:33 am The normal Link overrides the linked object's Placement, which obviously does not work in Part Design use case.
If i understand this point correctly, i think there are still valid use cases.

The first use case i had in mind was to replace shapebinder for some cases to reduce repetitive work that creates no new information. In this case, the link's output should match the global placement of the linked object. But in another use case, standard profiles and irregular patterns, overriding the object placement with the link's placement is very useful as well (whether the link's placement should apply to the origin of the linked item or it's "placement" stack is debatable, but probably both are useful).

since the topic isn't settled but there is progress planned, i whipped up some crude examples of workflows that show desirable link behaviors.

first case, replace shapebinders to reduce tedium in special cases:

i used assembly 4 as my basis mostly because i like the Variables object. i can see both the variables and the viewport at the same time, which is an advantage over spreadsheets. I only want the highest level parameters here, and i use them all at once in a "Layout" / "Skeleton" / "Master" sketch.
Top_Down_01_00.png
Top_Down_01_00.png (275.18 KiB) Viewed 3123 times
Then i start sketching out my component main sketches. I don't mind putting dimensions directly in here, because although they could be in Variables, they don't affect my overall motion. These dimensions will not need to be re-entered anywhere else.

This is a choice that everyone should be able to make: how to group their parameters in a way that they can easily find them. There's no reason to force everyone into a specific pattern.
Top_Down_01_01.png
Top_Down_01_01.png (44.54 KiB) Viewed 3123 times
the rest of the component main sketches use equal constraints for dimensions, so no wasted data entry. absolute minimum number of clicks.
Top_Down_01_02.png
Top_Down_01_02.png (38.4 KiB) Viewed 3123 times
so far not a single click was wasted. Now i want to make bodies using the previous component sketches. All my overall parameters are neatly grouped in the Variables object, and all my sketches are right next to each other. i can access everything without having to expand 3, 4, 5 nesting levels and having a mile long tree. everything i see in the tree is meaningful to me.

if i had rushed to make these sketches in bodies, i would have a large tree, and also would have had to use shapebinders on everything.

here comes the shapebinder tedium:
-i just want the whole sketch for a component
-i create a shapebinder
-can't select whole sketch. i could select a whole face, but not a whole sketch, keep going.
-i start adding one sketch's elements
-2 clicks per elements
-is that all of them? they don't highlight. let me start counting the number of elements in the list
-oh, this one's missing. i can't click it. is it me? let's try again. no, something's up.
-oh! overlapping sketches, i should have hid everything else. i guess i can't mix and match between sketch elements. no big deal.
-hide all the other stuff, go back to shapebinder, click click click click...
Top_Down_01_03.PNG
Top_Down_01_03.PNG (59.6 KiB) Viewed 3123 times
-ok! new sketch in body, link external geometry. damn, i missed an object.
-no sweat, go back to shapebinder, add the object, click click, it's not so bad!
-back to my new sketch, add external geometry...add external geometry! doesn't work
-huh, that last one i added in the shapebinder after i had started the sketch and went back now clearly refuses to give me the external geometry.
-should i delete the sketch and start the sketch over?
-screw it, delete the shapebinder and get it right this time click click click
-new sketch, external links to geometry one click per, good deal.
-now let's trace the whole sketch over! 2 clicks per edge, 12 constraints, 2/3 clicks per constraint.
Top_Down_01_04.PNG
Top_Down_01_04.PNG (70.26 KiB) Viewed 3123 times
now i have access to Assembly 4 animation without even setting up LCSs

the link operation i would love to see here is:
-select the sketch
-click create link
-drag to body
-in this case the origin of the sketch goes to the origin of the part because the sketch did not have placement. there could be a few options relating to placement here.

and then part design tools should treat it as a sketch

my point here is not to encourage people to organize their work this way or any other, per se, but to request that this workflow be accomodated by letting everyone put their stuff where they want, but making link available in this way.
emills2
Posts: 889
Joined: Tue Apr 28, 2015 11:23 pm

Re: App::link of sketch in PD Body

Post by emills2 »

2nd example, potentially much more valuable. this one i have to fake completely with Part.

a few sketch defining the wireframe of a "Frame", an d sketch of the tubing profile i wish to use for this frame. i would like this profile to be a link to a sketch that resides in its own file.

for the mockup, i copy/paste the sketch and use placement to snap it to the different part of the wireframe. snap to line endpoint, and then use attachement offsets as needed.

if it was a link, i would want the default to be origin of sketch in remote file to snap to origin of attachment coordinate system. then i would want to use link placement offset for final positioning.
Profile_Frame_00.png
Profile_Frame_00.png (22.24 KiB) Viewed 3110 times
Profile_Frame_01.png
Profile_Frame_01.png (26.21 KiB) Viewed 3110 times
once it's all in place, i would like to create a Part Design body for each basic member inside of a common Part. getting each sketch into its respective body ought to be drag and drop of a link
Profile_Frame_02.png
Profile_Frame_02.png (109.4 KiB) Viewed 3110 times
and follow up with further Part Design operations to trim, drill, fillet, etc
Profile_Frame_03.png
Profile_Frame_03.png (140.93 KiB) Viewed 3110 times
you can see the mess Part makes in the tree.

a flexible link system would let build me tree a mocked up below
Profile_Frame_04.PNG
Profile_Frame_04.PNG (32.65 KiB) Viewed 3110 times
the profiles used would be linked at the very front. these point to the sketch file.
what gets used in the extrusions should be abstracted by a link to these "main profile selection" links.

so if i use 3 Profile_As, these are links to the link in the profile A folder. if i replace the link in the profile A folder, all the Profile_As in the extrusion should update to the new linked sketch. and all the Profile_Bs stay the same.

this way i can create groups of members intended to share a profile, and control it as a group.

once again, i'm not trying to push anyone to work this way, but a good general purpose link could accomodate this.
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: App::link of sketch in PD Body

Post by Zolko »

emills2 wrote: Fri Feb 28, 2020 6:52 am i used assembly 4 ...
...
Then i start sketching out my component main sketches...
...
my point here is not to encourage people to organize their work this way or any other, per se, but to request that this workflow be accomodated by letting everyone put their stuff where they want, but making link available in this way.
you must be kidding: you're using an assembly workbench to make an assembly, but not using the tools that the workbench is providing, and instead using some personal workflow coming from a workbench made to design single parts. And then you're complaining that things don't go smoothly.

Icing on the cake, you request developers spend their time so you don't have to change your workflow ?
try the Assembly4 workbench for FreCAD — tutorials here and here
emills2
Posts: 889
Joined: Tue Apr 28, 2015 11:23 pm

Re: App::link of sketch in PD Body

Post by emills2 »

Zolko wrote: Fri Feb 28, 2020 7:32 am you must be kidding: you're using an assembly workbench to make an assembly, but not using the tools that the workbench is providing, and instead using some personal workflow coming from a workbench made to design single parts. And then you're complaining that things don't go smoothly.
it's just an example of a way to use a link. i like the assembly tools.
my first example used A4 just to manage variables, and i said say so. the more relevant portion was inter-body data exchange, which resides entirely in Part Design. I'm not sure why this provokes such a response from you, this just shows a side-effect use of your workbench while asking nothing of you.

things went smoothly in Assembly 4 as far as this example was concerned.

as far as Part Design being "a workbench made to design single parts", that's not so cut and dry. it started out so, but many people (not me) worked on it, argued, collaborated and improved it. i started this thread asking about limitations that existed for a long time, and were partially removed at some point, see https://forum.freecadweb.org/viewtopic.php?f=20&t=12373. If you were to dig into this business starting more than 5 years back, you would see the major opposed camps coming to a fairly cordial and productive agreement. At the time it felt like a god damn miracle. but the limitations were not completely removed. I am not, by far, the first person to bring up these issues in regards to Part Design. App::Link opens new opportunities to remove limitations.

I wanted to know where Part Design stood in respect to App::Link. i got my answer.
Zolko wrote: Fri Feb 28, 2020 7:32 am Icing on the cake, you request developers spend their time so you don't have to change your workflow ?
yes, but i feel you're twisting my words for dramatic effect. i simply mean "keep in mind this possible use, and don't block it if you don't have to."

Since the workflow doesn't function right now, it makes little sense to say "so you don't have to change your workflow". it can't possibly be my workflow, since it doesn't function. I wanted to point out something desirable. please tell me what is the problem, educate me here.

when i say:
since the topic isn't settled but there is progress planned, i whipped up some crude examples of workflows that show desirable link behaviors
you get offended? i don't know what to say.
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: App::link of sketch in PD Body

Post by realthunder »

emills2 wrote: Fri Feb 28, 2020 6:52 am here comes the shapebinder tedium:
It seems that all your complains will go away if you know how to use the binder, and which binder to use. That is partly my fault, as I should have done a better job introducing this new feature. I plan to make a proper video about it when I have time. The SubShapeBinder I am talking about is the one with the green icon. As you can see from the following screencast, you can use fewer clicks to achieve what you want. A few things to note,

1) Normal drag and drop will add more objects to the binder, it can either be the whole object, or the element (which you select in 3D view beforehand). To reset the binder, hold CTRL key AFTER you start dragging, and keep holding until you dropped the object.

2) pad/pocket only works if you select the binder face in 3D view. It does not work if you select the whole object (e.g. select the item in the tree).

3) There is bug in upstream causing crash if you drag additional object onto binder. So don't try it yet, always reset the binder with CTRL key when dropping. It is fixed in this PR.

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.

Image
Try Assembly3 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: 889
Joined: Tue Apr 28, 2015 11:23 pm

Re: App::link of sketch in PD Body

Post by emills2 »

realthunder wrote: Fri Feb 28, 2020 10:18 am 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
Hallelujah! i always felt that bodies with individual coords were an attempt to do assemblyish things. But Std Part should be fully in charge now!

the rest of your post is making me blink hard though. gonna take my time reading it nice and slow.

thank you for the responses.
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: App::link of sketch in PD Body

Post by Zolko »

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.
please no, don't do that, don't introduce yet another container to hold some new stuff. There is already Part, Solid, Body, LinkGroup ... making a new sub-body-solid-whatever is not going to help. I had started long-long time ago a thread about how these sub-elements should interact, nobody was interrested, may-be time has come refine those principles.
try the Assembly4 workbench for FreCAD — tutorials here and here
emills2
Posts: 889
Joined: Tue Apr 28, 2015 11:23 pm

Re: App::link of sketch in PD Body

Post by emills2 »

Zolko wrote: Fri Feb 28, 2020 5:05 pm I had started long-long time ago a thread
Good Lord, don't shock us like that.
Zolko wrote: Fri Feb 28, 2020 5:05 pm nobody was interrested
The prophecy has come true!!
Zolko wrote: Fri Feb 28, 2020 5:05 pm time has come refine those principles.
Rejoice brothers and sisters. Glorious times await.

ok, so that was me kidding. can i join your comedy club?
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: App::link of sketch in PD Body

Post by realthunder »

Zolko wrote: Fri Feb 28, 2020 5:05 pm please no, don't do that, don't introduce yet another container to hold some new stuff. There is already Part, Solid, Body, LinkGroup ... making a new sub-body-solid-whatever is not going to help. I had started long-long time ago a thread about how these sub-elements should interact, nobody was interrested, may-be time has come refine those principles.
You are rejecting an idea even before knowing it? BTW, I never said I'll introduce another container. I will be using the plain group to organize multiple linear histories within the body. The 'organization' is mostly just for tree item grouping. I have already emphasized that all features inside the same body shall be in the same coordinate system.

In fact I have already done similar thing in asm3 container. In any given part/constraint/element group, the user can create plain groups (or multiple levels of groups) for further organization. This is for helping the case where there are hundreds of parts/elements/constraints within a single assembly. It does not change the 3D hierarchy in any way because the plain group does not have placement.
Try Assembly3 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
Post Reply