mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0023845: New auxiliary method concatenating a wire into an edge based on C0-continuous curve.
Fix of exception in old method (ConcatenateWire). Adding test case for this fix
This commit is contained in:
@@ -1639,6 +1639,30 @@ Standard_Integer edgeintersector(Draw_Interpretor& di,
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : concatC0wire
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Standard_Integer concatC0wire(Draw_Interpretor&, Standard_Integer n, const char** c)
|
||||
{
|
||||
if ( n < 3 ) return 1;
|
||||
|
||||
TopoDS_Shape S = DBRep::Get(c[2],TopAbs_WIRE) ;
|
||||
|
||||
if (S.IsNull())
|
||||
return 1; //test if the shape is empty
|
||||
|
||||
TopoDS_Wire W = TopoDS::Wire(S) ;
|
||||
TopoDS_Shape res;
|
||||
|
||||
|
||||
res = BRepAlgo::ConcatenateWireC0(W); //treatment
|
||||
DBRep::Set(c[1], res);
|
||||
return 0;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : concatwire
|
||||
//purpose : reduce the multiply degree of the knots to the minimum without
|
||||
@@ -1828,6 +1852,12 @@ void BRepTest::CurveCommands(Draw_Interpretor& theCommands)
|
||||
"reducepcurves shape1 shape2 ...",
|
||||
reducepcurves, g);
|
||||
|
||||
theCommands.Add("concatC0wire",
|
||||
"concatC0wire result wire",
|
||||
__FILE__,
|
||||
concatC0wire,
|
||||
g);
|
||||
|
||||
theCommands.Add("concatwire",
|
||||
"concatwire result wire [option](G1/C1)",
|
||||
__FILE__,
|
||||
|
Reference in New Issue
Block a user