Padding/pocketing sub shapebinders on not the Z axis doesn't work

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!
bruce
Posts: 33
Joined: Sun Aug 11, 2019 8:46 pm

Padding/pocketing sub shapebinders on not the Z axis doesn't work

Post by bruce »

When making pockets with sub-shapebinders, FreeCAD appears to insist on pocketing along the z-axis. Is this the correct behaviour?

1. Open the attached SM-PLB03A case file.
2. make "SLIDE_IN" the active body
3. select the "vent_binder" subshapebinder in "SLIDE_IN"
4. pocket the "vent_binder"
5. observe that the pocket appears to be along the z axis as it appears in the section below the "vent binder" instead of along the y axis where I would expect it.
6. note that the "thread_holes_2" pocket, which is also based on a subshapebinder from "MAIN_CASE" works fine (but it's along the z-axis)

But wait! There's more! I think the following might be related, but it's possible that it should be a separate post/ticket. Please let me know your thoughts.

1. Open FreeCAD
2. Make a new body "Body1"
3. Make a new sketch on that body "Sketch1" on the YZ or XZ plane. Put a rectangle in the sketch
4. Make a new body "Body2"
5. Create a subshapebinder in "Body2" based upon "Sketch1" in "Body1"
6. Create a pad in "Body2" based upon the subshapebinder
7. Observe that FreeCAD returns the following error: "type of first element in tuple must be "DocumentObject", not NoneType"

Thank you in advance for your time.

OS: Debian GNU/Linux bookworm/sid (GNOME/gnome)
Word size of FreeCAD: 64-bit
Version: 0.20.25997 (Git) AppImage
Build type: Release
Branch: master
Hash: 77b198048a63f1e9ca15eef64c8042d599a14cf3
Python version: 3.9.7
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.2
Locale: English/Canada (en_CA)

issue #4767
Attachments
SM-PLB03A case.FCStd
File to reproduce the issue.
(706.76 KiB) Downloaded 14 times
Last edited by bruce on Sun Oct 17, 2021 8:08 pm, edited 1 time in total.
freedman
Posts: 2153
Joined: Thu Mar 22, 2018 3:02 am
Location: Washington State, USA

Re: Padding/pocketing sub shapebinders on not the Z axis doesn't work

Post by freedman »

I don 't follow FreeCAD all the time but I thought a shapebinder is a reference object, if you want to pocket the binder shape then you need to create a sketch using the binder as a reference, then pocket the sketch.
bruce
Posts: 33
Joined: Sun Aug 11, 2019 8:46 pm

Re: Padding/pocketing sub shapebinders on not the Z axis doesn't work

Post by bruce »

@freedman https://wiki.freecadweb.org/PartDesign_ ... eBinder/en leads me to believe that doing a direct pad/pocket from a shapebinder is supported.
Then the resulting binder object can be moved or be used to perform advanced operations like booleans or pads.
It doesn't explicitly say pockets; but I would think that it ought to be possible?
freedman
Posts: 2153
Joined: Thu Mar 22, 2018 3:02 am
Location: Washington State, USA

Re: Padding/pocketing sub shapebinders on not the Z axis doesn't work

Post by freedman »

I remember some of that. It appears they can be used for boolean ops. I don't know how a lone pocket can be used in a boolean.
wmayer
Site Admin
Posts: 17521
Joined: Thu Feb 19, 2009 10:32 am

Re: Padding/pocketing sub shapebinders on not the Z axis doesn't work

Post by wmayer »

5. observe that the pocket appears to be along the z axis as it appears in the section below the "vent binder" instead of along the y axis where I would expect it.
When doing this then the model disappears and when pressing OK an error comes up that the model consists of several solids which is not allowed yet.
But wait! There's more! I think the following might be related, but it's possible that it should be a separate post/ticket. Please let me know your thoughts.
That's an issue that I have discovered recently, too. It's fixed with git commit f411390d33e9 and git commit 0503f06930
bruce
Posts: 33
Joined: Sun Aug 11, 2019 8:46 pm

Re: Padding/pocketing sub shapebinders on not the Z axis doesn't work

Post by bruce »

When doing this then the model disappears and when pressing OK an error comes up that the model consists of several solids which is not allowed yet.
I don't think this is correct, pocketing vent_binder should produce the result pockets highlighted in the picture below, but it does not.

I also do not get the error that you're getting. Am I doing something wrong with this process?

Thanks again.
Screenshot from 2021-10-14 19-42-43.png
Screenshot from 2021-10-14 19-42-43.png (46.1 KiB) Viewed 471 times
wmayer
Site Admin
Posts: 17521
Joined: Thu Feb 19, 2009 10:32 am

Re: Padding/pocketing sub shapebinders on not the Z axis doesn't work

Post by wmayer »

I don't think this is correct, pocketing vent_binder should produce the result pockets highlighted in the picture below, but it does not.

I also do not get the error that you're getting. Am I doing something wrong with this process?
I guess this depends on the used OCC version. Here I have 7.3.

But anyway when creating the pocket as you described and then while the dialog is still open run this code snippet:

Code: Select all

s=App.ActiveDocument.Pocket007.AddSubShape
Part.show(s)
it displays a shape that consists of 6 stripes. They are extruded in the correct direction (i.e. Y axis) but the placement of this shape is wrong as it's perpendicular to the sketch.

To me it looks like that either a placement is forgotten or applied twice when determining the pocket base shape.
freedman
Posts: 2153
Joined: Thu Mar 22, 2018 3:02 am
Location: Washington State, USA

Re: Padding/pocketing sub shapebinders on not the Z axis doesn't work

Post by freedman »

I don't build FreeCAD so if this get's into a weekly build please update this post so I can test.
Thank you
bruce
Posts: 33
Joined: Sun Aug 11, 2019 8:46 pm

Re: Padding/pocketing sub shapebinders on not the Z axis doesn't work

Post by bruce »

it displays a shape that consists of 6 stripes. They are extruded in the correct direction (i.e. Y axis) but the placement of this shape is wrong as it's perpendicular to the sketch.
I see the 6 stripes on the XY axis as you've noted, they're located significantly below the part (if that matters).

I've created the subshapebinder many times and this is always the result. Is this not a bug? Should the pocket occur along the Y-axis?

When I use the subshapebinder to create another sketch in that body, it pockets properly.
chrisb
Posts: 37776
Joined: Tue Mar 17, 2015 9:14 am

Re: Padding/pocketing sub shapebinders on not the Z axis doesn't work

Post by chrisb »

There is something weird with this model. While trying to simplify the file in order to isolate the issue, I found that the SubShapeBinder is not updated when its source changes.
Attachments
SM-PLB03A_cb.FCStd
(35.94 KiB) Downloaded 4 times
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Post Reply