Assembly4 - LCS of a mirrored part as an attachment point

Discussion about the development of the Assembly workbench.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
octy
Posts: 1
Joined: Thu Apr 13, 2023 3:30 pm

Assembly4 - LCS of a mirrored part as an attachment point

Post by octy »

Hi there,

I'm wondering if it's possible to somehow use the LCS of a mirrored part to attach another part to an assembly. As far as I understand, a mirrored part cannot be used as a "Parent part", and importing the LCS of the mirrored part doesn't work either.

I'm using FreeCAD 0.20.2 and Asm4 0.12.7 on Linux.
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: Assembly4 - LCS of a mirrored part as an attachment point

Post by Zolko »

I looked at it and it's non-trivial
try the Assembly4 workbench for FreCAD — tutorials here and here
User avatar
jonasb
Posts: 162
Joined: Tue Dec 22, 2020 7:57 pm

Re: Assembly4 - LCS of a mirrored part as an attachment point

Post by jonasb »

In the need of a mirrored part in an asm4 model I use the link's "ScaleVector" property. Unfortunately it's hidden by default so you have to choose "show all" in the context menu of the property panel. Here it allows you for example to set "-1" for X, while keeping "1" for Y and Z, to mirror on the YZ plane. This way you can a) still attach to the LCS of the linked part and b) you don't have to duplicate the original part just to get a mirrored one; or "import" any LCS.

See the attached example. Here "Wing002" is a mirrored link of "Wing" and still you can attach to it's "LCS_Tip". Note, however, that the LCS of a mirrored link are still "right handed". So you may have to rotate any further attached parts and/or invert their attachment offsets. This may be a bit unintuitive as the "mirroring" only affects the shape of linked part itself -- not the complete chain of transformations in case of attach to it. In addition, those attached links most likely need to be mirrored of their own, too.
Bildschirmfoto 2023-04-15 um 22.39.53.png
Bildschirmfoto 2023-04-15 um 22.39.53.png (39.19 KiB) Viewed 1349 times
@Zolko what do you think about adding GUI support for this? In the task panel of Asm4_placeLink, you already offer the options to translate the three axis and a button to quickly rotate each by 90° (the result goes into the attachment offset). Here a "mirror" toggle-button would be nice too, which in turn multiplies the scale of the respective axis (in the link's "Scale Vector" property) by -1.
Attachments
Asm4MirrorDemo.FCStd
(49.2 KiB) Downloaded 40 times
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: Assembly4 - LCS of a mirrored part as an attachment point

Post by Zolko »

jonasb wrote: Sat Apr 15, 2023 9:06 pm Note, however, that the LCS of a mirrored link are still "right handed".
fortunately, or else we would stop being in a Cartesian geometry and enter in Alice's wonderland

@Zolko what do you think about adding GUI support for this ?
dunno, I'm not convinced.

But I have noticed 2 other things:

1) while linear and circular arrays keep a part's colors, a mirrored part becomes always all black. Did you see that too ? Or is it my setup

2) if we can mirror a part by setting only the X-scale to -1, we could offer the possibility to create a symmetric, a chiral variant if you want, independently of the symmetry plane, and let the user place it where he wants. So technically we could create a link to the original, and set the X-scale to -1, and then let it behave like any traditional link, and thus have the LCS in the mirror part available. Since there is only 1 symmetry possible in our 3D world, it wouldn't matter whether we do that symmetry relative to a plane or another : a mirror is a mirror. This could be interesting to explore
try the Assembly4 workbench for FreCAD — tutorials here and here
User avatar
jonasb
Posts: 162
Joined: Tue Dec 22, 2020 7:57 pm

Re: Assembly4 - LCS of a mirrored part as an attachment point

Post by jonasb »

Zolko wrote: Sun Apr 16, 2023 2:14 pm 1) while linear and circular arrays keep a part's colors, a mirrored part becomes always all black. Did you see that too ? Or is it my setup
No, I've never experienced this. Neither with FreeCAD 0.21.0-32532 from the weekly Conda-build nor with a self-compiled r32632 on macOS 11.7.4 "Big Sur".
User avatar
Jolbas
Posts: 327
Joined: Sat Mar 26, 2022 7:48 am
Location: Sweden

Re: Assembly4 - LCS of a mirrored part as an attachment point

Post by Jolbas »

Zolko wrote: Sun Apr 16, 2023 2:14 pm mirrored part becomes always all black.
Has happened to me but it doesn't happen now. When it happeed I could get the correct color back by setting the view parameter ObjectStyle->Lightning to "One side". Maybe a bug that's fixed.

Code: Select all

OS: macOS 12.6
Version: 0.21.0.32836 (Git)
Python 3.10.10, Qt 5.15.8, Coin 4.0.0, Vtk 9.2.6, OCC 7.6.3
Locale: English/United States (en_US)
and

Code: Select all

Version: 0.20.2.29603 (Git)
Python 3.10.8, Qt 5.15.4, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.3
Locale: C/Default (C)
Post Reply