change the Shape of a Part::Feature with the Gui

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Post Reply
User avatar
bernd
Posts: 10098
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

change the Shape of a Part::Feature with the Gui

Post by bernd » Fri May 29, 2020 9:26 am

- Is it possible to change the shape of a Part::Feature with the Gui ?
- Is it possible to create a Part::Feature with a user given name with the Gui ?

I know it is possible by Python and how, but I would like to know it it possible with the Gui too.

cheers bernd

vocx
Posts: 4296
Joined: Thu Oct 18, 2018 9:18 pm

Re: change the Shape of a Part::Feature with the Gui

Post by vocx » Fri May 29, 2020 3:50 pm

bernd wrote:
Fri May 29, 2020 9:26 am
...
I know it is possible by Python and how, but I would like to know it it possible with the Gui too.
Not that I am aware of. This in an internal object, so there is hardly a reason for regular users to create it.

But I guess it could be done. Just a simple Gui Command, with a small task panel, which takes two values, a Shape and a name.
Always add the important information to your posts if you need help.
To support the documentation effort, and code development, your donation is appreciated: paypal.

User avatar
bernd
Posts: 10098
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: change the Shape of a Part::Feature with the Gui

Post by bernd » Fri May 29, 2020 5:12 pm

sure there is, https://forum.freecadweb.org/viewtopic.php?f=18&t=46971

I am aware it would not hard to code, but if it would be possible allready there is no need to code it.

TheMarkster
Posts: 1547
Joined: Thu Apr 05, 2018 1:53 am

Re: change the Shape of a Part::Feature with the Gui

Post by TheMarkster » Fri May 29, 2020 8:07 pm

Not sure if this is what you want, but...

(This requires a recent build of 0.19.)

In Part workbench create a sphere and a cube primitive. Go to the Part menu, create a simple copy of the sphere, to get a new object Sphere001. Right click on the property tree and enable Show All. You will see a property of Sphere001 called Shape. Right click there and choose Expression. In the dialog enter Box.Shape. Now Sphere001 contains the shape of the cube instead of the shape of the Sphere, and it's parametric such that changes to the original cube become reflected in Sphere001.
Snip macro screenshot-279d68.png
Snip macro screenshot-279d68.png (124.9 KiB) Viewed 227 times
Edit: fixed typo
Attachments
part_feature_test.FCStd
(10.08 KiB) Downloaded 2 times
My FreeCAD video series on youtube: https://www.youtube.com/c/mwganson

User avatar
bernd
Posts: 10098
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: change the Shape of a Part::Feature with the Gui

Post by bernd » Wed Jun 03, 2020 6:20 am

very cool. Just the step to choose the object would be cool if it would be possible with Gui to, but this great already.

User avatar
yorik
Site Admin
Posts: 11930
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: change the Shape of a Part::Feature with the Gui

Post by yorik » Wed Jun 03, 2020 2:08 pm

The thing is, what would you change the shape of your Part::Feature with? Is it the shape of another object? (Something like "copy shape of object...") Or something not displayed in the GUI? (Then, where does it live?)

vocx
Posts: 4296
Joined: Thu Oct 18, 2018 9:18 pm

Re: change the Shape of a Part::Feature with the Gui

Post by vocx » Wed Jun 03, 2020 6:29 pm

yorik wrote:
Wed Jun 03, 2020 2:08 pm
The thing is, what would you change the shape of your Part::Feature with? Is it the shape of another object? (Something like "copy shape of object...") ...
Yes. Essentially a usage scenario in FEM is replacing an older shape with a new shape, while keeping the rest of the FEM setup in place.
Always add the important information to your posts if you need help.
To support the documentation effort, and code development, your donation is appreciated: paypal.

User avatar
bernd
Posts: 10098
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: change the Shape of a Part::Feature with the Gui

Post by bernd » Wed Jun 03, 2020 7:27 pm

vocx wrote:
Wed Jun 03, 2020 6:29 pm
yorik wrote:
Wed Jun 03, 2020 2:08 pm
The thing is, what would you change the shape of your Part::Feature with? Is it the shape of another object? (Something like "copy shape of object...") ...
Yes. Essentially a usage scenario in FEM is replacing an older shape with a new shape, while keeping the rest of the FEM setup in place.
exactly, and if the exchanged shape has the same topology everything works without any further changes.

Post Reply