mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0022783: Improvement of BRepOffsetAPI_MakeFilling: keep old and new boundary edges with all pcurves
This commit is contained in:
@@ -1679,6 +1679,29 @@ Standard_Integer build3d(Draw_Interpretor& di,
|
||||
return 0;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : reducepcurves
|
||||
//purpose : remove pcurves that are unused in this shape
|
||||
//=======================================================================
|
||||
|
||||
Standard_Integer reducepcurves(Draw_Interpretor& di,
|
||||
Standard_Integer n, const char** a)
|
||||
{
|
||||
if (n < 2) return 1;
|
||||
|
||||
Standard_Integer i;
|
||||
for (i = 1; i < n; i++)
|
||||
{
|
||||
TopoDS_Shape aShape = DBRep::Get(a[i]);
|
||||
if (aShape.IsNull())
|
||||
//cout << a[i] << " is not a valid shape" << endl;
|
||||
di << a[i] << " is not a valid shape" << "\n";
|
||||
else
|
||||
BRepTools::RemoveUnusedPCurves(aShape);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : CurveCommands
|
||||
@@ -1786,6 +1809,10 @@ void BRepTest::CurveCommands(Draw_Interpretor& theCommands)
|
||||
"build3d S [tol]",
|
||||
build3d, g);
|
||||
|
||||
theCommands.Add("reducepcurves",
|
||||
"reducepcurves shape1 shape2 ...",
|
||||
reducepcurves, g);
|
||||
|
||||
theCommands.Add("concatwire",
|
||||
"concatwire result wire [option](G1/C1)",
|
||||
__FILE__,
|
||||
|
@@ -469,9 +469,9 @@ static Standard_Integer filling( Draw_Interpretor & di, Standard_Integer n, cons
|
||||
TolCurv,
|
||||
MaxDeg,
|
||||
MaxSegments );
|
||||
TopoDS_Shape aLocalFace(DBRep::Get( a[5], TopAbs_FACE ) );
|
||||
TopoDS_Face InitFace = TopoDS::Face( aLocalFace);
|
||||
// TopoDS_Face InitFace = TopoDS::Face( DBRep::Get( a[5], TopAbs_FACE ) );
|
||||
//TopoDS_Shape aLocalFace(DBRep::Get( a[5], TopAbs_FACE ) );
|
||||
//TopoDS_Face InitFace = TopoDS::Face( aLocalFace);
|
||||
TopoDS_Face InitFace = TopoDS::Face( DBRep::Get(a[5], TopAbs_FACE) );
|
||||
if (! InitFace.IsNull())
|
||||
MakeFilling.LoadInitSurface( InitFace );
|
||||
|
||||
@@ -484,14 +484,14 @@ static Standard_Integer filling( Draw_Interpretor & di, Standard_Integer n, cons
|
||||
{
|
||||
E.Nullify();
|
||||
F.Nullify();
|
||||
TopoDS_Shape aLocalEdge(DBRep::Get( a[i], TopAbs_EDGE ));
|
||||
E = TopoDS::Edge(aLocalEdge);
|
||||
// E = TopoDS::Edge( DBRep::Get( a[i], TopAbs_EDGE ) );
|
||||
//TopoDS_Shape aLocalEdge(DBRep::Get( a[i], TopAbs_EDGE ));
|
||||
//E = TopoDS::Edge(aLocalEdge);
|
||||
E = TopoDS::Edge( DBRep::Get(a[i], TopAbs_EDGE) );
|
||||
if (! E.IsNull())
|
||||
i++;
|
||||
aLocalFace = DBRep::Get( a[i], TopAbs_FACE ) ;
|
||||
F = TopoDS::Face(aLocalFace);
|
||||
// F = TopoDS::Face( DBRep::Get( a[i], TopAbs_FACE ) );
|
||||
//aLocalFace = DBRep::Get( a[i], TopAbs_FACE ) ;
|
||||
//F = TopoDS::Face(aLocalFace);
|
||||
F = TopoDS::Face( DBRep::Get(a[i], TopAbs_FACE) );
|
||||
if (! F.IsNull())
|
||||
i++;
|
||||
|
||||
@@ -517,18 +517,18 @@ static Standard_Integer filling( Draw_Interpretor & di, Standard_Integer n, cons
|
||||
{
|
||||
E.Nullify();
|
||||
F.Nullify();
|
||||
TopoDS_Shape aLocalEdge(DBRep::Get( a[i++], TopAbs_EDGE ));
|
||||
E = TopoDS::Edge( aLocalEdge);
|
||||
// E = TopoDS::Edge( DBRep::Get( a[i++], TopAbs_EDGE ) );
|
||||
//TopoDS_Shape aLocalEdge(DBRep::Get( a[i++], TopAbs_EDGE ));
|
||||
//E = TopoDS::Edge( aLocalEdge);
|
||||
E = TopoDS::Edge( DBRep::Get(a[i++], TopAbs_EDGE) );
|
||||
if (E.IsNull())
|
||||
{
|
||||
//cout<<"Wrong parameters"<<endl;
|
||||
di<<"Wrong parameters"<<"\n";
|
||||
return 1;
|
||||
}
|
||||
TopoDS_Shape alocalFace(DBRep::Get( a[i], TopAbs_FACE ) );
|
||||
F = TopoDS::Face( aLocalFace);
|
||||
// F = TopoDS::Face( DBRep::Get( a[i], TopAbs_FACE ) );
|
||||
//TopoDS_Shape alocalFace(DBRep::Get( a[i], TopAbs_FACE ) );
|
||||
//F = TopoDS::Face( alocalFace);
|
||||
F = TopoDS::Face( DBRep::Get(a[i], TopAbs_FACE) );
|
||||
if (! F.IsNull())
|
||||
i++;
|
||||
|
||||
@@ -549,9 +549,9 @@ static Standard_Integer filling( Draw_Interpretor & di, Standard_Integer n, cons
|
||||
else
|
||||
{
|
||||
Standard_Real U = atof( a[i++] ), V = atof( a[i++] );
|
||||
aLocalFace = DBRep::Get( a[i++], TopAbs_FACE );
|
||||
F = TopoDS::Face( aLocalFace);
|
||||
// F = TopoDS::Face( DBRep::Get( a[i++], TopAbs_FACE ));
|
||||
//aLocalFace = DBRep::Get( a[i++], TopAbs_FACE );
|
||||
//F = TopoDS::Face( aLocalFace);
|
||||
F = TopoDS::Face( DBRep::Get(a[i++], TopAbs_FACE));
|
||||
if (F.IsNull())
|
||||
{
|
||||
//cout<<"Wrong parameters"<<endl;
|
||||
|
Reference in New Issue
Block a user