Back to index

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

List of all members.

Public Member Functions

def __init__
def __repr__
def addOrientation
def build

Public Attributes

 offset
 groupName
 name
 geom
 baseShapesSet
 isMainShape
 color

Static Public Attributes

string DEFAULT_NAME = "StructuralElementPart2D"

Private Member Functions

def _makeFaceOffset
def _buildMarkersWithOffset

Private Attributes

 _orientation

Detailed Description

This class is an "abstract" class for all 2D structural element parts. It
should not be instantiated directly. See class
:class:`StructuralElementPart` for the description of the parameters.

Definition at line 633 of file parts.py.


Constructor & Destructor Documentation

def GEOM_PY.structelem.parts.StructuralElementPart2D.__init__ (   self,
  studyId,
  groupName,
  groupGeomObj,
  parameters,
  name = DEFAULT_NAME 
)

Reimplemented in GEOM_PY.structelem.parts.Grid, and GEOM_PY.structelem.parts.ThickShell.

Definition at line 643 of file parts.py.

00643 
00644                  name = DEFAULT_NAME):
00645         StructuralElementPart.__init__(self, studyId, groupName, groupGeomObj,
00646                                        parameters, name)
00647         self._orientation = orientation.Orientation2D(
00648                                         self._getParameter(["angleAlpha"]),
00649                                         self._getParameter(["angleBeta"]),
00650                                         self._getParameter(["Vecteur"]))
00651         self.offset = self._getParameter(["Excentre"], 0.0)


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)

Build the markers for the structural element part with a given offset
from the base face.

Definition at line 666 of file parts.py.

00666 
00667     def _buildMarkersWithOffset(self, offset):
00668         """
00669         Build the markers for the structural element part with a given offset
00670         from the base face.
00671         """
00672         uParam = 0.5
00673         vParam = 0.5
00674         listMarkers = []
00675         subShapes = self._getSubShapes()
00676     
00677         for subShape in subShapes:
00678             faces = self.geom.SubShapeAll(subShape,
00679                                           self.geom.ShapeType["FACE"])
00680             for face in faces:
00681                 offsetFace = self._makeFaceOffset(face, offset)
00682                 # get tangent plane on surface by parameters
00683                 center = self.geom.MakeVertexOnSurface(offsetFace,
00684                                                        uParam, vParam)
00685                 tangPlane = self.geom.MakeTangentPlaneOnFace(offsetFace,
00686                                                              uParam, vParam,
00687                                                              1.0)
00688                 normal = self.geom.GetNormal(tangPlane)
00689                 marker = self._orientation.buildMarker(self.geom,
00690                                                        center, normal)
00691                 listMarkers.append(marker)
00692 
00693         return listMarkers
00694 

Here is the call graph for this function:

Here is the caller graph for this function:

def GEOM_PY.structelem.parts.StructuralElementPart2D._makeFaceOffset (   self,
  face,
  offset,
  epsilon = 1e-6 
) [private]
Create a copy of a face at a given offset.

Definition at line 652 of file parts.py.

00652 
00653     def _makeFaceOffset(self, face, offset, epsilon = 1e-6):
00654         """
00655         Create a copy of a face at a given offset.
00656         """
00657         if abs(offset) < epsilon:
00658             return self.geom.MakeCopy(face)
00659         else:
00660             offsetObj = self.geom.MakeOffset(face, offset)
00661             # We have to explode the resulting object into faces because it is
00662             # created as a polyhedron and not as a single face
00663             faces = self.geom.SubShapeAll(offsetObj,
00664                                           self.geom.ShapeType["FACE"])
00665             return faces[0]

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

Reimplemented from GEOM_PY.structelem.parts.StructuralElementPart.

Definition at line 646 of file parts.py.

Definition at line 139 of file parts.py.

Definition at line 147 of file parts.py.

string GEOM_PY.structelem.parts.StructuralElementPart2D.DEFAULT_NAME = "StructuralElementPart2D" [static]

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


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