//=======================================================================
BRepMesh_IncrementalMesh::BRepMesh_IncrementalMesh(
const TopoDS_Shape& theShape,
- const Standard_Real theDeflection,
- const Standard_Real theAngle,
- const Standard_Boolean theRelative,
- const Standard_Boolean theInParallel)
-: myRelative (theRelative),
- myInParallel(theInParallel)
+ const Standard_Real theLinDeflection,
+ const Standard_Boolean isRelative,
+ const Standard_Real theAngDeflection,
+ const Standard_Boolean isInParallel)
+ : myRelative (isRelative),
+ myInParallel(isInParallel)
{
- myDeflection = theDeflection;
- myAngle = theAngle;
+ myDeflection = theLinDeflection;
+ myAngle = theAngDeflection;
myShape = theShape;
Perform();
//! Automatically calls method Perform.
//! \param theShape shape to be meshed.
//! \param theLinDeflection linear deflection.
- //! \param theAngDeflection angular deflection.
- //! \paarm isRelative if TRUE deflection used for discretization of
+ //! \param isRelative if TRUE deflection used for discretization of
//! each edge will be <theLinDeflection> * <size of edge>. Deflection
//! used for the faces will be the maximum deflection of their edges.
+ //! \param theAngDeflection angular deflection.
//! \param isInParallel if TRUE shape will be meshed in parallel.
Standard_EXPORT BRepMesh_IncrementalMesh(
const TopoDS_Shape& theShape,
const Standard_Real theLinDeflection,
- const Standard_Real theAngDeflection = 0.5,
const Standard_Boolean isRelative = Standard_False,
+ const Standard_Real theAngDeflection = 0.5,
const Standard_Boolean isInParallel = Standard_False);
//! Performs meshing ot the shape.
if (!strcmp(dout.GetType(id),"PERS")) focal = dout.Focal(id);
Standard_Real Ang,Def;
HLRBRep::PolyHLRAngleAndDeflection(myAng,Ang,Def);
- BRepMesh_IncrementalMesh MESH(myShape, Def, Ang, Standard_True);
+ BRepMesh_IncrementalMesh MESH(myShape, Def, Standard_True, Ang);
Standard_Boolean recompute = Standard_True;
// find if the view must be recomputed
DBRep_ListIteratorOfListOfHideData it(myHidData);
di << "Incremental Mesh, multi-threading "
<< (isInParallel ? "ON\n" : "OFF\n");
- BRepMesh_IncrementalMesh MESH(aShape, aDeflection, 0.5, Standard_False, isInParallel);
+ BRepMesh_IncrementalMesh MESH(aShape, aDeflection, Standard_False, 0.5, isInParallel);
Standard_Integer statusFlags = MESH.GetStatusFlags();
di << "Meshing statuses: ";
if(aShape.IsNull()) {di << "OCC369 FAULTY. Entry shape is NULL \n"; return 0;}
// 3. Build mesh
- BRepMesh_IncrementalMesh aMesh(aShape, 0.2, M_PI/6, Standard_True);
+ BRepMesh_IncrementalMesh aMesh(aShape, 0.2, Standard_True, M_PI / 6);
}
catch (Standard_Failure) {di << "OCC369 Exception \n" ;return 0;}
}
di<<"deflection="<< aDeflection << "\n";
- BRepMesh_IncrementalMesh aIMesh(aShape, aDeflection, M_PI/9., Standard_False);
+ BRepMesh_IncrementalMesh aIMesh(aShape, aDeflection, Standard_False, M_PI / 9.);
TopLoc_Location aLocation;
Handle(Poly_Triangulation) aTriang = BRep_Tool::Triangulation(TopoDS::Face(aShape), aLocation);
const Standard_Boolean rel = aDrawer->TypeOfDeflection() == Aspect_TOD_RELATIVE;
Standard_Real def = rel? aDrawer->HLRDeviationCoefficient() : aDrawer->MaximalChordialDeviation();
- BRepMesh_IncrementalMesh mesh(aShape, def, aDrawer->HLRAngle(), rel);
+ BRepMesh_IncrementalMesh mesh(aShape, def, rel, aDrawer->HLRAngle());
Handle(HLRBRep_PolyAlgo) hider = new HLRBRep_PolyAlgo(aShape);
if( isAutoTriangulation && !BRepTools::Triangulation (theShape, Precision::Infinite()) )
{
- BRepMesh_IncrementalMesh aMesher(theShape, theDeflection, theDeviationAngle, Standard_False);
+ BRepMesh_IncrementalMesh aMesher(theShape, theDeflection, Standard_False, theDeviationAngle);
}
Handle(StdSelect_BRepOwner) aBrepOwner;
Standard_ConstructionError::Raise ("StlTransfer::BuildIncrementalMesh");
}
- BRepMesh_IncrementalMesh aMesher(Shape, Deflection, 0.5, Standard_False, InParallel);
+ BRepMesh_IncrementalMesh aMesher(Shape, Deflection, Standard_False, 0.5, InParallel);
for (TopExp_Explorer itf(Shape,TopAbs_FACE); itf.More(); itf.Next()) {
TopoDS_Face face = TopoDS::Face(itf.Current());
TopLoc_Location Loc, loc;
isTessellate = Standard_True;
if (isTessellate) {
// Triangulate the face by the standard OCC mesher
- BRepMesh_IncrementalMesh IM (aFace, aDeflection, theDeflAngle, Standard_False);
+ BRepMesh_IncrementalMesh IM(aFace, aDeflection, Standard_False, theDeflAngle);
aTri = BRep_Tool::Triangulation (aFace, aLoc);
}
if (aTri.IsNull() == Standard_False) {