Sorry for asking...
but whats the best way to extract the controlpoints of an wire. I havn´t found an example or something similar!?!?!?
Thanks in advance.
Paul Jimenez Mon, 06/15/2009 - 16:47
Control points? Do you mean the Vertices? If so, use TopExp_Explorer.
Ok I tried your "tips" but it´s more complex then I thought.
I want to create a surface limited by two wires. The wires contain different kind of edges (lines, arcs etc.) and have a limited number of elements. Whats the best way to create it???
My idea was do create a curve from the wire??
Handle (Geom_Curve) lCurveOne = BRep_Tool::Curve(pFirstWire,0,0); -> not supported in current version
Handle (Geom_Curve) lCurveTwo = BRep_Tool::Curve(pSecondWire,0,0);
get the controlpoints of the wires and put them in a 2 dimensional array...
and afterwards building the surface using the array -> GeomAPI_PointsToBSplineSurface???
Is there a better - working - strategy???
Thanks in advance - Stefan
if you want to create a face and you know the wires are connected maybe you can use the BRepTools_WireExplorer to traverse through both wires in order to extract their edges and use BRepBuilderAPI_MakeWire::Add so that you get one single wire out of the two you have. Then use BRepBuilderAPI_MakeFace. This should work as long as you want to get a planar face...
Hi Pawel,
thats exactly the problem. There are some cases where I have a wire which doesn´t lie in a plane/level. My idea was know to discretise the wire with GCPnts_UniformAbscissa and use the controlpoints for building a surface with GeomAPI_PointsToBSpline. Is there a more accurate way doing this???
Mon, 06/15/2009 - 16:47
Control points? Do you mean the Vertices? If so, use TopExp_Explorer.
Mon, 06/15/2009 - 17:12
Hi,
This works in pythonOCC:
crv = BRep_Tools.Curve(yourCurve) # get the underlying curve
crv.Poles( someIndex ) # find one of its control points
Mon, 06/15/2009 - 18:21
hmm yeah... could have been my idea!! Sorry
Tue, 06/23/2009 - 18:41
Ok I tried your "tips" but it´s more complex then I thought.
I want to create a surface limited by two wires. The wires contain different kind of edges (lines, arcs etc.) and have a limited number of elements. Whats the best way to create it???
My idea was do create a curve from the wire??
Handle (Geom_Curve) lCurveOne = BRep_Tool::Curve(pFirstWire,0,0); -> not supported in current version
Handle (Geom_Curve) lCurveTwo = BRep_Tool::Curve(pSecondWire,0,0);
get the controlpoints of the wires and put them in a 2 dimensional array...
and afterwards building the surface using the array -> GeomAPI_PointsToBSplineSurface???
Is there a better - working - strategy???
Thanks in advance - Stefan
Wed, 06/24/2009 - 00:19
Hi Stefan,
if you want to create a face and you know the wires are connected maybe you can use the BRepTools_WireExplorer to traverse through both wires in order to extract their edges and use BRepBuilderAPI_MakeWire::Add so that you get one single wire out of the two you have. Then use BRepBuilderAPI_MakeFace. This should work as long as you want to get a planar face...
Pawel
Wed, 06/24/2009 - 11:43
Hi Pawel,
thats exactly the problem. There are some cases where I have a wire which doesn´t lie in a plane/level. My idea was know to discretise the wire with GCPnts_UniformAbscissa and use the controlpoints for building a surface with GeomAPI_PointsToBSpline. Is there a more accurate way doing this???