2010/3/30 Dave Cowden <dave.cow...@gmail.com> > Hey, Thomas/Jelle: > > I have a question regarding the use of a byref parameter in > BRepAdaptor_CompCurve. > > If i understand correctly from the OCC docs, BRepAdaptor_CompCurve.Edge( U, > anEdge, V ) returns an edge corresponding to a specified parameter on the > comp curve, and V, the corresponding param on the edge: > > Standard_EXPORT void Edge (const Standard_Real U, TopoDS_Edge &E, > Standard_Real &UonE) const returns an edge and one parameter on them > corresponding to the parameter U. > > Looking at the apiDoc, however, the pyOCC signature doesn't appear to have > a way to return the edge: > > > Edge(...) > Edge(Standard_Real U) -> Standard_Real > Am I missing something? Is there a workaround I can use to call this > method? > > Thanks! > > Hi Dave,
There is a bug in the documentation generation system. The Edge() method actually takes 2 parameters: >>> comp_curve.Edge() Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: BRepAdaptor_CompCurve_Edge expected 3 arguments, got 1 >>> The third argument must be a TopoDS_Edge: >>> comp_curve.Edge(1,2) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: in method 'BRepAdaptor_CompCurve_Edge', argument 3 of type 'TopoDS_Edge &' So just call: >>> returned_integer = comp_curve(argument_integer, your_topods_edge) The C++ method was transformed so that the Standard_Integers passed as reference is returned by python. Thomas
_______________________________________________ Pythonocc-users mailing list Pythonocc-users@gna.org https://mail.gna.org/listinfo/pythonocc-users