| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| |
|
| | __title__ = "FreeCAD FEM element geometry 1D document object" |
| | __author__ = "Bernd Hahnebach" |
| | __url__ = "https://www.freecad.org" |
| |
|
| | |
| | |
| | |
| |
|
| | from FreeCAD import Base |
| | from . import base_femelement |
| | from . import base_fempythonobject |
| |
|
| | _PropHelper = base_fempythonobject._PropHelper |
| |
|
| |
|
| | class ElementGeometry1D(base_femelement.BaseFemElement): |
| | """ |
| | The ElementGeometry1D object |
| | """ |
| |
|
| | Type = "Fem::ElementGeometry1D" |
| |
|
| | def __init__(self, obj): |
| | super().__init__(obj) |
| |
|
| | def _get_properties(self): |
| | prop = super()._get_properties() |
| |
|
| | prop.append( |
| | _PropHelper( |
| | type="App::PropertyLength", |
| | name="RectWidth", |
| | group="RectBeamSection", |
| | doc="Set width of the rectangular beam elements", |
| | value=0.0, |
| | ) |
| | ) |
| | prop.append( |
| | _PropHelper( |
| | type="App::PropertyLength", |
| | name="RectHeight", |
| | group="RectBeamSection", |
| | doc="Set height of there ctangular beam elements", |
| | value=0.0, |
| | ) |
| | ) |
| | prop.append( |
| | _PropHelper( |
| | type="App::PropertyLength", |
| | name="CircDiameter", |
| | group="CircBeamSection", |
| | doc="Set diameter of the circular beam elements", |
| | value=0.0, |
| | ) |
| | ) |
| | prop.append( |
| | _PropHelper( |
| | type="App::PropertyLength", |
| | name="PipeDiameter", |
| | group="PipeBeamSection", |
| | doc="Set outer diameter of the pipe beam elements", |
| | value=0.0, |
| | ) |
| | ) |
| | prop.append( |
| | _PropHelper( |
| | type="App::PropertyLength", |
| | name="PipeThickness", |
| | group="PipeBeamSection", |
| | doc="Set thickness of the pipe beam elements", |
| | value=0.0, |
| | ) |
| | ) |
| | prop.append( |
| | _PropHelper( |
| | type="App::PropertyLength", |
| | name="Axis1Length", |
| | group="EllipticalBeamSection", |
| | doc="Set first principal axis length of the elliptical beam elements", |
| | value=0.0, |
| | ) |
| | ) |
| | prop.append( |
| | _PropHelper( |
| | type="App::PropertyLength", |
| | name="Axis2Length", |
| | group="EllipticalBeamSection", |
| | doc="Set second principal axis length of the elliptical beam elements", |
| | value=0.0, |
| | ) |
| | ) |
| | prop.append( |
| | _PropHelper( |
| | type="App::PropertyLength", |
| | name="BoxWidth", |
| | group="BoxBeamSection", |
| | doc="Set width of the box beam elements", |
| | value=0.0, |
| | ) |
| | ) |
| | prop.append( |
| | _PropHelper( |
| | type="App::PropertyLength", |
| | name="BoxHeight", |
| | group="BoxBeamSection", |
| | doc="Set height of the box beam elements", |
| | value=0.0, |
| | ) |
| | ) |
| | prop.append( |
| | _PropHelper( |
| | type="App::PropertyLength", |
| | name="BoxT1", |
| | group="BoxBeamSection", |
| | doc="Set thickness parameter t1 of the box beam elements", |
| | value=0.0, |
| | ) |
| | ) |
| | prop.append( |
| | _PropHelper( |
| | type="App::PropertyLength", |
| | name="BoxT2", |
| | group="BoxBeamSection", |
| | doc="Set thickness parameter t2 of the box beam elements", |
| | value=0.0, |
| | ) |
| | ) |
| | prop.append( |
| | _PropHelper( |
| | type="App::PropertyLength", |
| | name="BoxT3", |
| | group="BoxBeamSection", |
| | doc="Set thickness parameter t3 of the box beam elements", |
| | value=0.0, |
| | ) |
| | ) |
| | prop.append( |
| | _PropHelper( |
| | type="App::PropertyLength", |
| | name="BoxT4", |
| | group="BoxBeamSection", |
| | doc="Set thickness parameter t4 of the box beam elements", |
| | value=0.0, |
| | ) |
| | ) |
| | prop.append( |
| | _PropHelper( |
| | type="App::PropertyEnumeration", |
| | name="SectionType", |
| | group="BeamSection", |
| | doc="Select beam section type", |
| | value=["Rectangular", "Circular", "Pipe", "Elliptical", "Box"], |
| | ) |
| | ) |
| | prop.append( |
| | _PropHelper( |
| | type="App::PropertyArea", |
| | name="TrussArea", |
| | group="TrussSection", |
| | doc="Set cross-sectional area of truss elements\n" |
| | + "(used if bending stiffness is excluded in the solver)", |
| | value=10.0, |
| | ) |
| | ) |
| | return prop |
| |
|
| | def onDocumentRestored(self, obj): |
| | |
| | super().onDocumentRestored(obj) |
| |
|
| | for prop in self._get_properties(): |
| | try: |
| | obj.getPropertyByName(prop.name) |
| | except Base.PropertyError: |
| | prop.add_to_object(obj) |
| |
|
| | if prop.name == "SectionType": |
| | |
| | obj.SectionType = prop.value |
| |
|