mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-09-06 04:37:55 +08:00
0023824: Bad results of sweep operation when a path curve has unpredictable torsion along its way.
Adding test cases for this fix
This commit is contained in:
@@ -28,7 +28,8 @@ uses
|
||||
StdFail,
|
||||
gp,
|
||||
GeomAbs,
|
||||
Geom,
|
||||
Geom,
|
||||
GeomFill,
|
||||
Approx,
|
||||
TopoDS,
|
||||
TopTools,
|
||||
|
||||
@@ -35,6 +35,7 @@ class MakePipe from BRepOffsetAPI inherits MakeSweep from BRepPrimAPI
|
||||
-- with G1 continuous spines only.
|
||||
uses
|
||||
Pipe from BRepFill,
|
||||
Trihedron from GeomFill,
|
||||
Wire from TopoDS,
|
||||
Shape from TopoDS,
|
||||
Edge from TopoDS,
|
||||
@@ -58,6 +59,21 @@ is
|
||||
-- composite solid.
|
||||
returns MakePipe from BRepOffsetAPI;
|
||||
|
||||
SetMode(me : in out;
|
||||
aMode : Trihedron from GeomFill);
|
||||
---Purpose: Set the mode of sweeping
|
||||
-- It can be:
|
||||
-- - Frenet
|
||||
-- - Corrected Frenet
|
||||
-- - Discrete Trihedron
|
||||
-- By default the mode is Corrected Frenet
|
||||
|
||||
SetForceApproxC1(me : in out;
|
||||
ForceApproxC1 : Boolean from Standard);
|
||||
---Purpose: Set the flag that indicates attempt to approximate
|
||||
-- a C1-continuous surface if a swept surface proved
|
||||
-- to be C0.
|
||||
|
||||
|
||||
Pipe(me) returns Pipe from BRepFill
|
||||
---C++: return const &
|
||||
|
||||
@@ -40,6 +40,32 @@ BRepOffsetAPI_MakePipe::BRepOffsetAPI_MakePipe(const TopoDS_Wire& Spine ,
|
||||
Build();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetMode
|
||||
//purpose : Set the mode of sweeping
|
||||
// It can be:
|
||||
// - Frenet
|
||||
// - Corrected Frenet
|
||||
// - Discrete Trihedron
|
||||
//=======================================================================
|
||||
|
||||
void BRepOffsetAPI_MakePipe::SetMode(const GeomFill_Trihedron aMode)
|
||||
{
|
||||
myPipe.SetMode(aMode);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetForceApproxC1
|
||||
//purpose : Set the flag that indicates attempt to approximate
|
||||
// a C1-continuous surface if a swept surface proved
|
||||
// to be C0.
|
||||
//=======================================================================
|
||||
|
||||
void BRepOffsetAPI_MakePipe::SetForceApproxC1(const Standard_Boolean ForceApproxC1)
|
||||
{
|
||||
myPipe.SetForceApproxC1(ForceApproxC1);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Pipe
|
||||
//purpose :
|
||||
|
||||
@@ -73,6 +73,10 @@ is
|
||||
-- to perform the sweeping
|
||||
-- If IsFrenet is false, a corrected Frenet trihedron is used.
|
||||
|
||||
SetDiscreteMode(me : in out);
|
||||
---Purpose: Sets a Discrete trihedron
|
||||
-- to perform the sweeping
|
||||
|
||||
SetMode(me : in out; Axe : Ax2 from gp);
|
||||
---Purpose: Sets a fixed trihedron to perform the sweeping
|
||||
-- all sections will be parallel.
|
||||
@@ -110,6 +114,7 @@ is
|
||||
|
||||
---Level: Public
|
||||
|
||||
|
||||
-- =================================
|
||||
-- Methodes to define section(s)
|
||||
-- =================================
|
||||
@@ -212,6 +217,12 @@ is
|
||||
-- - boundary tolerance BoundTol
|
||||
-- - angular tolerance TolAngular.
|
||||
|
||||
SetForceApproxC1(me : in out;
|
||||
ForceApproxC1 : Boolean from Standard);
|
||||
---Purpose: Set the flag that indicates attempt to approximate
|
||||
-- a C1-continuous surface if a swept surface proved
|
||||
-- to be C0.
|
||||
|
||||
SetTransitionMode(me : in out;
|
||||
Mode :TransitionMode from BRepBuilderAPI = BRepBuilderAPI_Transformed)
|
||||
---Purpose: Sets the transition mode to manage discontinuities on
|
||||
|
||||
@@ -49,6 +49,15 @@ BRepOffsetAPI_MakePipeShell::BRepOffsetAPI_MakePipeShell(const TopoDS_Wire& Spin
|
||||
myPipe->Set(IsFrenet);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetDiscreteMode
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void BRepOffsetAPI_MakePipeShell::SetDiscreteMode()
|
||||
{
|
||||
myPipe->SetDiscrete();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetMode
|
||||
//purpose :
|
||||
@@ -185,8 +194,9 @@ void BRepOffsetAPI_MakePipeShell::Delete( const TopoDS_Shape& Profile)
|
||||
}
|
||||
return Status;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetTransitionMode
|
||||
//function : SetTolerance
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void BRepOffsetAPI_MakePipeShell::SetTolerance(const Standard_Real Tol3d,
|
||||
@@ -196,6 +206,17 @@ void BRepOffsetAPI_MakePipeShell::Delete( const TopoDS_Shape& Profile)
|
||||
myPipe->SetTolerance(Tol3d, BoundTol, TolAngular);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetForceApproxC1
|
||||
//purpose : Set the flag that indicates attempt to approximate
|
||||
// a C1-continuous surface if a swept surface proved
|
||||
// to be C0.
|
||||
//=======================================================================
|
||||
void BRepOffsetAPI_MakePipeShell::SetForceApproxC1(const Standard_Boolean ForceApproxC1)
|
||||
{
|
||||
myPipe->SetForceApproxC1(ForceApproxC1);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetTransitionMode
|
||||
//purpose :
|
||||
|
||||
Reference in New Issue
Block a user