1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-03 14:10:33 +03:00

0028840: Data Exchange - rewrite the STL Reader/Writer

STL Reader and Writer tools have been refactored to improve performance and usability:
- Basic reading of STL file is separated to abstract class RWStl_Reader which is not bound to particular data structures; the target data model can be bound via inheritance.
- RWStl package uses class Poly_Triangulation to represent triangular mesh.
- Obsolete data structures and tools (packages StlMesh and StlTransfer) are removed.
This commit is contained in:
aml
2017-06-14 08:07:26 +03:00
committed by bugmaster
parent c5b39011b1
commit 4178b3531b
44 changed files with 1168 additions and 2692 deletions

View File

@@ -128,33 +128,9 @@ static Standard_Integer OCC527(Draw_Interpretor& di, Standard_Integer argc, cons
return 0;
}
#include <StlMesh_Mesh.hxx>
#include <StlTransfer.hxx>
//=======================================================================
//function : OCC1048
//purpose :
//=======================================================================
static Standard_Integer OCC1048 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
{
// Verify amount of arguments of the command
if (argc < 2) { di << "Usage : " << argv[0] <<" shape"; return 1;}
TopoDS_Shape aShape = DBRep::Get(argv[1]);
Standard_Real theDeflection = 0.006;
Handle(StlMesh_Mesh) theStlMesh = new StlMesh_Mesh;
BRepMesh_IncrementalMesh aMesh(aShape, theDeflection);
StlTransfer::RetrieveMesh(aShape, theStlMesh);
Standard_Integer NBTRIANGLES = theStlMesh->NbTriangles();
di<<"Info: Number of triangles = "<<NBTRIANGLES<<"\n";
return 0;
}
void QABugs::Commands_2(Draw_Interpretor& theCommands) {
const char *group = "QABugs";
theCommands.Add("OCC527", "OCC527 shape", __FILE__, OCC527, group);
theCommands.Add("OCC1048", "OCC1048 shape", __FILE__, OCC1048, group);
return;
}