Back to index

salome-geom  6.5.0
Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions
GEOM_PY.structelem.parts.CircularBeam Class Reference
Inheritance diagram for GEOM_PY.structelem.parts.CircularBeam:
Inheritance graph
[legend]
Collaboration diagram for GEOM_PY.structelem.parts.CircularBeam:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def __repr__
def addOrientation
def build

Public Attributes

 R1
 R2
 EP1
 EP2
 filling
 groupName
 name
 geom
 baseShapesSet
 isMainShape
 color

Static Public Attributes

string DEFAULT_NAME = "Beam"

Private Member Functions

def _makeSectionWires

Detailed Description

This class defines a beam with a circular section. It can be full or
hollow, and its radius and thickness can vary from one end of the beam to
the other. The valid parameters for circular beams are:

* "R1" or "R": radius at the first end of the beam.
* "R2" or "R": radius at the other end of the beam.
* "EP1" or "EP" (optional): thickness at the first end of the beam.
  If not specified or equal to 0, the beam is considered full.
* "EP2" or "EP" (optional): thickness at the other end of the beam.
  If not specified or equal to 0, the beam is considered full.

See class :class:`StructuralElementPart` for the description of the
other parameters.

Definition at line 370 of file parts.py.


Constructor & Destructor Documentation

def GEOM_PY.structelem.parts.CircularBeam.__init__ (   self,
  studyId,
  groupName,
  groupGeomObj,
  parameters,
  name = Beam.DEFAULT_NAME,
  color = None 
)

Reimplemented from GEOM_PY.structelem.parts.Beam.

Definition at line 389 of file parts.py.

00389 
00390                  name = Beam.DEFAULT_NAME, color = None):
00391         if color is None:
00392             if parameters.has_key("R1"): # variable section
00393                 color = LIGHT_RED
00394             else:                       # constant section
00395                 color = RED
00396 
00397         Beam.__init__(self, studyId, groupName, groupGeomObj, parameters,
00398                       name, color)
00399 
00400         self.R1 = self._getParameter(["R1", "R"])
00401         self.R2 = self._getParameter(["R2", "R"])
00402         self.EP1 = self._getParameter(["EP1", "EP"])
00403         self.EP2 = self._getParameter(["EP2", "EP"])
00404 
00405         if self.EP1 is None or self.EP2 is None or \
00406                                 self.EP1 == 0 or self.EP2 == 0:
00407             self.filling = FULL
00408         else:
00409             self.filling = HOLLOW
00410 
00411         logger.debug(repr(self))
00412 
00413         # Check parameters
00414         self._checkSize(self.R1, MIN_DIM_FOR_EXTRUDED_SHAPE / 2.0,
00415                         self._getParamUserName("R1"))
00416         self._checkSize(self.R2, MIN_DIM_FOR_EXTRUDED_SHAPE / 2.0,
00417                         self._getParamUserName("R2"))
00418         if self.filling == HOLLOW:
00419             self._checkSize(self.EP1, MIN_THICKNESS,
00420                             self._getParamUserName("EP1"))
00421             self._checkSize(self.EP2, MIN_THICKNESS,
00422                             self._getParamUserName("EP2"))
00423             self._checkSize(self.R1 - self.EP1,
00424                             MIN_DIM_FOR_EXTRUDED_SHAPE / 2.0,
00425                             "%s - %s" % (self._getParamUserName("R1"),
00426                                          self._getParamUserName("EP1")))
00427             self._checkSize(self.R2 - self.EP2,
00428                             MIN_DIM_FOR_EXTRUDED_SHAPE / 2.0,
00429                             "%s - %s" % (self._getParamUserName("R2"),
00430                                          self._getParamUserName("EP2")))


Member Function Documentation

Definition at line 174 of file parts.py.

00174 
00175     def __repr__(self):
00176         reprdict = self.__dict__.copy()
00177         del reprdict["_parameters"]
00178         del reprdict["groupName"]
00179         del reprdict["_groupGeomObj"]
00180         del reprdict["_paramUserName"]
00181         del reprdict["name"]
00182         del reprdict["geom"]
00183         del reprdict["baseShapesSet"]
00184         return '%s("%s", %s)' % (self.__class__.__name__, self.groupName,
00185                                  reprdict)

def GEOM_PY.structelem.parts.CircularBeam._makeSectionWires (   self,
  fPoint,
  fNormal,
  lPoint,
  lNormal 
) [private]
Create the circular sections used to build the pipe.

Definition at line 431 of file parts.py.

00431 
00432     def _makeSectionWires(self, fPoint, fNormal, lPoint, lNormal):
00433         """
00434         Create the circular sections used to build the pipe.
00435         """
00436         outerCircle1 = self.geom.MakeCircle(fPoint, fNormal, self.R1)
00437         outerCircle2 = self.geom.MakeCircle(lPoint, lNormal, self.R2)
00438         if self.filling == HOLLOW:
00439             innerCircle1 = self.geom.MakeCircle(fPoint, fNormal,
00440                                                 self.R1 - self.EP1)
00441             innerCircle2 = self.geom.MakeCircle(lPoint, lNormal,
00442                                                 self.R2 - self.EP2)
00443         else:
00444             innerCircle1 = None
00445             innerCircle2 = None
00446 
00447         return (outerCircle1, innerCircle1, outerCircle2, innerCircle2)
00448 

Here is the caller graph for this function:

def GEOM_PY.structelem.parts.StructuralElementPart.addOrientation (   self,
  orientParams 
) [inherited]
Add orientation information to the structural element part. See class
:class:`~salome.geom.structelem.orientation.Orientation1D` for the description
of the parameters.

Definition at line 186 of file parts.py.

00186 
00187     def addOrientation(self, orientParams):
00188         """
00189         Add orientation information to the structural element part. See class
00190         :class:`~salome.geom.structelem.orientation.Orientation1D` for the description
00191         of the parameters.
00192         """
00193         self._orientation.addParams(orientParams)

Build the geometric shapes and the markers corresponding to the
structural element part in the study `studyId`.

Definition at line 203 of file parts.py.

00203 
00204     def build(self):
00205         """
00206         Build the geometric shapes and the markers corresponding to the
00207         structural element part in the study `studyId`.
00208         """
00209         shape = self._buildPart()
00210         markers = self._buildMarkers()
00211         shape.SetColor(self.color)
00212         for marker in markers:
00213             marker.SetColor(self.color)
00214         return (shape, markers)

Here is the call graph for this function:


Member Data Documentation

Definition at line 139 of file parts.py.

Definition at line 147 of file parts.py.

string GEOM_PY.structelem.parts.Beam.DEFAULT_NAME = "Beam" [static, inherited]

Reimplemented from GEOM_PY.structelem.parts.StructuralElementPart.

Definition at line 263 of file parts.py.

Definition at line 401 of file parts.py.

Definition at line 402 of file parts.py.

Reimplemented from GEOM_PY.structelem.parts.Beam.

Definition at line 406 of file parts.py.

Definition at line 138 of file parts.py.

Definition at line 133 of file parts.py.

Definition at line 140 of file parts.py.

Definition at line 137 of file parts.py.

Definition at line 399 of file parts.py.

Definition at line 400 of file parts.py.


The documentation for this class was generated from the following file: