Skip to content
Snippets Groups Projects
Commit 2741b73b authored by Jean-François Remacle's avatar Jean-François Remacle
Browse files

*** empty log message ***

parent 073d24c8
No related branches found
No related tags found
No related merge requests found
......@@ -138,6 +138,7 @@ class GModel
virtual int readFourier(const std::string &name);
// OCC model
int readOCCBREP(const std::string &name);
int readOCCIGES(const std::string &name);
int readOCCSTEP(const std::string &name);
void deleleOCCInternals();
......
// $Id: GModelIO_OCC.cpp,v 1.3 2006-11-15 15:06:45 geuzaine Exp $
// $Id: GModelIO_OCC.cpp,v 1.4 2006-11-15 21:53:31 remacle Exp $
//
// Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
//
......@@ -265,7 +265,8 @@ void OCC_Internals :: buildLists ()
void OCC_Internals :: loadBREP (const char *fn)
{
throw;
BRep_Builder aBuilder;
Standard_Boolean result = BRepTools::Read( shape, (char*)fn, aBuilder );
}
void OCC_Internals :: loadSTEP (const char *fn)
......@@ -342,6 +343,14 @@ int GModel::readOCCIGES(const std::string &fn)
occ_internals->buildGModel (this);
return 1;
}
int GModel::readOCCBREP(const std::string &fn)
{
occ_internals = new OCC_Internals;
occ_internals->loadBREP (fn.c_str());
occ_internals->buildLists ();
occ_internals->buildGModel (this);
return 1;
}
void GModel::deleteOCCInternals()
{
if(occ_internals)delete occ_internals;
......
......@@ -30,6 +30,7 @@ using std::iostream;
#include "TopoDS_Solid.hxx"
#include "TopExp_Explorer.hxx"
#include "BRep_Tool.hxx"
#include "BRep_Builder.hxx"
#include "Geom_Curve.hxx"
#include "Geom2d_Curve.hxx"
#include "Geom_Surface.hxx"
......
// $Id: OpenFile.cpp,v 1.126 2006-11-14 20:20:18 remacle Exp $
// $Id: OpenFile.cpp,v 1.127 2006-11-15 21:53:31 remacle Exp $
//
// Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
//
......@@ -293,6 +293,10 @@ int MergeProblem(char *name, int warn_if_missing)
if(!strcmp(ext, ".stl") || !strcmp(ext, ".STL")){
status = GMODEL->readSTL(name, CTX.mesh.stl_distance_tol);
}
else if(!strcmp(ext, ".brep") || !strcmp(ext, ".rle") ||
!strcmp(ext, ".brp") || !strcmp(ext, ".BRP")){
GMODEL->readOCCBREP(std::string(name));
}
else if(!strcmp(ext, ".iges") || !strcmp(ext, ".IGES") ||
!strcmp(ext, ".igs") || !strcmp(ext, ".IGS")){
GMODEL->readOCCIGES(std::string(name));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment