# get max value of Aspect Ratio of faces in triaGroup
grAspects = mesh.GetMinMax( SMESH.FT_AspectRatio, triaGroup )
print "GROUP: Max aspect = %s" % grAspects[1]
+
+# get Aspect Ratio of an element
+aspect = mesh.FunctorValue( SMESH.FT_AspectRatio, ids[0] )
+print "Aspect ratio of the face %s = %s" % ( ids[0], aspect )
print "is empty", aGroup.IsEmpty()
# check of presence of an entity in the group
-aGroup.Add([1,2]) # method specific to the standalone group
+aGroup.Add([1,2]) # Add() method is specific to the standalone group
print "contains node 2", aGroup.Contains(2)
# get an entity by index
}
else {
SMDS_ElemIteratorPtr aNodesIter = anElem->nodesIterator();
- long aNodeId[2];
+ long aNodeId[2] = {0,0};
gp_Pnt P[3];
double aLength;
const TopoDS_Vertex v = TopoDS::Vertex( vExp.Current() );
gp_Pnt2d uv = BRep_Tool::Parameters( v, face );
double minDist = DBL_MAX;
- int index;
+ int index = 0;
vector< TPoint >::const_iterator pVecIt = myPoints.begin();
for ( iPoint = 0; pVecIt != myPoints.end(); pVecIt++, iPoint++ ) {
double dist = uv.SquareDistance( (*pVecIt).myInitUV );
}
else
{
- HypothesisData* anCurrentAlgo;
+ HypothesisData* anCurrentAlgo = 0;
bool isReqDisBound = true;
QString anCurrentCompareType = anCompareType;
isNone = currentHyp( aDim, Algo ) < 0;
// set XYZ on horizontal edges and get node columns of faces:
// 2 columns for each face, between which a base node is located
vector<const SMDS_MeshNode*>* nColumns[8];
- double ratio[ NB_WALL_FACES ]; // base node position between columns [0.-1.]
+ double ratio[ NB_WALL_FACES ] = {0,0,0,0}; // base node position between columns [0.-1.]
if ( createNode ) {
for ( k = 0; k < NB_WALL_FACES ; ++k ) {
ratio[ k ] = SetHorizEdgeXYZ (aBNXYZ, wallFaceID[ k ],
UVPtStruct nullUVPtStruct;
nullUVPtStruct.node = 0;
- nullUVPtStruct.x = nullUVPtStruct.y = nullUVPtStruct.u = nullUVPtStruct.y = 0;
+ nullUVPtStruct.x = nullUVPtStruct.y = nullUVPtStruct.u = nullUVPtStruct.v = 0;
nullUVPtStruct.param = 0;
double _D; // _vec1.Crossed( _vec2 )
double _param1, _param2; // intersection param on _seg1 and _seg2
- _SegmentIntersection(): _param1(0), _param2(0), _D(0) {}
+ _SegmentIntersection(): _D(0), _param1(0), _param2(0) {}
bool Compute(const _Segment& seg1, const _Segment& seg2, bool seg2IsRay = false )
{