DiscussionsIssue archiveOther usage issues

Archived discussion

A problem when build a face,help !

Other usage issuesFri, 07/06/2007 - 05:475 replies

Browse this forum
QuestionAuthor

TopoDS_Shape TpShape = vectoredges[0];//a bspline in vector
TopoDS_Edge aedge = TopoDS::Edge(TpShape);
TopoDS_Wire awire = BRepBuilderAPI_MakeWire(aedge);
TopoDS_Face aface = BRepBuilderAPI_MakeFace(awire);
Handle(AIS_Shape) AISFace = new AIS_Shape(aface);
myAISContext->Display(AISFace)G
//in debug it shows bulid wire ok,but when build face it fails,who can explain it? Thanks a lot!

Discussion

5 archived replies

Posts are displayed in their archived order.

01Commenter-1

I have found MakeFace to be very random about whether it works or not. Frequently giving access violations rather than giving a meaningful error.

Commenter-1

02Commenter-2

I see you don't have a base surface for the face , especially if the wire does not lie in a plane , you could try constructing the underlying surface for the face first and then build the face from the surface and the bounding wire.

03Commenter-3

HI,
I am new to opencascade and wanna know how does one represent vertex,edges,faces and loops in opencascade or atleast where to find them?

Thanks
Commenter-3

04Commenter-4

Hey Divya,

Try to look at the documentation under modeling data section, that would give you a better idea. You have Geom, TopoDS and the gp packages for this.

cheers

05Commenter-5

Dear Author.

Could you clarify what the edge "aedge" is?
The edge "aedge" should be based on some planar and closed curve.
From your code it is not evident.
Check whether it is so, before any attempt to build a face using
BRepBuilderAPI_MakeFace(awire); .