mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +03:00
0025124: [Feature request] Removal of continuity checks for offset geometries
Sometimes curve or surface, which is defined as C0, has continuity G1 or above. Offset can be built from these shapes. Therefore, this extended checking was added into SetBasisCurve and SetBasisSurface methods. Main changes in function BRepOffset_Tool::ExtentFace(...): * "return" is added if intersection (in 2D-space) between two edges in a face cannot be found. Basis curve/surface continuity value found (if G1-checking is OK) is set up as BasisContinuity (see myBasisCurveContinuity and myBasisSurfContinuity members which is returned by GetBasisCurveContinuity and GetBasisSurfContinuity() methods). This fact is used in Geom2dAdaptor and in GeomAdaptor classes. Possibility is entered, which allows for basis elements of offset curve/surface to avoid of C0-checking. Test cases were changed according to their new behavior. Test-cases for issue #25124
This commit is contained in:
@@ -217,26 +217,6 @@ static void MakeOffset
|
||||
const Standard_Boolean IsOpenResult,
|
||||
const TopoDS_Vertex * Ends);
|
||||
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : CheckFace
|
||||
//purpose : Check if face contains an edge with C0 continuity
|
||||
//=======================================================================
|
||||
//
|
||||
static void CheckFace(const TopoDS_Face& theFace)
|
||||
{
|
||||
TopExp_Explorer ex(theFace,TopAbs_EDGE);
|
||||
for(; ex.More(); ex.Next())
|
||||
{
|
||||
TopoDS_Edge anEdge=TopoDS::Edge(ex.Current());
|
||||
Standard_Real f,l;
|
||||
const Handle(Geom2d_Curve) C = BRep_Tool::CurveOnSurface(anEdge,theFace,f,l);
|
||||
if (C->Continuity() == GeomAbs_C0)
|
||||
Standard_ConstructionError::Raise("Initial shape contains an edge with C0 continuity");
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : KPartCircle
|
||||
//purpose :
|
||||
@@ -368,9 +348,6 @@ void BRepFill_OffsetWire::Init(const TopoDS_Face& Spine,
|
||||
// mySpine = TopoDS::Face(Spine.Oriented(TopAbs_FORWARD));
|
||||
myJoinType = Join;
|
||||
myIsOpenResult = IsOpenResult;
|
||||
|
||||
CheckFace(mySpine);
|
||||
|
||||
myMap.Clear();
|
||||
myMapSpine.Clear();
|
||||
//------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user