mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-26 21:00:34 +05:00
second order elements with STL
This commit is contained in:
parent
58cfeebca8
commit
f82ea24a8a
@ -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);
|
||||
delete ref;
|
||||
ref = new RefinementSTLGeometry(*this);
|
||||
// ref -> Set2dOptimizer(new MeshOptimizeSTLSurface(*this)); ??? copied from CSG
|
||||
return *ref;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -3072,13 +3078,11 @@ void STLGeometry :: BuildSmoothEdges ()
|
||||
for (int j = 1; j <= 3; j++)
|
||||
{
|
||||
int nbt = NeighbourTrig (i, j);
|
||||
|
||||
|
||||
ng2 = GetTriangle(nbt).GeomNormal(points);
|
||||
ng2 /= (ng2.Length() + 1e-24);
|
||||
|
||||
|
||||
int pi1, pi2;
|
||||
|
||||
trig.GetNeighbourPoints(GetTriangle(nbt), pi1, pi2);
|
||||
|
||||
if (!IsEdge(pi1,pi2))
|
||||
|
@ -160,6 +160,8 @@ namespace netgen
|
||||
Vec<3> ex, ey, ez;
|
||||
Point<3> p1;
|
||||
|
||||
mutable class RefinementSTLGeometry * ref;
|
||||
|
||||
public:
|
||||
int edgesfound;
|
||||
int surfacemeshed;
|
||||
|
@ -409,6 +409,13 @@ STLGeometry * STLTopology ::Load (istream & ist)
|
||||
if (readtrigs.Size() % 100000 == 0)
|
||||
PrintMessageCR (3, readtrigs.Size(), " triangles loaded\r");
|
||||
}
|
||||
else
|
||||
{
|
||||
cout << "Skipping flat triangle "
|
||||
<< "l1 = " << Dist(pts[0], pts[1])
|
||||
<< ", l2 = " << Dist(pts[0], pts[2])
|
||||
<< ", l3 = " << Dist(pts[2], pts[1]) << endl;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user