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
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

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

Post by bernd »

- 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
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

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

Post by vocx »

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. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

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

Post by bernd »

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
Veteran
Posts: 5513
Joined: Thu Apr 05, 2018 1:53 am

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

Post by TheMarkster »

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 889 times
Edit: fixed typo
Attachments
part_feature_test.FCStd
(10.08 KiB) Downloaded 14 times
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

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

Post by bernd »

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
Founder
Posts: 13664
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

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

Post by yorik »

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
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

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

Post by vocx »

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. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

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

Post by bernd »

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