Version: 6.3.1
Functions

Segments around Vertex

Defining Algorithms
Collaboration diagram for Segments around Vertex:

Functions

def smeshDC::Mesh_Segment.LengthNearVertex
 Defines "SegmentLengthAroundVertex" hypothesis.
def smeshDC::Mesh_Segment.CompareLengthNearVertex
 Checks if the given "LengthNearVertex" hypothesis has the same parameters as the given arguments.

Function Documentation

def smeshDC.Mesh_Segment.CompareLengthNearVertex (   self,
  hyp,
  args 
) [inherited]

Checks if the given "LengthNearVertex" hypothesis has the same parameters as the given arguments.

Definition at line 4791 of file smeshDC.py.

04792                                                 :
04793         return IsEqual(hyp.GetLength(), args[0])

def smeshDC.Mesh_Segment.LengthNearVertex (   self,
  length,
  vertex = 0,
  UseExisting = 0 
) [inherited]

Defines "SegmentLengthAroundVertex" hypothesis.

Parameters:
lengthfor the segment length
vertexfor the length localization: the vertex index [0,1] | vertex object. Any other integer value means that the hypothesis will be set on the whole 1D shape, where Mesh_Segment algorithm is assigned.
UseExistingif ==true - searches for an existing hypothesis created with the same parameters, else (default) - creates a new one

Definition at line 4758 of file smeshDC.py.

04759                                                                :
04760         import types
04761         store_geom = self.geom
04762         if type(vertex) is types.IntType:
04763             if vertex == 0 or vertex == 1:
04764                 vertex = self.mesh.geompyD.ExtractShapes(self.geom, geompyDC.ShapeType["VERTEX"],True)[vertex]
04765                 self.geom = vertex
04766                 pass
04767             pass
04768         else:
04769             self.geom = vertex
04770             pass
04771         ### 0D algorithm
04772         if self.geom is None:
04773             raise RuntimeError, "Attemp to create SegmentAroundVertex_0D algoritm on None shape"
04774         AssureGeomPublished( self.mesh, self.geom )
04775         name = GetName(self.geom)
04776 
04777         algo = self.FindAlgorithm("SegmentAroundVertex_0D", self.mesh.smeshpyD)
04778         if algo is None:
04779             algo = self.mesh.smeshpyD.CreateHypothesis("SegmentAroundVertex_0D", "libStdMeshersEngine.so")
04780             pass
04781         status = self.mesh.mesh.AddHypothesis(self.geom, algo)
04782         TreatHypoStatus(status, "SegmentAroundVertex_0D", name, True)
04783         ###
04784         hyp = self.Hypothesis("SegmentLengthAroundVertex", [length], UseExisting=UseExisting,
04785                               CompareMethod=self.CompareLengthNearVertex)
04786         self.geom = store_geom
04787         hyp.SetLength( length )
04788         return hyp

Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS