다음과 같은 순서를 따라 여러개의 Edge에서 Wire를 생성할 수 있습니다.
1. ShapeAnalysis_FreeBounds::ConnectEdgesToWires
2. ShapeFix_Wire 클래스를 이용하여 Fix
3. ShapeAnalysis_FreeBounds::Connect WiresToWires
TopExp_Explorer exp, exp2;
TopoDS_Wire wire, outWireShape;
TopoDS_Face newface;
for(exp.Init(box, TopAbs_FACE); exp.More(); exp.Next())
{
newface = TopoDS::Face(exp.Current());
outWireShape = TopoDS::Wire(BRepTools::OuterWire(newface));
for(exp2.Init(newface, TopAbs_WIRE); exp2.More(); exp2.Next())
{
wire = TopoDS::Wire(exp2.Current());
if(wire==outWireShape)
continue;
BRepTools_ReShape reshaper;
reshaper.Remove(wire);
newface = TopoDS::Face(reshaper.Apply (newface));
}
}
제목
http://www.opencascade.org/org/forum/thread_26207/?forum=3
http://www.opencascade.org/org/forum/thread_24784/?forum=3
http://www.opencascade.org/org/forum/thread_23492/?forum=3
1. ShapeAnalysis_FreeBounds::ConnectEdgesToWires
2. ShapeFix_Wire 클래스를 이용하여 Fix
3. ShapeAnalysis_FreeBounds::Connect WiresToWires
TopExp_Explorer exp, exp2;
TopoDS_Wire wire, outWireShape;
TopoDS_Face newface;
for(exp.Init(box, TopAbs_FACE); exp.More(); exp.Next())
{
newface = TopoDS::Face(exp.Current());
outWireShape = TopoDS::Wire(BRepTools::OuterWire(newface));
for(exp2.Init(newface, TopAbs_WIRE); exp2.More(); exp2.Next())
{
wire = TopoDS::Wire(exp2.Current());
if(wire==outWireShape)
continue;
BRepTools_ReShape reshaper;
reshaper.Remove(wire);
newface = TopoDS::Face(reshaper.Apply (newface));
}
}
제목
Probleme creating a face with holes
How to catch the exceptions?http://www.opencascade.org/org/forum/thread_26207/?forum=3
http://www.opencascade.org/org/forum/thread_24784/?forum=3
http://www.opencascade.org/org/forum/thread_23492/?forum=3
댓글
댓글 쓰기