Use a LCS created in a body in a part for assembly

Discussion about the development of the Assembly workbench.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
run_the_race
Posts: 161
Joined: Mon Feb 01, 2021 7:22 pm

Use a LCS created in a body in a part for assembly

Post by run_the_race »

I have a part called Foo_PART.

Inside Foo_PART is:
- Foo_BODY
- Foo_SPREADSHEET

Inside Foo_BODY is:
- Subshapebinder object
- Foo_LCS (local co-ordinate system) which depends on the shapebinder object

Now I have an assembly (Assembly4 WB) that I link Foo_PART into. To position Foo_PART I require Foo_LCS. However if:
  1. Foo_LCS is in Foo_BODY, then the assembly can't see the Foo_LCS.
  2. So then I move Foo_LCS out of Foo_BODY and into Foo_PART. Then it gets broken and is no longer linked to the Subshapebinder object.
  3. If I try make a new LCS for Foo_PART, then it is in the dettached state and does not work during assembly.


So how does one use a Foo_LCS in a body, in its containing part as well?

SIDE NOTE: If it helps I attached "touchscreen_7inch.FCStd" which has the "touchscreen_7inch PART" I am trying to use in an assembly. "pcb_mount_gpio1_bottom LCS" is the LCS I am trying to use for the assembly.
lcs.png
lcs.png (15.9 KiB) Viewed 2800 times

Code: Select all

OS: Windows 10 Version 2004
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24276 (Git)
Build type: Release
Branch: releases/FreeCAD-0-19
Hash: a88db11e0a908f6e38f92bfc5187b13ebe470438
Python version: 3.8.6+
Qt version: 5.15.1
Coin version: 4.0.1
OCC version: 7.5.0
Locale: English/United Kingdom (en_GB)
Attachments
touchscreen_7inch.FCStd
(340.1 KiB) Downloaded 51 times
run_the_race
Posts: 161
Joined: Mon Feb 01, 2021 7:22 pm

Re: Use a LCS created in a body in a part for assembly

Post by run_the_race »

Any workarounds to this problem?
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: Use a LCS created in a body in a part for assembly

Post by chrisb »

run_the_race wrote: Wed May 05, 2021 10:14 pm Any workarounds to this problem?
Moved to Assembly forum.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: Use a LCS created in a body in a part for assembly

Post by Zolko »

run_the_race wrote: Tue May 04, 2021 10:25 am
  1. Foo_LCS is in Foo_BODY, then the assembly can't see the Foo_LCS.
  2. So then I move Foo_LCS out of Foo_BODY and into Foo_PART. Then it gets broken and is no longer linked to the Subshapebinder object.
  3. If I try make a new LCS for Foo_PART, then it is in the dettached state and does not work during assembly.


So how does one use a Foo_LCS in a body, in its containing part as well?
yes, this is a recurring request, I have to implement it. This will be part of a next update, please stay tuned.

As a workaround, you can create an LCS in the Part, and attach it to elements in the Body. This will give you "Links go out of allowed scope " warnings that you can safely ignore IF you didn't change the Placement of the Body in the Part.
try the Assembly4 workbench for FreCAD — tutorials here and here
run_the_race
Posts: 161
Joined: Mon Feb 01, 2021 7:22 pm

Re: Use a LCS created in a body in a part for assembly

Post by run_the_race »

Zolko wrote: Thu May 06, 2021 12:37 pm
run_the_race wrote: Tue May 04, 2021 10:25 am
  1. Foo_LCS is in Foo_BODY, then the assembly can't see the Foo_LCS.
  2. So then I move Foo_LCS out of Foo_BODY and into Foo_PART. Then it gets broken and is no longer linked to the Subshapebinder object.
  3. If I try make a new LCS for Foo_PART, then it is in the dettached state and does not work during assembly.


So how does one use a Foo_LCS in a body, in its containing part as well?
yes, this is a recurring request, I have to implement it. This will be part of a next update, please stay tuned.

