std::swap( itNN[0], itNN[1] );
std::swap( prevNod[0], prevNod[1] );
std::swap( nextNod[0], nextNod[1] );
+ isSingleNode.swap( isSingleNode[0], isSingleNode[1] );
if ( nbSame > 0 )
sames[0] = 1 - sames[0];
iNotSameNode = 1 - iNotSameNode;
SALOMEDS::SObject_wrap aSO =
_gen_i->PublishGroup( study, mesh, groups[ iG ],
GEOM::GEOM_Object::_nil(), theGroupName);
- aSO->_is_nil(); // avoid "unused variable" warning
}
SMESH_GroupBase_i* grp_i = SMESH::DownCast< SMESH_GroupBase_i* >( groups[ iG ]);
if ( !grp_i ) continue;
reversedEdges, UseExisting = [], reversedEdges
entry = self.MainShapeEntry()
reversedEdgeInd = self.ReversedEdgeIndices(reversedEdges)
- if s == []:
+ if not s:
hyp = self.Hypothesis("NumberOfSegments", [n, reversedEdgeInd, entry],
UseExisting=UseExisting,
CompareMethod=self._compareNumberOfSegments)
hyp = self.Hypothesis("NumberOfSegments", [n,s, reversedEdgeInd, entry],
UseExisting=UseExisting,
CompareMethod=self._compareNumberOfSegments)
- hyp.SetDistrType( 1 )
hyp.SetScaleFactor(s)
hyp.SetNumberOfSegments(n)
hyp.SetReversedEdges( reversedEdgeInd )
if self.algoType != "RadialPrism_3D":
print "Prism_3D algorith doesn't support any hyposesis"
return None
- if s == []:
+ if not s:
hyp = self.OwnHypothesis("NumberOfSegments", [n])
else:
hyp = self.OwnHypothesis("NumberOfSegments", [n,s])
- hyp.SetDistrType( 1 )
hyp.SetScaleFactor(s)
hyp.SetNumberOfSegments(n)
return hyp
//throw SALOME_Exception(LOCALIZED("not a scale distribution"));
if (scaleFactor < PRECISION)
throw SALOME_Exception(LOCALIZED("scale factor must be positive"));
- //if (fabs(scaleFactor - 1.0) < PRECISION)
- // throw SALOME_Exception(LOCALIZED("scale factor must not be equal to 1"));
+ if (fabs(scaleFactor - 1.0) < PRECISION)
+ _distrType = DT_Regular;
if (fabs(_scaleFactor - scaleFactor) > PRECISION)
{
}
else // !useGeometry - get _normal using surrounding mesh faces
{
+ set<TGeomID> faceIds;
SMDS_ElemIteratorPtr fIt = node->GetInverseElementIterator(SMDSAbs_Face);
while ( fIt->more() )
const SMDS_MeshElement* face = fIt->next();
if ( eos.GetNormal( face, geomNorm ))
{
+ if ( onShrinkShape && !faceIds.insert( face->getshapeId() ).second )
+ continue; // use only one mesh face on FACE
edge._normal += geomNorm.XYZ();
totalNbFaces++;
}