0001216: Unable to Loft Sketches with Radiused Corners
This commit is contained in:
parent
e3a9355148
commit
89a5d06926
|
@ -26,6 +26,8 @@
|
|||
# include <BRepAlgoAPI_Section.hxx>
|
||||
# include <BRepBuilderAPI_MakeWire.hxx>
|
||||
# include <gp_Pln.hxx>
|
||||
# include <Precision.hxx>
|
||||
# include <ShapeFix_Wire.hxx>
|
||||
# include <TopExp_Explorer.hxx>
|
||||
# include <TopoDS.hxx>
|
||||
# include <TopoDS_Edge.hxx>
|
||||
|
@ -59,6 +61,7 @@ std::list<TopoDS_Wire> CrossSection::section(double d) const
|
|||
|
||||
void CrossSection::connectEdges (const std::list<TopoDS_Edge>& edges, std::list<TopoDS_Wire>& wires) const
|
||||
{
|
||||
// FIXME: Use ShapeAnalysis_FreeBounds::ConnectEdgesToWires() as an alternative
|
||||
std::list<TopoDS_Edge> edge_list = edges;
|
||||
while (edge_list.size() > 0) {
|
||||
BRepBuilderAPI_MakeWire mkWire;
|
||||
|
@ -84,6 +87,14 @@ void CrossSection::connectEdges (const std::list<TopoDS_Edge>& edges, std::list<
|
|||
}
|
||||
}
|
||||
while (found);
|
||||
wires.push_back(new_wire);
|
||||
|
||||
// Fix any topological issues of the wire
|
||||
ShapeFix_Wire aFix;
|
||||
aFix.SetPrecision(Precision::Confusion());
|
||||
aFix.Load(new_wire);
|
||||
aFix.FixReorder();
|
||||
aFix.FixConnected();
|
||||
aFix.FixClosed();
|
||||
wires.push_back(aFix.Wire());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
#include "PreCompiled.h"
|
||||
#ifndef _PreComp_
|
||||
# include <BRep_Builder.hxx>
|
||||
# include <Precision.hxx>
|
||||
# include <ShapeFix_Wire.hxx>
|
||||
# include <TopoDS_Compound.hxx>
|
||||
#endif
|
||||
|
||||
|
@ -1922,6 +1924,8 @@ TopoShape Sketch::toShape(void) const
|
|||
}
|
||||
}
|
||||
|
||||
// FIXME: Use ShapeAnalysis_FreeBounds::ConnectEdgesToWires() as an alternative
|
||||
//
|
||||
// sort them together to wires
|
||||
while (edge_list.size() > 0) {
|
||||
BRepBuilderAPI_MakeWire mkWire;
|
||||
|
@ -1947,7 +1951,15 @@ TopoShape Sketch::toShape(void) const
|
|||
}
|
||||
}
|
||||
while (found);
|
||||
wires.push_back(new_wire);
|
||||
|
||||
// Fix any topological issues of the wire
|
||||
ShapeFix_Wire aFix;
|
||||
aFix.SetPrecision(Precision::Confusion());
|
||||
aFix.Load(new_wire);
|
||||
aFix.FixReorder();
|
||||
aFix.FixConnected();
|
||||
aFix.FixClosed();
|
||||
wires.push_back(aFix.Wire());
|
||||
}
|
||||
if (wires.size() == 1)
|
||||
result = *wires.begin();
|
||||
|
|
Loading…
Reference in New Issue
Block a user