As a workaround, you can create an LCS in the Part, and attach it to elements in the Body. This will give you "Links go out of allowed scope " warnings that you can safely ignore IF you didn't change the Placement of the Body in the Part.
Ah okay I see, thank you for the context, I thought I was doing something wrong.
run_the_race
Posts: 161
Joined: Mon Feb 01, 2021 7:22 pm

Re: Use a LCS created in a body in a part for assembly

Post by run_the_race »

chrisb wrote: Wed May 05, 2021 11:03 pm
run_the_race wrote: Wed May 05, 2021 10:14 pm Any workarounds to this problem?
Moved to Assembly forum.
Thanks Chris!
Mark81
Posts: 121
Joined: Tue Jul 12, 2022 2:21 pm

Re: Use a LCS created in a body in a part for assembly

Post by Mark81 »

Zolko wrote: Thu May 06, 2021 12:37 pm yes, this is a recurring request, I have to implement it. This will be part of a next update, please stay tuned.
I faced the same issue with this version:

Code: Select all

OS: Ubuntu Core 20 (ubuntu:GNOME/ubuntu)
Word size of FreeCAD: 64-bit
Version: 0.21.29501 (Git) Snap 134
Build type: Release
Branch: master
Hash: 842fd4772bd2135168ebff0deccbfb1bd0639ae2
Python 3.8.10, Qt 5.15.3, Coin 4.0.0, Vtk 7.1.1, OCC 7.6.2
Locale: Italian/Italy (it_IT)
Installed mods: 
  * fasteners 0.3.45
  * 3D_Printing_Tools
  * CurvedShapes 1.0.3
  * Manipulator 1.4.5
  * Assembly4 0.12.0
  * fcgear 1.0.0
  * A2plus 0.4.56a
  * POV-Ray-Rendering
  * Render 2022.2.0
Would you please confirm if is still to be solved?
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: Use a LCS created in a body in a part for assembly

Post by Zolko »

run_the_race wrote: Tue May 04, 2021 10:25 am So how does one use a Foo_LCS in a body, in its containing part as well?
Mark81 wrote: Wed Jul 13, 2022 7:38 am I faced the same issue with this version:
...
Would you please confirm if is still to be solved?
it sort-of is solved: in order to use in the top-level part an LCS (or any datum object) which is inside a child Body, you have to "import" it:

Image

this will create another datum object of the same type in the top-level Part, and which is superimposed on the original datum object in the child Body. This acts as a sort-of ShapeBinder but applied to datum objects. Note that you can do this for Parts and Bodies nested many levels, not just for 1 Body. This is very handy when you import assemblies from STEP files.
try the Assembly4 workbench for FreCAD — tutorials here and here
Mark81
Posts: 121
Joined: Tue Jul 12, 2022 2:21 pm

Re: Use a LCS created in a body in a part for assembly

Post by Mark81 »

I've just tried but when I use this feature, the resulting imported LCS is not attached:
Screenshot from 2022-07-15 15-52-28.png
Screenshot from 2022-07-15 15-52-28.png (12.74 KiB) Viewed 1653 times
instead, dragging it from the Body to the top Part avoid this warning. Not sure about the consequences, but the Assembly4 seems to like it anyway.
I attach an example file.
Attachments
actuator.FCStd
(26.31 KiB) Downloaded 23 times
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: Use a LCS created in a body in a part for assembly

Post by Zolko »

Mark81 wrote: Fri Jul 15, 2022 1:54 pm I've just tried but when I use this feature, the resulting imported LCS is not attached:

Screenshot from 2022-07-15 15-52-28.png
No, the resulting LCS is not attached as per AttacherEngine. It is attached as per Asm4. Unfortunately, you get the un-fancy icon overlay pretending it's not attached. I might do a ViewProvider one day to correct this mis-representation

instead, dragging it from the Body to the top Part avoid this warning. Not sure about the consequences, but the Assembly4 seems to like it anyway.
yes, it works if you don't do any strange things in between. You probably get the dreaded "Links go out of the allowed scope"

You can take my word: the correct behavior is as I described. If not, it's a bug and please report.
try the Assembly4 workbench for FreCAD — tutorials here and here
Post Reply