mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0027383: Modeling - improve handling of regularity on edges
1. There has been implemented calculation of all possible types of continuity for shared edges: * G1 is set if tangential planes are the same for connected faces in each control points through the edge; * C1 is set in addition to G1 conditions if derivatives, orthogonal to the edge on each face, are equal vectors; * G2 is set in addition to G1 if the centers of principal curvatures are the same for connected faces in each control points through the edge; * C2 is set in addition to C1 and G2 if directions of principal curvatures are equal; * CN continuity is set only if both connected faces are based on elementary surfaces (the conditions for this case are similar to C2 continuity). 2. ShapeFix::EncodeRegularity() is merged into BRepLib::EncodeRegularity(). 3. Implemented several test cases to check correct handling of regularity. 4. Fix incorrect usage of BRepLib::EncodeRegularity() in BRepBuilderAPI_Sewing. 5. Implement a method for calculation of regularity on the given list of edges. 6. Documentation updates
This commit is contained in:
@@ -29,7 +29,6 @@
|
||||
|
||||
#include <Precision.hxx>
|
||||
|
||||
#include <Standard_ErrorHandler.hxx>
|
||||
#include <Standard_Failure.hxx>
|
||||
|
||||
#include <TopExp_Explorer.hxx>
|
||||
@@ -255,41 +254,10 @@ Standard_Boolean ShapeFix::SameParameter(const TopoDS_Shape& shape,
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
static void EncodeRegularity (const TopoDS_Shape& shape,
|
||||
const Standard_Real tolang,
|
||||
TopTools_MapOfShape &aMap)
|
||||
{
|
||||
TopoDS_Shape S = shape;
|
||||
TopLoc_Location L;
|
||||
S.Location ( L );
|
||||
if ( ! aMap.Add ( S ) ) return;
|
||||
|
||||
if ( S.ShapeType() == TopAbs_COMPOUND ||
|
||||
S.ShapeType() == TopAbs_COMPSOLID ) {
|
||||
for ( TopoDS_Iterator it(S); it.More(); it.Next() ) {
|
||||
EncodeRegularity ( it.Value(), tolang, aMap );
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
OCC_CATCH_SIGNALS
|
||||
BRepLib::EncodeRegularity ( S, tolang );
|
||||
}
|
||||
catch(Standard_Failure) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: Exception in ShapeFix::EncodeRegularity(): ";
|
||||
Standard_Failure::Caught()->Print ( cout );
|
||||
cout << endl;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void ShapeFix::EncodeRegularity (const TopoDS_Shape& shape,
|
||||
const Standard_Real tolang)
|
||||
{
|
||||
TopTools_MapOfShape aMap;
|
||||
::EncodeRegularity ( shape, tolang, aMap );
|
||||
BRepLib::EncodeRegularity(shape, tolang);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user