How to attach SubShapeBinders to a DatumPlane

Report observations made with the new Toponaming branch.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
bruce
Posts: 47
Joined: Sun Aug 11, 2019 8:46 pm

How to attach SubShapeBinders to a DatumPlane

Post by bruce »

Hello,

I am trying to create a number of groove sections using a single sketch. I am modelling an electrical plug with a number of similar pin profiles. The location of the pins does not follow a standard array.

In the attached file, I have created the pin_1_pocket_sk, and bound it to a DatumPoint and DatumPlane with it's origin at the center of the pin location, and created a groove with the sketch and it worked well.

I then created a SubShapeBinder (pin_5_sb) from pin_1_pocket_sk and attempted to attach it to the pin_5_plane. When I do this, the SubShapeBinder becomes 'invisible' (I suspect that it is rendered in a single point in space at the origin of pin_5_plane). Reattaching the pin_5_sb to the pin_1_pocket_sk it renders correctly.

Performing a groove operation on the pin_5_sb when attached to pin_5_plane does not produce the desired output (the same profile as on pins 1-4).

I've modelled pins 1 through 4 in the attached file to demonstrate what I'm trying to do.

Edit
Turns out I was working in RealThunder's branch which allows re-attachment of the SubShapeBinders. I opened up the file in the official weekly FreeCAD branch and it looks like am not allowed to reattach a subShapeBinder to another surface. My apologies for the confusion. I'm still left with the question of how to accomplish the "multiple operations from a single sketch problem" though.

Picture of the plug.
Screenshot from 2022-06-22 15-49-45.png
Screenshot from 2022-06-22 15-49-45.png (160.34 KiB) Viewed 1736 times
If anyone could let me know how to get the pin_5_sb to attach properly to the ping_5_plane or a more clever way of solving this problem it would be appreciated.

Thanks in advance.

Bruce

OS: Debian GNU/Linux bookworm/sid (GNOME/gnome)
Word size of FreeCAD: 64-bit
Version: 2022.430.26244 +4758 (Git) AppImage
Build type: Release
Branch: LinkDaily
Hash: b024b876480a533018fdc702145e9e38f8c54ba6
Python version: 3.9.12
Qt version: 5.12.9
Coin version: 4.0.1
OCC version: 7.5.3
Locale: English/Canada (en_CA)
Attachments
power_plug.FCStd
(106.49 KiB) Downloaded 37 times
Bance
Veteran
Posts: 4186
Joined: Wed Feb 11, 2015 3:00 pm
Location: London

Re: How to attach SubShapeBinders to a DatumPlane

Post by Bance »

Do it with a polar pattern and a mirror, it doesn't have to be all or nothing with patterns. ;)

There are some other problems though, the first sketch makes the holes too big, so the grooves are wasted.

Hint for a groove you need a radius not a diameter.
plug.png
plug.png (258.33 KiB) Viewed 1708 times
Attachments
power_plugBance.FCStd
(63.97 KiB) Downloaded 33 times
User avatar
Shalmeneser
Veteran
Posts: 9474
Joined: Wed Dec 23, 2020 12:04 am
Location: Fr

Re: How to attach SubShapeBinders to a DatumPlane

Post by Shalmeneser »

:idea:
Attachments
power_plug_SHALM.FCStd
(90.4 KiB) Downloaded 35 times
Capture d’écran 2022-06-23 011236.jpg
Capture d’écran 2022-06-23 011236.jpg (68.51 KiB) Viewed 1687 times
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: How to attach SubShapeBinders to a DatumPlane

Post by Zolko »

bruce wrote: Wed Jun 22, 2022 8:54 pm Turns out I was working in RealThunder's branch which allows re-attachment of the SubShapeBinders. I opened up the file in the official weekly FreeCAD branch and it looks like am not allowed to reattach a subShapeBinder to another surface. My apologies for the confusion.
A ShapeBinder (and SubShapeBinder) has a "Support" property, as does the AttacherExtension : these 2 Support properties mean different things though, so you can't mix the 2 functions as one "Support" confuses the other "Support". The choice of the name "Support" for a ShapeBinder is unfortunate, if it were called something else then this approach would work (Target ? Base ?).

I don't know how LinkStage3 branch manages to do it though.

