[Fixed] Base shape Binder cannot be used

About the development of the Part Design module/workbench. PLEASE DO NOT POST HELP REQUESTS HERE!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
m.cavallerin
Posts: 115
Joined: Wed May 30, 2018 6:59 pm

[Fixed] Base shape Binder cannot be used

Post by m.cavallerin »

Hi,

from gif you may see error.
baseShapeBinder.gif
baseShapeBinder.gif (237.6 KiB) Viewed 2443 times
I also attach the 3D model.

I modelled as follow:

create a Part
create several bodies
the item3 body was modelled as:
1 - create a binder to item 1 surfaces
2 - drawn a sketch of the body
3 - extruded the sketch
4 - added chamfer/radius >>> fails.

it it a bug?

Regards

Michele

OS: Linux Mint 19.3 (X-Cinnamon/cinnamon)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Release date: 2020/02/19 14:50:34
Build type: Release
Python version: 3.6.9
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
Attachments
SL30 00.01.00.FCStd
(49.36 KiB) Downloaded 65 times
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: [BUG?] Base shape Binder cannot be used

Post by vocx »

m.cavallerin wrote: Fri Feb 21, 2020 5:15 am Hi,

from gif you may see error.
You are basing your sketch directly on the PartDesign ShapeBinder. I would use the ShapeBinder, but then create a PartDesign Plane that uses that ShapeBinder as reference. Then I would use the plane as support for the sketch. This seems to work to create the chamfer.
uwestoehr wrote: Fri Feb 21, 2020 2:14 am ping
Uwe, not saying that you broke this, but since you modified the PartDesign task panels recently maybe you have a clue what is happening here. It's like the ShapeBinder can't be the first element inside the Body.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
chrisb
Veteran
Posts: 54213
Joined: Tue Mar 17, 2015 9:14 am

Re: [BUG?] Base shape Binder cannot be used

Post by chrisb »

This is a regression. it worked in

OS: macOS High Sierra (10.13)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.19541 (Git)
Build type: Release
Branch: master
Hash: a797a4172709b82c6cd08dcf6df86cb789aaa3ce
Python version: 3.8.1
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: C/Default (C)
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: [BUG?] Base shape Binder cannot be used

Post by uwestoehr »

vocx wrote: Sat Feb 22, 2020 4:25 am since you modified the PartDesign task panels recently maybe you have a clue what is happening here. It's like the ShapeBinder can't be the first element inside the Body.
I had a brief look. The issue is triggered by this code in Feature.cpp:

Code: Select all

if (BaseObject->isDerivedFrom(PartDesign::ShapeBinder::getClassTypeId())||
        BaseObject->isDerivedFrom(PartDesign::SubShapeBinder::getClassTypeId()))
    {
        throw Base::ValueError("Base shape of shape binder cannot be used");
    }
However, if I take this minimal and working example I created using FC 0.18.4 the fillets are working:
Fillet-shapeBinder-minimal-working.FCStd
working file created with FC 0.18.4
(41 KiB) Downloaded 93 times

So we have a regression.

I reverted all my changes and went back to revision git commit 53bbf09b, then it works.
So will have to run some Git blame runs to see what commit triggers the regression.
Last edited by uwestoehr on Sun Feb 23, 2020 1:35 am, edited 1 time in total.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

[regression] Base shape Binder cannot be used

Post by uwestoehr »

uwestoehr wrote: Sat Feb 22, 2020 2:42 pm I reverted all my changes and went back to revision git commit 53bbf09b, then it works.
So will have to run some Git blame runs to see what commit triggers the regression.
This commit causes the problem: git commit 3a9002217c8c8bc1:

Code: Select all

git.exe bisect bad
3a9002217c8c8bc13fa3e3e4630b7a5dfe0b9342 is the first bad commit
commit 3a9002217c8c8bc13fa3e3e4630b7a5dfe0b9342
Author: Zheng, Lei <realthunder.dev@gmail.com>
Date:   Thu Feb 13 16:43:59 2020 +0800

PartDesign: fix FeatureDressUp base checking

