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