mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0028403: Avoid useless calls to BRepTools::Write()
Useless writes of intermediate shapes to hardcoded paths are removed in samples\mfc\standard\02_Modeling\src\ModelingDoc.cpp Methods IGESBRep::WriteShape(), XSControl_Utils::WriteShape() are deleted; BRepTools::Write() can be used instead. Method TopOpeBRepBuild_Tools::DumpMapOfShapeWithState() is moved to where it is used -- TopOpeBRepBuild_Builder1_1.cxx as static function (commented out). Unused DRAW command OCC18612 is removed. Upgrade Guide is corrected to avoid Doxygen warnings.
This commit is contained in:
@@ -21,7 +21,6 @@
|
||||
|
||||
#include <BRep_Builder.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <BRepTools.hxx>
|
||||
#include <Geom2d_Curve.hxx>
|
||||
#include <Geom_Curve.hxx>
|
||||
#include <Geom_Surface.hxx>
|
||||
@@ -78,12 +77,6 @@
|
||||
#include <TopoDS_Wire.hxx>
|
||||
#include <XSAlgo.hxx>
|
||||
|
||||
#include <stdio.h>
|
||||
/* Just used for WriteShape */
|
||||
//:21
|
||||
// =========================
|
||||
// == Selection Members ==
|
||||
// =========================
|
||||
static Handle(IGESToBRep_AlgoContainer) theContainer;
|
||||
|
||||
//=======================================================================
|
||||
@@ -247,23 +240,6 @@ Standard_Boolean IGESToBRep::IsBRepEntity(const Handle(IGESData_IGESEntity)& sta
|
||||
return Standard_False;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : WriteShape
|
||||
//purpose : Creates a file Shape_'number'
|
||||
//=======================================================================
|
||||
void IGESToBRep::WriteShape(const TopoDS_Shape& shape,
|
||||
const Standard_Integer number)
|
||||
{
|
||||
char fname[110];
|
||||
sprintf(fname, "Shape_%d",number);
|
||||
ofstream f(fname,ios::out);
|
||||
cout << "Output file name : " << fname << endl;
|
||||
f << "DBRep_DrawableShape\n";
|
||||
|
||||
BRepTools::Write(shape, f);
|
||||
f.close();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : IGESCurveToSequenceOfIGESCurve
|
||||
//purpose : Creates a sequence of IGES curves from IGES curve:
|
||||
|
@@ -97,46 +97,10 @@ public:
|
||||
//! 502, 504, 508, 510, 514, 186.
|
||||
Standard_EXPORT static Standard_Boolean IsBRepEntity (const Handle(IGESData_IGESEntity)& start);
|
||||
|
||||
//! Creates a file Shape_'number' with the shape being
|
||||
//! able to be restored by Draw.
|
||||
Standard_EXPORT static void WriteShape (const TopoDS_Shape& shape, const Standard_Integer number);
|
||||
|
||||
Standard_EXPORT static Standard_Integer IGESCurveToSequenceOfIGESCurve (const Handle(IGESData_IGESEntity)& curve, Handle(TColStd_HSequenceOfTransient)& sequence);
|
||||
|
||||
Standard_EXPORT static Standard_Boolean TransferPCurve (const TopoDS_Edge& fromedge, const TopoDS_Edge& toedge, const TopoDS_Face& face);
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
friend class IGESToBRep_CurveAndSurface;
|
||||
friend class IGESToBRep_BasicSurface;
|
||||
friend class IGESToBRep_BasicCurve;
|
||||
friend class IGESToBRep_TopoSurface;
|
||||
friend class IGESToBRep_TopoCurve;
|
||||
friend class IGESToBRep_BRepEntity;
|
||||
friend class IGESToBRep_IGESBoundary;
|
||||
friend class IGESToBRep_Reader;
|
||||
friend class IGESToBRep_Actor;
|
||||
friend class IGESToBRep_AlgoContainer;
|
||||
friend class IGESToBRep_ToolContainer;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IGESToBRep_HeaderFile
|
||||
|
Reference in New Issue
Block a user