
Mon, 04/02/2012 - 15:57
Forums:
I have a set of Faces. Is it possible to make only one Face from this set. The Face must have only contour wire without other lines like on attached picture.
Attachments:
I have a set of Faces. Is it possible to make only one Face from this set. The Face must have only contour wire without other lines like on attached picture.
Mon, 04/02/2012 - 16:22
What about this:
1) join faces in a shell [ sew the shapes ]
2) loop through the edges; check if the edges are TopAbs_EXTERNAL, keep track of those
3) build a new face with the edges who's orientation is TopAbs_EXTERNAL
Good luck,
-jelle
Mon, 04/02/2012 - 18:24
Glad to see your answer.
I have already tried to Sew faces and had an exception in Perform metod. By the way set of faces l obtain from projection of shape using HLR and ShapeFix Wire classes
Thu, 06/21/2012 - 14:06
Hi Alex have solved the problem!
Would you share ur idea!
Regards
Wed, 06/27/2012 - 21:14
Hi Game Milky! Sorry for my English :)
Generally, my task was to find a 2D silhouette of the Shape and unfortunately I didn’t solve it. I got the 2D projection with HLR classes then I wanted to build a face from this projection lines. I tried many methods but unsuccessfully.
So you may try to use ShapeFix_Wire class and ShapeAnalysis_ classes (or other ShapeFix) to build a closed wire and then to build a face from it. For example (sorry, don’t remember work it or not):
Handle(ShapeFix_Wire) aShFW = new ShapeFix_Wire();
Handle(ShapeExtend_WireData) aWD = new ShapeExtend_WireData();
for(TopExp_Explorer edgeExp(face, TopAbs_EDGE); edgeExp.More(); edgeExp.Next())
{
aWD->Add(TopoDS::Edge(edgeExp.Current()));
}
aShFW->Load(aWD);
aShFW->ClosedWireMode() = Standard_True;
aShFW->FixReorder();
aShFW->FixConnected();
TopoDS_Wire awire = aShFW->Wire();
BRepBuilderAPI_MakeFace mf(awire, Standard_True);
Good luck! Please, notify me if you will find a solution!
Thu, 06/28/2012 - 12:43
Thank you very much for your reply!
Thank you for your information too!I will try your suggestion and back to you soon after. Currently i am dealing with sewing as i am not really looking for only one face. Rather, looking for closed or connected faces. But for your case, to make one face from multiple faces, have you tried BrepAlgoAPI_Fuse class. You can find it in Modeling Algorithm user Guide!
Thank you very much
I will notify you soon,
Game