[Feature Request] Geometric and mass properties

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
NewJoker
Veteran
Posts: 3020
Joined: Sun Oct 11, 2020 7:49 pm

[Feature Request] Geometric and mass properties

Post by NewJoker »

Hi,
it would be great to have an option to obtain the following information about the model using built-in tools (without macros and Python codes):

1) in sketcher (section properties):
- area
- centroid coordinates (with respect to sketcher axes)
- second moments of area (with respect to centroidal axes)
maybe more if possible (like polar second moment of area)

2) on part level:
- volume
- surface area
- center of mass
- moments of inertia (with respect to center of mass)
maybe also moments of inertia with respect to selected point

What do you think?
drmacro
Veteran
Posts: 8870
Joined: Sun Mar 02, 2014 4:35 pm

Re: [Feature Request] Geometric and mass properties

Post by drmacro »

Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
User avatar
NewJoker
Veteran
Posts: 3020
Joined: Sun Oct 11, 2020 7:49 pm

Re: [Feature Request] Geometric and mass properties

Post by NewJoker »

Yeah, I've seen this. It's really nice but maybe something like that could be built into the FreeCAD. Also, this macro won't give me second moments of area for a section.
drmacro
Veteran
Posts: 8870
Joined: Sun Mar 02, 2014 4:35 pm

Re: [Feature Request] Geometric and mass properties

Post by drmacro »

NewJoker wrote: Thu Apr 15, 2021 7:36 pm Yeah, I've seen this. It's really nice but maybe something like that could be built into the FreeCAD. Also, this macro won't give me second moments of area for a section.
Macros can simply be added to the toobar.

Macros can be modified to get second moments.

That what flexibly is all about.
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
User avatar
NewJoker
Veteran
Posts: 3020
Joined: Sun Oct 11, 2020 7:49 pm

Re: [Feature Request] Geometric and mass properties

Post by NewJoker »

drmacro wrote: Thu Apr 15, 2021 9:16 pm
Macros can be modified to get second moments.
Do you know about any ready solutions for that ? I have very little experience with Python programming and maybe someone already made a script for that.
drmacro
Veteran
Posts: 8870
Joined: Sun Mar 02, 2014 4:35 pm

Re: [Feature Request] Geometric and mass properties

Post by drmacro »

I suspect you are correct that it has been done.

mario, who is mentioned in this forum post: https://forum.freecadweb.org/viewtopic.php?t=11290
would probably modify the info macro.

He'll probably pick up on this thread, or you might post in that thread and ask.
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
kisolre
Veteran
Posts: 4164
Joined: Wed Nov 21, 2018 1:13 pm

Re: [Feature Request] Geometric and mass properties

Post by kisolre »

Part_CheckGeometry shows a lot (if not all) of these.
mario52
Veteran
Posts: 4673
Joined: Wed May 16, 2012 2:13 pm

Re: [Feature Request] Geometric and mass properties

Post by mario52 »

hi

my macro (FCInfo) work only with unique object and give "maximum" info of this object

the macro work only outside Sketcher and not inside Sketcher i tray for work inside sketcher but certain dimension hare good and other not then sorry also for my i abandoned this option

for the moment of inertia is other expert user who worked on it see "https://forum.freecadweb.org/viewtopic.php?f=22&t=23888" i am not knowledge for this (my i use only the result give by FreeCAD command) :

Code: Select all

m = FreeCADGui.Selection.getSelection()[0].Shape.MatrixOfInertia
if you have concrete formula or other demand and if i can adding it ... no problem

mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
User avatar
NewJoker
Veteran
Posts: 3020
Joined: Sun Oct 11, 2020 7:49 pm

Re: [Feature Request] Geometric and mass properties

Post by NewJoker »

Thanks for replies. When it comes to FCInfo macro, would it be possible to add an option to calculate and display second moments of area (by clicking on a selected face outside of the sketcher) ? Or does it work only for whole parts (volumes) ?
mario52
Veteran
Posts: 4673
Joined: Wed May 16, 2012 2:13 pm

Re: [Feature Request] Geometric and mass properties

Post by mario52 »

hi

FCInfo work for the volume (complete object)

but maybe Part > Create a copy > Create element copy Image Part_ElementCopy (for create a independent face)

and test it ?? I do not know

mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
Post Reply