[Solved] *Part* mirror - *PartDesign* feature - *PartDesign* modify both PD bodies

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!
M4x
Posts: 150
Joined: Sat Mar 11, 2017 9:23 am
Location: Norderstedt / Germany

[Solved] *Part* mirror - *PartDesign* feature - *PartDesign* modify both PD bodies

Postby M4x » Tue May 19, 2020 2:54 pm

Hello everybody,

this is kind of a continuation of another thread I've started recently: [Solved] PartDesign copy body and move features
I start a new thread here to not mix everything together.

What I've done:
  • Modelled a part in a PartDesign body (Body_1)
  • Used Part_Mirror to mirror the part and features (I need those on the opposite side)
  • Draged the mirrored part into another PartDesign body (Body_2 -> BaseFeature)
  • Made further changes in Body_1
  • Made further changes in Body_2
PartDesign_Part-mirror_v1_ObjectTree.png
PartDesign_Part-mirror_v1_ObjectTree.png (20.31 KiB) Viewed 236 times

By looking at the dependency graph, I've realized that I did something "illegal" (red arrow). Unfortunately, I'm not sure how I should've done it the "right way". I'm sure this is not a new "problem" but wasn't able to find a solution. The mirrored part should update when I make changes to Body_1.

PartDesign_Part-mirror_v1_DependencyGraph.png
PartDesign_Part-mirror_v1_DependencyGraph.png (90.25 KiB) Viewed 236 times

I've attached an example file.

OS: Ubuntu 20.04 LTS (ubuntu:GNOME/ubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.21049 (Git) AppImage
Build type: Release
Branch: master
Hash: 9c27f1078e5ec516fe882aac1a27f5c6c6174554
Python version: 3.8.2
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: English/United States (en_US)

Thank you very much!
Attachments
PartDesign_Part-mirror_v1.FCStd
(52.38 KiB) Downloaded 4 times
Last edited by M4x on Wed May 20, 2020 10:39 pm, edited 1 time in total.
Bance
Posts: 466
Joined: Wed Feb 11, 2015 3:00 pm
Location: London

Re: *Part* mirror - *PartDesign* feature - *PartDesign* modify both PD bodies

Postby Bance » Tue May 19, 2020 3:59 pm

It's not entirely clear to me what you are trying to achieve, but you should Part-mirror the body not the feature. This keeps everything within scope.
User avatar
papyblaise
Posts: 1988
Joined: Thu Jun 13, 2019 4:28 pm
Location: France

Re: *Part* mirror - *PartDesign* feature - *PartDesign* modify both PD bodies

Postby papyblaise » Tue May 19, 2020 4:16 pm

First error : you do Pocket , then Pocket 001 , then Miror of Pocket , of course Pocket 001 is missing
2cd error , you open a new Body , do the hexagon , and after that what do you try to do ?
M4x
Posts: 150
Joined: Sat Mar 11, 2017 9:23 am
Location: Norderstedt / Germany

Re: *Part* mirror - *PartDesign* feature - *PartDesign* modify both PD bodies

Postby M4x » Tue May 19, 2020 7:20 pm

Okay, I guess I've used Part_Mirror with a feature and not with the whole body. Nevertheless, I'm not able to make it work like I'd too :roll:

I think I haven't made it clear what I'm trying to achieve. I've two parts, which share a lot of features. In my example, these are represented by the shape itself, one hole and two blind holes. But the second part needs those blind holes on the opposite side. And both parts have other unique features (Body_1: square pocket and Body_2: hexagon pocket). Here are two screenshots from my example file.
PartDesign_Part-mirror_v1_Objects_1_cropped.png
PartDesign_Part-mirror_v1_Objects_1_cropped.png (21.39 KiB) Viewed 190 times
PartDesign_Part-mirror_v1_Objects_2_cropped.png
PartDesign_Part-mirror_v1_Objects_2_cropped.png (21.29 KiB) Viewed 190 times

I've made a graphic to illustrate the intended relationship between both parts:
Share_some_features_between_bodies.png
Share_some_features_between_bodies.png (9.7 KiB) Viewed 190 times
The parts should be sharing two features (Pad and Pocket). Pocket001 only applies to Body_1 and Pocket002 only applies to Body_2. When I'm changing the outer dimensions (Body_1 - Pad), I'd like FreeCAD to apply those changes to Body_2 too. Changes to Pocket001 should only work within Body_1 and changes to Pocket002 should only work within Body_2.

Is it more clear now?
kisolre
Posts: 2253
Joined: Wed Nov 21, 2018 1:13 pm

Re: *Part* mirror - *PartDesign* feature - *PartDesign* modify both PD bodies

Postby kisolre » Tue May 19, 2020 7:41 pm

Illegal here is a little misleading. As you saw it works. But it is not supposed to be used that way so it is not supported and could potentially be removed in any moment in the future. Here you were supposed to create two new bodies based on the whole first body which would essentially achieve the same result.
User avatar
Roy_043
Posts: 1402
Joined: Thu Dec 27, 2018 12:28 pm

Re: *Part* mirror - *PartDesign* feature - *PartDesign* modify both PD bodies

Postby Roy_043 » Tue May 19, 2020 7:44 pm

kisolre wrote:
Tue May 19, 2020 7:41 pm
two new bodies based on the whole first body
'Based on' as in: Independent copies (Std_DuplicateSelection)?
kisolre
Posts: 2253
Joined: Wed Nov 21, 2018 1:13 pm

Re: *Part* mirror - *PartDesign* feature - *PartDesign* modify both PD bodies

Postby kisolre » Tue May 19, 2020 7:48 pm

Roy_043 wrote:
Tue May 19, 2020 7:44 pm
'Based on' as in: Independent copies (Std_DuplicateSelection)?
No, based as a BaseFeature of one new body, Part mirror from the original body, and this as BaseFeature for the second new body. The new bodies have to be dependent of the original.
M4x
Posts: 150
Joined: Sat Mar 11, 2017 9:23 am
Location: Norderstedt / Germany

Re: *Part* mirror - *PartDesign* feature - *PartDesign* modify both PD bodies

Postby M4x » Tue May 19, 2020 8:13 pm

You mean one body for the "shared features", that one as a BaseFeature for the second body and the mirrored version as a BaseFeature for the third body?
Bance
Posts: 466
Joined: Wed Feb 11, 2015 3:00 pm
Location: London

Re: *Part* mirror - *PartDesign* feature - *PartDesign* modify both PD bodies

Postby Bance » Tue May 19, 2020 8:28 pm

As has been said, part-mirror then use as a base feature.
Attachments
PartDesign_Part-mirror_bance.FCStd
(55.15 KiB) Downloaded 4 times
M4x
Posts: 150
Joined: Sat Mar 11, 2017 9:23 am
Location: Norderstedt / Germany

Re: *Part* mirror - *PartDesign* feature - *PartDesign* modify both PD bodies

Postby M4x » Tue May 19, 2020 9:01 pm

Why am I not able to add the square pocket only to one body? My dependency graph looks pretty much like yours.

PartDesign_Part-mirror_v3_Objects_cropped.png
PartDesign_Part-mirror_v3_Objects_cropped.png (24.09 KiB) Viewed 155 times
Attachments
PartDesign_Part-mirror_v3.FCStd
(51.63 KiB) Downloaded 4 times