Back to index

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

List of all members.

Public Member Functions

def __init__
def __repr__
def addOrientation
def build

Public Attributes

 HY1
 HZ1
 HY2
 HZ2
 EPY1
 EPZ1
 EPY2
 EPZ2
 filling
 groupName
 name
 geom
 baseShapesSet
 isMainShape
 color

Static Public Attributes

string DEFAULT_NAME = "Beam"

Private Member Functions

def _makeRectangle
def _makeSectionRectangles
def _makeSectionWires

Detailed Description

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

* "HY1", "HY", "H1" or "H": width at the first end of the beam.
* "HZ1", "HZ", "H1" or "H": height at the first end of the beam.
* "HY2", "HY", "H2" or "H": width at the other end of the beam.
* "HZ2", "HZ", "H2" or "H": height at the other end of the beam.
* "EPY1", "EPY", "EP1" or "EP" (optional): thickness in the width
  direction at the first end of the beam. If not specified or equal to 0,
  the beam is considered full.
* "EPZ1", "EPZ", "EP1" or "EP" (optional): thickness in the height
  direction at the first end of the beam. If not specified or equal to 0,
  the beam is considered full.
* "EPY2", "EPY", "EP2" or "EP" (optional): thickness in the width
  direction at the other end of the beam. If not specified or equal to 0,
  the beam is considered full.
* "EPZ2", "EPZ", "EP2" or "EP" (optional): thickness in the height
  direction 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 449 of file parts.py.


Constructor & Destructor Documentation

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

Reimplemented from GEOM_PY.structelem.parts.Beam.

Reimplemented in GEOM_PY.structelem.parts.GeneralBeam.

Definition at line 478 of file parts.py.

00478 
00479                  name = Beam.DEFAULT_NAME, color = None):
00480         if color is None:
00481             if parameters.has_key("HY1") or parameters.has_key("H1"):
00482                 color = LIGHT_BLUE # variable section
00483             else:                  # constant section
00484                 color = BLUE
00485 
00486         Beam.__init__(self, studyId, groupName, groupGeomObj, parameters,
00487                       name, color)
00488 
00489         self.HY1 = self._getParameter(["HY1", "HY", "H1", "H"])
00490         self.HZ1 = self._getParameter(["HZ1", "HZ", "H1", "H"])
00491         self.HY2 = self._getParameter(["HY2", "HY", "H2", "H"])
00492         self.HZ2 = self._getParameter(["HZ2", "HZ", "H2", "H"])
00493         self.EPY1 = self._getParameter(["EPY1", "EPY", "EP1", "EP"])
00494         self.EPZ1 = self._getParameter(["EPZ1", "EPZ", "EP1", "EP"])
00495         self.EPY2 = self._getParameter(["EPY2", "EPY", "EP2", "EP"])
00496         self.EPZ2 = self._getParameter(["EPZ2", "EPZ", "EP2", "EP"])
00497 
00498         if self.EPY1 is None or self.EPZ1 is None or \
00499            self.EPY2 is None or self.EPZ2 is None or \
00500            self.EPY1 == 0 or self.EPZ1 == 0 or \
00501            self.EPY2 == 0 or self.EPZ2 == 0:
00502             self.filling = FULL
00503         else:
00504             self.filling = HOLLOW
00505 
00506         logger.debug(repr(self))
00507 
00508         # Check parameters
00509         self._checkSize(self.HY1, MIN_DIM_FOR_EXTRUDED_SHAPE,
00510                         self._getParamUserName("HY1"))
00511         self._checkSize(self.HZ1, MIN_DIM_FOR_EXTRUDED_SHAPE,
00512                         self._getParamUserName("HZ1"))
00513         self._checkSize(self.HY2, MIN_DIM_FOR_EXTRUDED_SHAPE,
00514                         self._getParamUserName("HY2"))
00515         self._checkSize(self.HZ2, MIN_DIM_FOR_EXTRUDED_SHAPE,
00516                         self._getParamUserName("HZ2"))
00517         if self.filling == HOLLOW:
00518             self._checkSize(self.EPY1, MIN_THICKNESS,
00519                             self._getParamUserName("EPY1"))
00520             self._checkSize(self.EPZ1, MIN_THICKNESS,
00521                             self._getParamUserName("EPZ1"))
00522             self._checkSize(self.EPY2, MIN_THICKNESS,
00523                             self._getParamUserName("EPY2"))
00524             self._checkSize(self.EPZ2, MIN_THICKNESS,
00525                             self._getParamUserName("EPZ2"))
00526             self._checkSize(self.HY1 - 2 * self.EPY1,
00527                             MIN_DIM_FOR_EXTRUDED_SHAPE,
00528                             "%s - 2 * %s" % (self._getParamUserName("HY1"),
00529                                              self._getParamUserName("EPY1")))
00530             self._checkSize(self.HZ1 - 2 * self.EPZ1,
00531                             MIN_DIM_FOR_EXTRUDED_SHAPE,
00532                             "%s - 2 * %s" % (self._getParamUserName("HZ1"),
00533                                              self._getParamUserName("EPZ1")))
00534             self._checkSize(self.HY2 - 2 * self.EPY2,
00535                             MIN_DIM_FOR_EXTRUDED_SHAPE,
00536                             "%s - 2 * %s" % (self._getParamUserName("HY2"),
00537                                              self._getParamUserName("EPY2")))
00538             self._checkSize(self.HZ2 - 2 * self.EPZ2,
00539                             MIN_DIM_FOR_EXTRUDED_SHAPE,
00540                             "%s - 2 * %s" % (self._getParamUserName("HZ2"),
00541                                              self._getParamUserName("EPZ2")))


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.RectangularBeam._makeRectangle (   self,
  HY,
  HZ,
  lcs 
) [private]
Create a rectangle in the specified plane.

