CheckGeometry tool now with advanced shape content
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
-
- Veteran
- Posts: 5505
- Joined: Thu Apr 05, 2018 1:53 am
CheckGeometry tool now with advanced shape content
CheckGeometry tool in Part workbench now includes advanced information in the Shape Content panel. This includes information such as volume, mass, length, area, center of mass, among other things, depending on the type of shape object being checked. This screenshot is from checking a default Part workbench Cube object:
I don't know what some of that stuff means, but I'm sure someone does.
Advanced shape content can be disabled in the settings:
This is when checking a sketch containing a single arc of circle, end points constrained to the horizontal axis 180 degrees apart, centered at the origin with radius 5mm: And this the same sketch, but now it's a full circle instead of the semi-circle:
Notice how the isClosed property is true for one and false for the other. And also the center of mass is different for the arc since all of the mass of the object is above the x axis.
I don't know what some of that stuff means, but I'm sure someone does.
Advanced shape content can be disabled in the settings:
This is when checking a sketch containing a single arc of circle, end points constrained to the horizontal axis 180 degrees apart, centered at the origin with radius 5mm: And this the same sketch, but now it's a full circle instead of the semi-circle:
Notice how the isClosed property is true for one and false for the other. And also the center of mass is different for the arc since all of the mass of the object is above the x axis.
Re: CheckGeometry tool now with advanced shape content
Where is density pulled from? Looks like 1 by default.
"fight the good fight"
-
- Veteran
- Posts: 5505
- Joined: Thu Apr 05, 2018 1:53 am
Re: CheckGeometry tool now with advanced shape content
It's done with python and produces whichever value gets returned from:
where obj is the object being checked.
Code: Select all
obj.Shape.Mass
Re: CheckGeometry tool now with advanced shape content
Thanks, but I still don't understand.TheMarkster wrote: ↑Fri Sep 11, 2020 10:11 pm It's done with python and produces whichever value gets returned from:
For example a default Part Cube.
Do I need to use an Arch or FEM object that supports material, or add a property with dd Workbench to the cube?
I think I'm missing something very fundamental.
"fight the good fight"
Re: CheckGeometry tool now with advanced shape content
I think it just uses the default units.
For example, a cube of 1 mm x 1 mm x 1 mm (unit length in each direction), that is, 1 mm^3, corresponds to one 1 unit volume, and has a mass of 1 unit mass, which is 1 kg. So the basic density would be 1 kg/mm^3.
Code: Select all
>>> App.Units.Mass
Unit: kg (0,1,0,0,0,0,0,0) [Mass]
>>> App.Units.Volume
Unit: mm^3 (3,0,0,0,0,0,0,0) [Volume]
>>> App.Units.Density
Unit: kg/mm^3 (-3,1,0,0,0,0,0,0) [Density]
Last edited by vocx on Sun Sep 13, 2020 4:21 pm, edited 2 times in total.
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.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
-
- Veteran
- Posts: 5505
- Joined: Thu Apr 05, 2018 1:53 am
Re: CheckGeometry tool now with advanced shape content
At this time CheckGeometry does not calculate any of that information. It only reports what's already there, which can be found by examining the object in the python console. For example, the mass is reported as what can be found by entering obj.Shape.Mass in the python console. The same is true for the other properties reported, such as Area, Volume, Length, etc. if somebody knows a way in python to check for the material associated with an object to get its density I can add some code to CheckGeometry to find a calculated mass and report that.
Re: CheckGeometry tool now with advanced shape content
nice improvement. easy to use.
Re: CheckGeometry tool now with advanced shape content
Nice this needs to be added to the 0.19 release notes
Along with Macro Recent history list
Great work TheMarkster!
Along with Macro Recent history list
Great work TheMarkster!
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: CheckGeometry tool now with advanced shape content
Seems strange that 2d objects have a mass. On my phone just now, so no idea if that is being wrongly reported in checkgeometry or if it's there in the object itself.TheMarkster wrote: ↑Fri Sep 11, 2020 9:48 pm This is when checking a sketch containing a single arc of circle, end points constrained to the horizontal axis 180
Re: CheckGeometry tool now with advanced shape content
What about projected surface area in X, Y and Z direction?