
Thu, 07/07/2011 - 20:12
Forums:
Hello guys,
I just finally understood why BRepBuilderAPI_MakeFace wasn't working and that's because it only works with plannar edges.
I would like to make a face created via two arcs and straight lines connecting these arcs. Is this possible? Thanks A LOT in advance! I attached an image to demonstrate what I mean.
Cheers,
Bernardo
Attachments:
Thu, 07/07/2011 - 20:30
And here is what I tried (BRepFill_Filling) but it crashes for me
BRepFill_Filling makeFilling(3, 15, 2, false, 0.00001, 0.0001, 0.01, 0.1, 8, 9);
foreach (OCTopoDS_Edge edge in OCCEdges)
{
makeFilling.Add(edge, OCGeomAbs_Shape.GeomAbs_C0, true);
}
makeFilling.Build(); // Crashes here
Thu, 07/07/2011 - 20:54
Hi Bernardo,
take a look in this topic:
http://www.opencascade.org/org/forum/thread_18969/
I think it would help.
Regards,
Gabriel
Thu, 07/07/2011 - 22:01
Hi Gabriel,
thanks for the link. I did try that solution but I couldn't get it work. When I use GeomPlate_BuildPlateSurface I'm supposed to supply the Add function with a GeomPlate_CurveConstraint, which I didn't understand how to convert to that from an edge.
Macedo said
"It work, finally! I used GeomPlate_BuildPlateSurface, and added the Curves from my EDGES."
do you know how he did that from the edges?
Thanks in advance!
Bernardo
Thu, 07/07/2011 - 22:30
I think you can do it like this:
Handle(Geom_Curve) curve = BRep_Tool::Curve( edge, f, l );
GeomAdaptor_Curve adaptCurve( curve, f, l );
Handle(GeomAdaptor_HCurve) adaptHCurve = new GeomAdaptor_HCurve( adaptCurve );
Handle(GeomPlate_CurveConstraint) curveConstraint = new GeomPlate_CurveConstraint( adaptHCurve, 0 );
Tue, 07/12/2011 - 14:12
Hey Gabriel,
thanks a lot for your kind help! However I still couldn't get it work because the C# wrappers I'm using doesn't have some of the needed classes. Would you be kind enough to help me with BRepFill_Filling? I have added the edges, which makes a closed-shape to BRepFill_Filling and then called Build(), but it crashes. Am I missing something? Thank you in advance!
BRepFill_Filling makeFilling(3, 15, 2, false, 0.00001, 0.0001, 0.01, 0.1, 8, 9);
foreach (OCTopoDS_Edge edge in OCCEdges)
{
makeFilling.Add(edge, OCGeomAbs_Shape.GeomAbs_C0, true);
}
makeFilling.Build(); // Crashes here
Cheers,
Bernardo
Tue, 07/12/2011 - 14:17
ugh!! sorry, it was such a dumb mistake, the code above is correct and works perfectly! thanks
Tue, 11/21/2017 - 15:32
Dear Sir;
I implemented the below code but it crashes in the line makeFilling.Build();
What is the reason for it? how can we resolve it?
BRepFill_Filling makeFilling(3, 15, 2, false, 0.00001, 0.0001, 0.01, 0.1, 8, 9);
foreach (OCTopoDS_Edge edge in OCCEdges)
{
makeFilling.Add(edge, OCGeomAbs_Shape.GeomAbs_C0, true);
}
makeFilling.Build(); // Crashes here