Info Workbench - Help with icons please.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
-
- Veteran
- Posts: 2764
- Joined: Mon Feb 27, 2012 5:31 pm
Info Workbench - Help with icons please.
Having recently completed an Open University course which covered the Monti Carlo method of integration. I thought it would be a good project to use it to calculate Volumes, Center of Mass, Moment of Inertia etc for FreeCAD
As to the best laid plans of mice and men I then found out that FreeCAD and OCC already provide functions for the above.
So anyway I have done my first FreeCAD module that implements some information functions as a WorkBench called Info.
i.e. On selecting an object or objects the Volume and Surface Area are calculated.
For a single selected object the Center of Mass and Moment of Inertia about the Centre of Mass are displayed.
It would be great if somebody with more graphics talent than me design some icons for the module. At present it
purloins them from the OpenSCAD module.
Thanks to Sebastian Hoogen for answering all my questions
Anyway you can download from http://www.sloan-home.co.uk/FreeCAD/Info/Info.html
I am open to suggestions on what additional function could be added.
As to the best laid plans of mice and men I then found out that FreeCAD and OCC already provide functions for the above.
So anyway I have done my first FreeCAD module that implements some information functions as a WorkBench called Info.
i.e. On selecting an object or objects the Volume and Surface Area are calculated.
For a single selected object the Center of Mass and Moment of Inertia about the Centre of Mass are displayed.
It would be great if somebody with more graphics talent than me design some icons for the module. At present it
purloins them from the OpenSCAD module.
Thanks to Sebastian Hoogen for answering all my questions
Anyway you can download from http://www.sloan-home.co.uk/FreeCAD/Info/Info.html
I am open to suggestions on what additional function could be added.
Re: Info Workbench - Help with icons please.
Nice module! Thanks
I would integrate it into the Part module, and later into Assembly (which is IMO the right place).
I would integrate it into the Part module, and later into Assembly (which is IMO the right place).
Stop whining - start coding!
Re: Info Workbench - Help with icons please.
Hi Keith
There is an existing icon in "Part" work bench which I imagine you could use for this, or similar, function.
See
/freecad/src/Mod/Part/Gui/Resources/icons/Part_ShapeInfo.svg
I think this is an import missing functionality in freecad, I know it is there in Python, but I mean as a gui tool. Would be great if you put it in Part work bench as a gui tool, as Jurgen said.
regards
Jim
There is an existing icon in "Part" work bench which I imagine you could use for this, or similar, function.
See
/freecad/src/Mod/Part/Gui/Resources/icons/Part_ShapeInfo.svg
I think this is an import missing functionality in freecad, I know it is there in Python, but I mean as a gui tool. Would be great if you put it in Part work bench as a gui tool, as Jurgen said.
regards
Jim
Re: Info Workbench - Help with icons please.
Hi keithsloan52, excelent work..
You could also add the function "length" of the object ? and could also be useful "StaticMoments" Object (Both are available from python) .. ..On the other hand I also think it should go in the module part.
Looking at the website of Tango style icons, I found these two that maybe can serve ..
Other tango style icons can be found here:http://commons.wikimedia.org/wiki/Tango_icons or of FreeCAD https://sourceforge.net/apps/mediawiki/ ... le=Artwork
You could also add the function "length" of the object ? and could also be useful "StaticMoments" Object (Both are available from python) .. ..On the other hand I also think it should go in the module part.
Looking at the website of Tango style icons, I found these two that maybe can serve ..
Other tango style icons can be found here:http://commons.wikimedia.org/wiki/Tango_icons or of FreeCAD https://sourceforge.net/apps/mediawiki/ ... le=Artwork
Ing. Gomez Lucio
Scope Ingenieria (scopeingenieria.com)
Scope Ingenieria (scopeingenieria.com)
-
- Veteran
- Posts: 2764
- Joined: Mon Feb 27, 2012 5:31 pm
Re: Info Workbench - Help with icons please.
Thanks for the comments and suggestions
I am working on a different project at the moment nothing to do with FreeCAD.
Hope to get back to this before not too long.
Keith
I am working on a different project at the moment nothing to do with FreeCAD.
Hope to get back to this before not too long.
Keith
Re: Info Workbench - Help with icons please.
Hello, I made some modifications to the module info. I clarify that I am not a programmer, only a bit of python and pyqt. I share a video with the modifications and the code. Basically add more details and some corrections, and another option for data surfaces and edges. Now the module displays the following options if you select a solid:
- Volume
- Area
- Perimeter
- Mass-center
- Matrix of Moments of Inertia (about COM without rotation about the axis of coordinates)
- Principal Moments of Inertia and the vectors of the principal axis of inertia
If you select an area (or several) or edges (or several)
- Length
- Area
Video: http://www.youtube.com/watch?v=SRSp0-P5 ... e=youtu.be
Sorry, for my bad English
- Volume
- Area
- Perimeter
- Mass-center
- Matrix of Moments of Inertia (about COM without rotation about the axis of coordinates)
- Principal Moments of Inertia and the vectors of the principal axis of inertia
If you select an area (or several) or edges (or several)
- Length
- Area
Video: http://www.youtube.com/watch?v=SRSp0-P5 ... e=youtu.be
Sorry, for my bad English
- Attachments
-
- Info.zip
- CODE
- (6.04 KiB) Downloaded 304 times
Ing. Gomez Lucio
Scope Ingenieria (scopeingenieria.com)
Scope Ingenieria (scopeingenieria.com)
Re: Info Workbench - Help with icons please.
That's great work!
The surface area tool and edge length are very nice.
Thanks!
I wonder if it would be possible to make this module multilingual and that it adopts the system language.
We need different icons too!
The surface area tool and edge length are very nice.
Thanks!
I wonder if it would be possible to make this module multilingual and that it adopts the system language.
We need different icons too!
Re: Info Workbench - Help with icons please.
Hi
great work
I was preparing the same thing with refresh
I was more the name of objects, converter, density, angle xy, yz, xz of the object
If you could add it would be nice
my to Sorry, for my bad English
great work
I was preparing the same thing with refresh
I was more the name of objects, converter, density, angle xy, yz, xz of the object
If you could add it would be nice
my to Sorry, for my bad English
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.
My macros on Gist.github here complete macros Wiki and forum.
Re: Info Workbench - Help with icons please.
Update the code to add the functions:
-- refresh
-- Name of the selected object
Update module icon
Later I will see how it works multilanguage, because I do not know how. And also how to add icons in the toolbar
We must also make a cleaner code.
For density is always 1 [kg / mm ^ 3], at least until ready module materials. Another option would be to ask before density and then do the math correct mass and moments of inertia.
Other useful things might be a button that prints the results in a. txt file.
Select vertexes and know their coordinates, and if I select 2 vertexes to know the differences of distances on each axis (Dx, Dy, Dz)
If someone with more experience in programming wants to help is welcome
Sorry, for my bad English
-- refresh
-- Name of the selected object
Update module icon
Later I will see how it works multilanguage, because I do not know how. And also how to add icons in the toolbar
We must also make a cleaner code.
For density is always 1 [kg / mm ^ 3], at least until ready module materials. Another option would be to ask before density and then do the math correct mass and moments of inertia.
Other useful things might be a button that prints the results in a. txt file.
Select vertexes and know their coordinates, and if I select 2 vertexes to know the differences of distances on each axis (Dx, Dy, Dz)
If someone with more experience in programming wants to help is welcome
Sorry, for my bad English
- Attachments
-
- Info.zip
- (6.96 KiB) Downloaded 265 times
Ing. Gomez Lucio
Scope Ingenieria (scopeingenieria.com)
Scope Ingenieria (scopeingenieria.com)
Re: Info Workbench - Help with icons please.
Very good work! This module is becoming very interesting!
Outputting to a text file is not hard, there is a ready-to-use qt dialog, that you can use like this:
Making things multilingual is a bit harder, because you must create special translation files, etc. But if you are interested to do it I can explain more step-by-step.
Outputting to a text file is not hard, there is a ready-to-use qt dialog, that you can use like this:
Code: Select all
from PyQt4 import QtGui
filename = QtGui.QFileDialog.getOpenFileName(QtGui.qApp.activeWindow(),'Save a text file','*.txt')
myfile = open(filename)
myfile.write("some string\n")
myfile.write("something else")
myfile.close()