Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PartDesign::Body can't be used as a body BaseFeature #13762

Open
2 tasks done
NomAnor opened this issue May 1, 2024 · 4 comments
Open
2 tasks done

PartDesign::Body can't be used as a body BaseFeature #13762

NomAnor opened this issue May 1, 2024 · 4 comments
Labels
Feature FR for improvements or new features Has workaround WB Part Design Related to the Part Design Workbench

Comments

@NomAnor
Copy link
Contributor

NomAnor commented May 1, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Problem description

Part features can be used to create a Body with a BaseFeature inside by selecting them and then creating a Body. This allows to change between Part and PartDesign workflow.
It is not possible to create a Body with another Body as a BaseFeature, it is explicitly forbidden in the code:

else if ( baseFeature->isDerivedFrom ( Part::BodyBase::getClassTypeId() ) ) {
// Prevent creating bodies based on bodies (but don't pop-up a dialog)
baseFeature = nullptr;
}

It would be nice to allow this so I can create a base body and then create multiple bodies each with a BaseFeatures pointing to the base body and add different additional featues to them.

Full version info

OS: Arch Linux (XFCE/xfce)
Word size of FreeCAD: 64-bit
Version: 0.22.0dev.36729 +8 (Git)
Build type: Debug
Branch: pd-trans-body
Hash: 19a1b3fab7c9297c28c3accf2a5fdbf060a83185
Python 3.11.8, Qt 5.15.13, Coin 4.0.2, Vtk 9.3.0, OCC 7.3.0
Locale: German/Germany (de_DE)
Installed mods: 
  * Manipulator 1.5.7
  * ThreadProfile 1.84.0
  * DynamicData 2.60.0
  * lattice2 1.0.0
  * 3D_Printing_Tools
  * freecad.gears 1.0.0
  * Assembly3 0.11.3
  * QuickMeasure 2022.10.28
  * fasteners 0.4.21

Subproject(s) affected?

PartDesign

Anything else?

Manually changing the 'Base Feature' property of the BaseFeature to point to a Body seems to work without a problem. I don't see a reason why this would not be allowed.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@NomAnor NomAnor changed the title PartDesign:Body can't be used as a body BaseFeature PartDesign::Body can't be used as a body BaseFeature May 1, 2024
@maxwxyz
Copy link
Collaborator

maxwxyz commented May 1, 2024

As workaround you could use the shapebinder.

@maxwxyz maxwxyz added WB Part Design Related to the Part Design Workbench Feature FR for improvements or new features labels May 1, 2024
@Roy-043
Copy link
Contributor

Roy-043 commented May 3, 2024

This link describes how it can be done:
https://wiki.freecad.org/PartDesign_Body#Base_Feature

@NomAnor
Copy link
Contributor Author

NomAnor commented May 3, 2024

I doesn't, it explains how to use a Part::Feature as a base feature. PartDesign::Body can't be used as a base feature.

Note: you can't select an existing Body, or any of its features, when pressing Body.

A ShapeBinder can be used as a base feature but I think for a user this is an unnecessary step.

@0penBrain
Copy link
Contributor

0penBrain commented May 3, 2024

Actually it's possible to do it. Let's say you want Body_A to be the base feature of Body_B (and supposing Body_A already exists).

  • Create a new body Body_B
  • Select Body_B
  • In the Data tab of Property Editor, select "Base Feature" and click on the '...' icon
  • Select "Body_A" in the list and validate

Done 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature FR for improvements or new features Has workaround WB Part Design Related to the Part Design Workbench
Projects
None yet
Development

No branches or pull requests

4 participants