refinement of stl geometries

This commit is contained in:
Joachim Schoeberl 2014-03-20 12:52:29 +00:00
parent b0ea9537b1
commit cf713efd2d
2 changed files with 10 additions and 3 deletions

View File

@ -41,6 +41,7 @@ void STLMeshing (STLGeometry & geom,
lineendpoints(), spiralpoints(), selectedmultiedge()
*/
{
ref = NULL;
edgedata = new STLEdgeDataList(*this);
externaledges.SetSize(0);
Clear();
@ -61,6 +62,7 @@ void STLMeshing (STLGeometry & geom,
STLGeometry :: ~STLGeometry()
{
delete edgedata;
delete ref;
}
void STLGeometry :: Save (string filename) const
@ -98,7 +100,11 @@ int STLGeometry :: GenerateMesh (Mesh*& mesh, MeshingParameters & mparam,
const Refinement & STLGeometry :: GetRefinement () const
{
return RefinementSTLGeometry (*this);
// return RefinementSTLGeometry (*this);
delete ref;
ref = new RefinementSTLGeometry(*this);
// ref -> Set2dOptimizer(new MeshOptimizeSTLSurface(*this)); ??? copied from CSG
return *ref;
}

View File

@ -159,6 +159,7 @@ namespace netgen
Vec<3> meshtrignv;
Vec<3> ex, ey, ez;
Point<3> p1;
mutable class RefinementSTLGeometry * ref;
public:
int edgesfound;