Back to index

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

List of all members.

Public Member Functions

def __init__
def __repr__
def addOrientation
def build

Public Attributes

 thickness
 offset
 groupName
 name
 geom
 baseShapesSet
 isMainShape
 color

Static Public Attributes

string DEFAULT_NAME = "ThickShell"

Private Member Functions

def _buildPart
def _buildThickShellForFace
def _removeCylinderExtraEdge
def _buildMarkers

Detailed Description

This class defines a shell with a given thickness. It can be shifted from
the base face. The valid parameters for thick shells are:

* "Epais": thickness of the shell.
* "Excentre": offset of the shell from the base face.
* "angleAlpha": angle used to build the markers (see class
  :class:`~salome.geom.structelem.orientation.Orientation2D`)
* "angleBeta": angle used to build the markers (see class
  :class:`~salome.geom.structelem.orientation.Orientation2D`)
* "Vecteur": vector used instead of the angles to build the markers (see
  class :class:`~salome.geom.structelem.orientation.Orientation2D`)

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

Definition at line 695 of file parts.py.


Constructor & Destructor Documentation

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

Reimplemented from GEOM_PY.structelem.parts.StructuralElementPart2D.

Definition at line 716 of file parts.py.

00716 
00717                  name = DEFAULT_NAME):
00718         StructuralElementPart2D.__init__(self, studyId, groupName,
00719                                          groupGeomObj, parameters, name)
00720         self.thickness = self._getParameter(["Epais"])
00721         logger.debug(repr(self))


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 defining the orientation of the thick shell.

Reimplemented from GEOM_PY.structelem.parts.StructuralElementPart.

Definition at line 790 of file parts.py.

00790 
00791     def _buildMarkers(self):
00792         """
00793         Build the markers defining the orientation of the thick shell.
00794         """
00795         return self._buildMarkersWithOffset(self.offset +
00796                                             self.thickness / 2.0)
00797 

Here is the call graph for this function:

Create the geometrical shapes corresponding to the thick shell.

Reimplemented from GEOM_PY.structelem.parts.StructuralElementPart.

Definition at line 722 of file parts.py.

00722 
00723     def _buildPart(self):
00724         """
00725         Create the geometrical shapes corresponding to the thick shell.
00726         """
00727         subShapes = self._getSubShapes()
00728         listSolids = []
00729     
00730         for subShape in subShapes:
00731             faces = self.geom.SubShapeAll(subShape,
00732                                           self.geom.ShapeType["FACE"])
00733             for face in faces:
00734                 shape = self._buildThickShellForFace(face)
00735                 listSolids.append(shape)
00736 
00737         if len(listSolids) == 0:
00738             return None
00739         elif len(listSolids) == 1:
00740             return listSolids[0]
00741         else:
00742             return self.geom.MakeCompound(listSolids)

Here is the call graph for this function:

Create the geometrical shapes corresponding to the thick shell for a
given face.

Definition at line 743 of file parts.py.

00743 
00744     def _buildThickShellForFace(self, face):
00745         """
00746         Create the geometrical shapes corresponding to the thick shell for a
00747         given face.
00748         """
00749         epsilon = 1e-6
00750         if self.thickness < 2 * epsilon:
00751             return self._makeFaceOffset(face, self.offset, epsilon)
00752 
00753         upperOffset = self.offset + self.thickness / 2.0
00754         lowerOffset = self.offset - self.thickness / 2.0
00755         ruledMode = True
00756         modeSolid = False
00757 
00758         upperFace = self._makeFaceOffset(face, upperOffset, epsilon)
00759         lowerFace = self._makeFaceOffset(face, lowerOffset, epsilon)
00760         listShapes = [upperFace, lowerFace]
00761         upperWires = self.geom.SubShapeAll(upperFace,
00762                                            self.geom.ShapeType["WIRE"])
00763         lowerWires = self.geom.SubShapeAll(lowerFace,
00764                                            self.geom.ShapeType["WIRE"])
00765         if self.geom.KindOfShape(face)[0] == self.geom.kind.CYLINDER2D:
00766             # if the face is a cylinder, we remove the extra side edge
00767             upperWires = self._removeCylinderExtraEdge(upperWires)
00768             lowerWires = self._removeCylinderExtraEdge(lowerWires)
00769         for i in range(len(upperWires)):
00770             resShape = self.geom.MakeThruSections([upperWires[i],
00771                                                    lowerWires[i]],
00772                                                   modeSolid, epsilon,
00773                                                   ruledMode)
00774             listShapes.append(resShape)
00775         resultShell = self.geom.MakeShell(listShapes)
00776         resultSolid = self.geom.MakeSolid([resultShell])
00777         return resultSolid

Here is the call graph for this function:

Here is the caller graph for this function:

def GEOM_PY.structelem.parts.ThickShell._removeCylinderExtraEdge (   self,
  wires 
) [private]
Remove the side edge in a cylinder.

Definition at line 778 of file parts.py.

00778 
00779     def _removeCylinderExtraEdge(self, wires):
00780         """
00781         Remove the side edge in a cylinder.
00782         """
00783         result = []
00784         for wire in wires:
00785             edges = self.geom.SubShapeAll(wire, self.geom.ShapeType["EDGE"])
00786             for edge in edges:
00787                 if self.geom.KindOfShape(edge)[0] == self.geom.kind.CIRCLE:
00788                     result.append(edge)
00789         return result

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.ThickShell.DEFAULT_NAME = "ThickShell" [static]

Reimplemented from GEOM_PY.structelem.parts.StructuralElementPart2D.

Definition at line 713 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 650 of file parts.py.

Definition at line 719 of file parts.py.


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