:SMESH_1D_Algo(hypId, studyId, gen)
{
_name = "Projection_1D";
- _shapeType = (1 << TopAbs_EDGE); // 1 bit per shape type
+ _shapeType = (1 << TopAbs_EDGE); // 1 bit per shape type
_compatibleHypothesis.push_back("ProjectionSource1D");
_sourceHypo = 0;
//=======================================================================
bool StdMeshers_Projection_1D::Evaluate(SMESH_Mesh& theMesh,
- const TopoDS_Shape& theShape,
- MapShapeNbElems& aResMap)
+ const TopoDS_Shape& theShape,
+ MapShapeNbElems& aResMap)
{
if ( !_sourceHypo )
return false;
if ( !srcMesh )
srcMesh = tgtMesh;
- SMESHDS_Mesh * meshDS = theMesh.GetMeshDS();
+ //SMESHDS_Mesh * meshDS = theMesh.GetMeshDS();
// ---------------------------
// Make subshapes association
// Find out nodes distribution on the source edge
// -----------------------------------------------
- double srcLength = EdgeLength( srcEdge );
- double tgtLength = EdgeLength( tgtEdge );
+ //double srcLength = EdgeLength( srcEdge );
+ //double tgtLength = EdgeLength( tgtEdge );
vector< double > params; // sorted parameters of nodes on the source edge
if ( !SMESH_Algo::GetNodeParamOnEdge( srcMesh->GetMeshDS(), srcEdge, params ))
int nbNodes = params.size();
- std::vector<int> aVec(17);
- for(int i=0; i<17; i++) aVec[i] = 0;
+ std::vector<int> aVec(SMDSEntity_Last);
+ for(int i=SMDSEntity_Node; i<SMDSEntity_Last; i++) aVec[i] = 0;
- aVec[0] = nbNodes;
+ aVec[SMDSEntity_Node] = nbNodes;
bool quadratic = false;
SMDS_ElemIteratorPtr elemIt = srcSubMesh->GetSubMeshDS()->GetElements();
if ( elemIt->more() )
quadratic = elemIt->next()->IsQuadratic();
if(quadratic)
- aVec[2] = (nbNodes-1)/2;
+ aVec[SMDSEntity_Quad_Edge] = (nbNodes-1)/2;
else
- aVec[1] = nbNodes - 1;
+ aVec[SMDSEntity_Edge] = nbNodes - 1;
SMESH_subMesh * sm = theMesh.GetSubMesh(theShape);
aResMap.insert(std::make_pair(sm,aVec));