Assembly 4: Importing part of model, or Locally Hiding sub elements

Discussion about the development of the Assembly workbench.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
goutnet
Posts: 13
Joined: Mon Nov 09, 2015 9:07 pm

Assembly 4: Importing part of model, or Locally Hiding sub elements

Post by goutnet »

Let me start by stating the obvious here: Assembly 4 workbench is such an incredible tool to design complex parts based on assembled elements, really awesome work here!

Here is my use case:

I have a global assembly file where all my parts fit together, and within that file I design an enclosure (in 2 parts, bottom and lid) to fit all of that.
So far so good, I was able to understand how to create everything using shapebinders (thanks @Zolko for your support).

I would like to take this to the next step, since all my enclosure parts are going to be 3DPrinted (at least at first), or injection molded at some point, I would like to create another assembly file to position them properly together.

Here is the issue, if I import the model from my global assembly, it also imports all sub parts, if I hide the sub parts into the fabrication assembly, it also hides them into the assembly file …

Q1: Is there a way to hide them only in the fabrication file?

or

Q2: Is there a way to import only a part of the model, not all subassemblies?


Here is an example:

Code: Select all

PartA.FcStd
+- Parts
+- ModelA [Model]
| +- PartA [Part]
|   +- ModelA::PartA::BodyA

Assembly.FcStd:
+- Parts
+- AssemblyModel
| +- ModelA [imported]
| | +- (all the above imported from PartA)
| +- AssemblyModel::BottomEnclosurePart
|   +- AssemblyModel::BottomEnclosurePart::BottomEnclosureBody
| +- AssemblyModel::LidPart
|   +- AssemblyModel::LidPart::LidBody

Fabrication.FcStd
+- Parts
+- FabricationModel
| +- AssemblyModel [imported]
In this structure, both the LidPart and the BottomEnclosurePart are imported… if I hide one of those in the Fabrication.FcStd file, it will also hide it in the Assembly.FcStd … is there any way I could either hide it only in the Fabrication.FcStd file or only import the AssemblyPart::LidPart

Note: I must keep the assembly in one file because the Lid and BottomEnclosure are designed based on subshapebinders created from PartA


An (ugly) alternative is to export just step files, then re-import them into the Fabrication.FcStd file… manually works … but kind of breaking the links (and defeating the purpose here). I guess if push comes to shove this can be addressed with a python script… but still ugly…
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: Assembly 4: Importing part of model, or Locally Hiding sub elements

Post by Zolko »

goutnet wrote: Sat Nov 12, 2022 4:43 am Let me start by stating the obvious here: Assembly 4 workbench is such an incredible tool to design complex parts based on assembled elements, really awesome work here!
thank-you very much

... or only import the AssemblyPart::LidPart

Note: I must keep the assembly in one file because the Lid and BottomEnclosure are designed based on subshapebinders created from PartA
you can try the following, I'm not sure it will work though (but please report because it could be an interesting feature):

- since you need shapebinders, do the shapebinder thing as you did in the assembly file
- in the Parts folder, create 2 parts: Lid and Casing
- move (drag'n-drop) the shapebinder(s) into the 2 parts as needed
- design the lid and casing
- insert them into the assembly at their correct location

open your fabrication file, create an assembly Model, and import the 2 parts Lid and Casing. I'm not sure it is possible to import parts that are in a group at the root of the assembly. If not, this can be adapted.
try the Assembly4 workbench for FreCAD — tutorials here and here
goutnet
Posts: 13
Joined: Mon Nov 09, 2015 9:07 pm

Re: Assembly 4: Importing part of model, or Locally Hiding sub elements

Post by goutnet »

Thanks for the suggestion, I will give it a try and report here.

With that said, since I already started designing the Lid from the "Model", not sure if my part will survive me moving everything to the Part folder (FreeCAD tend to dislikes moving things around ^^;).

Will check.
Post Reply