
Fri, 08/05/2005 - 15:28
Forums:
Hi,
I have a curve which is the product of a spline, I would like to use it to make a revolution solid, I did this...
GeomAPI_PointsToBSpline GeomAPI = GeomAPI_PointsToBSpline(array);
Handle(Geom_BSplineCurve) bsCurve = GeomAPI.Curve();
TopoDS_Edge aEdge = BRepBuilderAPI_MakeEdge(bsCurve);
Handle(Geom_Curve) myCurve = BRep_Tool::Curve(aEdge, First, Last); TopoDS_Solid aSolid = RepPrimAPI_MakeRevolution(Axes,myCurve,VMin,VMax,Ang);
...
I declared First and Last and all the parameters and it compiles o.k., but finally I can not get the revolution solid. I tried to use the bscurve directly which is a Geom_BSplineCurve but it didn't work either.
Maybe I have to do something else?
Thanks
Mon, 08/08/2005 - 07:47
Hi
I think u need a closed loop curve to build a revolved solid. Make a wire out of ur b-spline and then build a
face out of it. Give this face as a input to ur constructor of BRepPrimAPI_MakeRevol.
regards
- GP
Mon, 08/08/2005 - 20:34
Hi,
The start and end points should lie on the axis and the curve should be planar.
No need to create an edge and then to extract a curve - this will be the same as original (i.e. myCurve = bsCurve).
Hope this helps.
Roman