Definition at line 542 of file parts.py.

00542 
00543     def _makeRectangle(self, HY, HZ, lcs):
00544         """
00545         Create a rectangle in the specified plane.
00546         """
00547         halfHY = HY / 2.0
00548         halfHZ = HZ / 2.0
00549         sketchStr = "Sketcher:F %g %g:" % (-halfHY, -halfHZ)
00550         sketchStr += "TT %g %g:" % (halfHY, -halfHZ)
00551         sketchStr += "TT %g %g:" % (halfHY, halfHZ)
00552         sketchStr += "TT %g %g:WW" % (-halfHY, halfHZ)
00553         logger.debug('Drawing rectangle: "%s"' % sketchStr)
00554         sketch = self.geom.MakeSketcherOnPlane(sketchStr, lcs)
00555         return sketch

Here is the caller graph for this function:

def GEOM_PY.structelem.parts.RectangularBeam._makeSectionRectangles (   self,
  point,
  vecX,
  HY,
  HZ,
  EPY,
  EPZ 
) [private]
Create one side of the rectangular sections used to build the pipe.

Definition at line 556 of file parts.py.

00556 
00557     def _makeSectionRectangles(self, point, vecX, HY, HZ, EPY, EPZ):
00558         """
00559         Create one side of the rectangular sections used to build the pipe.
00560         """
00561         (vecY, vecZ) = self._orientation.getVecYZ(self.geom, point, vecX)
00562         lcs = self.geom.MakeMarkerPntTwoVec(point, vecY, vecZ)
00563         outerRect = self._makeRectangle(HY, HZ, lcs)
00564         if self.filling == HOLLOW:
00565             innerRect = self._makeRectangle(HY - 2.0 * EPY,
00566                                             HZ - 2.0 * EPZ,
00567                                             lcs)
00568         else:
00569             innerRect = None
00570         return (outerRect, innerRect)

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 571 of file parts.py.

00571 
00572     def _makeSectionWires(self, fPoint, fNormal, lPoint, lNormal):
00573         """
00574         Create the rectangular sections used to build the pipe.
00575         """
00576         (outerRect1, innerRect1) = \
00577             self._makeSectionRectangles(fPoint, fNormal, self.HY1, self.HZ1,
00578                                         self.EPY1, self.EPZ1)
00579         (outerRect2, innerRect2) = \
00580             self._makeSectionRectangles(lPoint, lNormal, self.HY2, self.HZ2,
00581                                         self.EPY2, self.EPZ2)
00582         return (outerRect1, innerRect1, outerRect2, innerRect2)
00583 

Here is the call graph for this function:

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 492 of file parts.py.

Definition at line 494 of file parts.py.

Definition at line 493 of file parts.py.

Definition at line 495 of file parts.py.

Reimplemented from GEOM_PY.structelem.parts.Beam.

Definition at line 501 of file parts.py.

Definition at line 138 of file parts.py.

Definition at line 133 of file parts.py.

Definition at line 488 of file parts.py.

Definition at line 490 of file parts.py.

Definition at line 489 of file parts.py.

Definition at line 491 of file parts.py.

Definition at line 140 of file parts.py.

Definition at line 137 of file parts.py.


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