I'm still left with the question of how to accomplish the "multiple operations from a single sketch problem" though.
I use Draft::Clone for this: you clone your sketch, the clone can be attached and used for other operations.
try the Assembly4 workbench for FreCAD — tutorials here and here
User avatar
quiret
Posts: 72
Joined: Wed Jun 15, 2022 1:23 pm
Location: Germany
Contact:

Re: How to attach SubShapeBinders to a DatumPlane

Post by quiret »

bruce wrote: Wed Jun 22, 2022 8:54 pm (...) I opened up the file in the official weekly FreeCAD branch and it looks like am not allowed to reattach a subShapeBinder to another surface. (...)
You can still reattach shape binders on the latest weekly, but you have to do it by selecting it in the Combo View and then going to Part WB -> Part menu (top) -> "Attachment...". I believe this is a remedy for the breaking based on the "Support" name overlap error. I am the one who reported that bug.

Image

Code: Select all

OS: Windows 10 (10.0)
Word size of FreeCAD: 64-bit
Version: 0.20.29192 (Git)
Build type: Release
Branch: master
Hash: fb1a7af3605ed86631afabb1eb77ae305e418d98
Python 3.8.13, Qt 5.12.9, Coin 4.0.0, Vtk 9.1.0, OCC 7.5.3
Locale: English/Germany (en_DE)
chrisb
Veteran
Posts: 53924
Joined: Tue Mar 17, 2015 9:14 am

Re: How to attach SubShapeBinders to a DatumPlane

Post by chrisb »

Although I can change the Attachment, the associated face doesn't change.

- I started with the ShapeBinder of Face6 (last face in direction Z)
- reattached the ShapeBinder to Face2

-> The face showing in the SubShapeBinnder is still Face6.
Attachments
attachSubShapeBinder.FCStd
(4.73 KiB) Downloaded 33 times
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
quiret
Posts: 72
Joined: Wed Jun 15, 2022 1:23 pm
Location: Germany
Contact:

Re: How to attach SubShapeBinders to a DatumPlane

Post by quiret »

chrisb wrote: Thu Jun 23, 2022 9:55 am Although I can change the Attachment, the associated face doesn't change.

- I started with the ShapeBinder of Face6 (last face in direction Z)
- reattached the ShapeBinder to Face2

-> The face showing in the SubShapeBinnder is still Face6.
When I open your attachment file with the latest weekly FreeCAD version as I mentioned in my post above I get the following attachment property for the shape binder:
Image
It looks like it is not attached to anything, after saving to disk. The binder looks to be having face2 selected as it's shape. Then I change it's attachment to be face6:
Image
This works as intended because the shape binder is no longer attached to the origin but to the top face of the cube, lifting it in the z-direction that the face is positioned at. After saving the file that I now modified, closing the document and reopening it, I now get the following weird result:
Image
It looks like the previous "attachment" of the shape binder has now become it's face selection, possibly related to the issue that I have previously reported. Thus the FreeCAD file has broken at the saving stage.
bruce
Posts: 47
Joined: Sun Aug 11, 2019 8:46 pm

Re: How to attach SubShapeBinders to a DatumPlane

Post by bruce »

quiret wrote: Thu Jun 23, 2022 10:25 am You can still reattach shape binders on the latest weekly, but you have to do it by selecting it in the Combo View and then going to Part WB -> Part menu (top) -> "Attachment...". I believe this is a remedy for the breaking based on the "Support" name overlap error. I am the one who reported that bug.
I tried this option and although it seemed to work the SubShapeBinder didn't match the origin of the source to the origin of the DatumPlane as shown below. Any idea how to get the origins to align?
Screenshot from 2022-06-23 12-49-28.png
Screenshot from 2022-06-23 12-49-28.png (50.64 KiB) Viewed 1506 times
Thank you for your help
Last edited by bruce on Thu Jun 23, 2022 6:02 pm, edited 1 time in total.
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: How to attach SubShapeBinders to a DatumPlane

Post by adrianinsaval »

is there a github issue for this? As Zolko said I think we should change the name of that property to Source or something similar
bruce
Posts: 47
Joined: Sun Aug 11, 2019 8:46 pm

Re: How to attach SubShapeBinders to a DatumPlane

Post by bruce »

adrianinsaval wrote: Thu Jun 23, 2022 5:57 pm is there a github issue for this? As Zolko said I think we should change the name of that property to Source or something similar
I defer to @chrisb as to whether a ticket should be created.
Post Reply