src/Mod/PartDesign/App/FeatureDressUp.cpp | 24 ++++++++++++------------
src/Mod/PartDesign/App/FeatureDressUp.h   |  2 --
2 files changed, 12 insertions(+), 14 deletions(-)
Lei, can you please have a look?
realthunder wrote: .
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: [regression] Base shape Binder cannot be used

Post by realthunder »

uwestoehr wrote: Sat Feb 22, 2020 4:24 pm Lei, can you please have a look?
PR submitted here. Nice catch.
Try Assembly3 with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
User avatar
Petrikas
Posts: 122
Joined: Sat Dec 05, 2020 8:05 pm

Re: [Fixed] Base shape Binder cannot be used

Post by Petrikas »

This might be a really dumb question, but this is the only thread where this error have been reported.

After using @realthunder brilliant PartDesign "Split Operation" operation I'm getting a split feature. If I select one of the fresh splits and make a body, I end up with BaseFeature ShapeBinder. And while I am able to use it as a reference, I am not able to modify it (I.e. Apply a chamfer or a filet). What I get is a message saying :!: "Base Shape of Shape Binder cannot be used".

I understand that the ShapeBinder should only be used as a reference, but shouldn't splitting a body in two produce 2 modifiable bodies? Maybe I'm not using the approriate procedure to generate 2 separate bodies?

Edit: Some more info on this

Here's what I'm doing step by step:
https://www.youtube.com/watch?v=cvDKp7pBxgE

Here's a video by Oficine Robotica, which a 1:01 shows chamfers applied directly onto the shape binder (in the Tree)
https://youtu.be/wyCLoQLDJsc

Edit 2: Here's what makes it even weirder. I can apply a fillet (which would be illegal) if I add a random feature to the ShapeBinder. It's a way around it right now.

https://youtu.be/sriJyx3sG1s

Code: Select all

OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 2020.1230.23076 +3055 (Git)
Build type: Release
Branch: LinkStage3
Hash: c7f24fa0eb98232200ab5cae1ac3be8786a22c2c
Python version: 3.6.8
Qt version: 5.12.6
Coin version: 4.0.0a
OCC version: 7.4.0.beta
Locale: English/United Kingdom (en_GB)
sc 2021-01-05 18_48_58.jpg
sc 2021-01-05 18_48_58.jpg (392.9 KiB) Viewed 1886 times
sc 2021-01-05 18_49_52.jpg
sc 2021-01-05 18_49_52.jpg (306.96 KiB) Viewed 1886 times
Thank you in advance! Sorry if I'm being thick here.
I sometimes make FreeCAD Tutorials | VertUI | MidnightUI
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: [Fixed] Base shape Binder cannot be used

Post by realthunder »

Petrikas wrote: Tue Jan 05, 2021 4:51 pm This might be a really dumb question, but this is the only thread where this error have been reported.
If you find any PartDesign problem in my branch, you can either report as github issue (preferred). Or report to this thread.

After using @realthunder brilliant PartDesign "Split Operation" operation I'm getting a split feature. If I select one of the fresh splits and make a body, I end up with BaseFeature ShapeBinder. And while I am able to use it as a reference, I am not able to modify it (I.e. Apply a chamfer or a filet). What I get is a message saying :!: "Base Shape of Shape Binder cannot be used".
This is a bug. I have just fixed it. Thanks for reporting.

BTW, you can use Boolean feature to fork a new solid in the same body. Select the splitted solid, create the Boolean, and then check 'New solid' in the task panel. You can then do fillet or whatever on this boolean feature. You can use Boolean again in later time point to merge back the solid, and this time without checking 'New solid'.
Try Assembly3 with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
User avatar
Petrikas
Posts: 122
Joined: Sat Dec 05, 2020 8:05 pm

Re: [Fixed] Base shape Binder cannot be used

Post by Petrikas »

realthunder wrote: Wed Jan 06, 2021 9:27 am If you find any PartDesign problem in my branch, you can either report as github issue (preferred). Or report to this thread.
Will do! I wasn't sure whether it was my incompetence or an actual problem.
Thanks again for your work, and the advice, I will look into Boolean a bit more.
I sometimes make FreeCAD Tutorials | VertUI | MidnightUI
Post Reply