mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-24 21:10:33 +05:00
occ - fix meshing a sphere (need to keep degenerate edges)
This commit is contained in:
parent
44d626f727
commit
c63a865ee3
@ -19,11 +19,14 @@ namespace netgen
|
||||
if(verts.size() != 2)
|
||||
throw Exception("OCC edge does not have 2 vertices");
|
||||
|
||||
// swap start/end if necessary
|
||||
double d00 = Dist(GetPoint(0), start->GetPoint());
|
||||
double d01 = Dist(GetPoint(0), end->GetPoint());
|
||||
if(d01 < d00)
|
||||
swap(start, end);
|
||||
if(start != end)
|
||||
{
|
||||
// swap start/end if necessary
|
||||
double d00 = Dist(GetPoint(0), start->GetPoint());
|
||||
double d01 = Dist(GetPoint(0), end->GetPoint());
|
||||
if(d01 < d00)
|
||||
swap(start, end);
|
||||
}
|
||||
}
|
||||
|
||||
double OCCEdge::GetLength() const
|
||||
|
@ -1130,8 +1130,6 @@ namespace netgen
|
||||
auto edge = TopoDS::Edge(e);
|
||||
if(edge_map.count(tshape)!=0)
|
||||
continue;
|
||||
if(BRep_Tool::Degenerated(edge))
|
||||
continue;
|
||||
edge_map[tshape] = edges.Size();
|
||||
auto verts = GetVertices(e);
|
||||
auto occ_edge = make_unique<OCCEdge>(edge, *vertices[vertex_map[verts[0].TShape()]], *vertices[vertex_map[verts[1].TShape()]] );
|
||||
|
Loading…
Reference in New Issue
Block a user