
Tue, 06/23/2009 - 14:55
Forums:
Hi,
I get a Handle_Geom_Surface from a TopoDS::Face shape in the follow way
TopoDS_Face faceShape = TopoDS::Face(aSelectShape);
Handle_Geom_Surface surface = BRep_Tool::Surface(faceShape);
But the Surface I obtained don't contain the boundary information.
How can I add the boundary to the obtained surface?
In other words, I want to get a boundary surface.
Thanks in advance!
Tue, 06/23/2009 - 15:11
You probably want to create a BRepAdaptor_Surface from the face.
Tue, 06/23/2009 - 16:59
Hi Rob,
Thanks for your reply!
I want to get the intersection line of the two surface.
Are there any functions to solve the intersection line of two BRepAdaptor_Surface except for GeomAPI_IntSS?
thank you again!
Tue, 06/23/2009 - 17:04
I've never used it, but this looks promissing:
TopOpeBRep_FacesIntersector
Wed, 06/24/2009 - 10:03
Hi Rob,
Thanks very much for your help, and I have solved the problem under your help.
The follow is the code:
Handle(TColGeom_HSequenceOfCurve) sequenceOfCurve = new TColGeom_HSequenceOfCurve();
TopOpeBRep_FacesIntersector facesIntersector;
facesIntersector.Perform(FirstShape, SecondShape);
Handle_TopOpeBRep_HArray1OfLineInter array1OfLineInter = facesIntersector.Lines();
for (int i=1; i<=facesIntersector.NbLines(); i++)
{
TopOpeBRep_LineInter aLineInter = array1OfLineInter->Value(i);
Standard_Real firstPara, lastPara;
aLineInter.Bounds(firstPara, lastPara);
Handle_Geom_Curve insectionCurve = aLineInter.Curve(firstPara, lastPara);
sequenceOfCurve->Append(insectionCurve);
return sequenceOfCurve;
}
Thank you again!