Hi everyone,
I am master student of Earthquake Engineering and I try to code open source structural analysis program. Actually we wrote our program's calculation algoritms in Python 3 but here is the thing we are using our algoritm text based input and output. So I want to add drawing capability to our code and draw some 3d lines (coloum and beam) and I want to read some data from my drawing area about these lines such as;
1- Start and end coordinate [ (xi,yi,zi), [xf,yf,zf]]
2- Section properties of line [ Ix ,Iy, Iz (Moment of Inertias) , Section Area]
3- Material properties of line [Elasticity modules ,Shear Modulus etc]
And after my calculation I want to plot my values on the same drawing screen.
I know FreeCAD can do these stuff but I have to finish my project before April and I don't have much time to learning " What modules I should use or which way is more efficient " so if you help me I will be very happy.
By the way I am adding one video here for show you what I need https://www.youtube.com/watch?v=AlpXZPJOyZQ&t=62s.
Thanks in advance
Structural Analysis Program
Moderator: bernd
Forum rules
and Helpful information for the FEM forum
and Helpful information for the FEM forum
- microelly2
- Veteran
- Posts: 4688
- Joined: Tue Nov 12, 2013 4:06 pm
- Contact:
Re: Structural Analysis Program
The simplest way is to learn Draft Workbench.
You can draw lines and faces and you can display text in 3D scenes.
You can draw lines and faces and you can display text in 3D scenes.
Re: Structural Analysis Program
Ok I understand drawing command with python console but still I don't know is it possible to I connect drawing object's info to my calculation algorithm and how ??
- microelly2
- Veteran
- Posts: 4688
- Joined: Tue Nov 12, 2013 4:06 pm
- Contact:
Re: Structural Analysis Program
if you have created an object you can access a lot of information by the methods of the shapes
the object has a Shape Property ...
and a Placement too.
and the next pages will gibve you some information how to work with FreeCAD python objects.
the object has a Shape Property ...
and a Placement too.
Starting here https://www.freecadweb.org/wiki/Python_ ... g_tutorial>>> App.ActiveDocument.Shape001
<Part::PartFeature>
>>> App.ActiveDocument.Shape001.Shape.CenterOfMass
Vector (20.460534425327545, 37.35470259719471, 13.926378071000116)
>>> App.ActiveDocument.Shape001.Shape.MatrixOfInertia
Matrix ((6.08953e+10,-3.36811e+08,-5.72231e+08,0),(-3.36811e+08,9.89353e+10,-2.12977e+10,0),(-5.72231e+08,-2.12977e+10,7.44056e+10,0),(0,0,0,1))
>>> App.ActiveDocument.Shape001.Shape.Volume
-9561887.883230032
and the next pages will gibve you some information how to work with FreeCAD python objects.
Re: Structural Analysis Program
play a bit with FEM Workbench GUI. If you find the Consttraint tools useful for you, you could use them for your solver too.
Anything you would need is to add your solver to FEM workbench. Check topic https://forum.freecadweb.org/viewtopic.php?f=18&t=31288 an especially development branch https://github.com/berndhahnebach/FreeC ... s/femoofem
Eventually for you it is much simpler since you do not seam to have a mesh. In this case it might be simpler to directly write an own module which extracts the data from FEM constraints and Part or Draft geometry and writes the input file for your analysis software.
If you have any specific question do not hesitate to ask. It is quite a short time line ... good luck
Anything you would need is to add your solver to FEM workbench. Check topic https://forum.freecadweb.org/viewtopic.php?f=18&t=31288 an especially development branch https://github.com/berndhahnebach/FreeC ... s/femoofem
Eventually for you it is much simpler since you do not seam to have a mesh. In this case it might be simpler to directly write an own module which extracts the data from FEM constraints and Part or Draft geometry and writes the input file for your analysis software.
If you have any specific question do not hesitate to ask. It is quite a short time line ... good luck