Closed fraguada closed 3 years ago
If you investigate this, can you take a look at #349? It should make working with docgen a little easier.
Yes! That will be really useful.
Editing this issue because the same is the case for python. Most of this is the result of adapting to the use of out
in .net with BND_TUPLE
.
For example:
RhinoCommon: https://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_Geometry_Intersect_Intersection_LinePlane.htm
public static bool LinePlane(
Line line,
Plane plane,
out double lineParameter
)
Binding code:
BND_TUPLE BND_Intersection::PlanePlane(const BND_Plane& planeA, const BND_Plane& planeB)
{
ON_Line line;
bool success = ON_Intersect(planeA.ToOnPlane(), planeB.ToOnPlane(), line);
BND_TUPLE rc = CreateTuple(2);
SetTuple(rc, 0, success);
SetTuple(rc, 1, line);
return rc;
}
rhino3dm.py: https://mcneel.github.io/rhino3dm/python/api/Intersection.html#rhino3dm.Intersection.LinePlane
rhino3dm.js: https://mcneel.github.io/rhino3dm/javascript/api/Intersection.html#.linePlane
we need to handle functions with out
parameters as returning tuples
Example:
https://github.com/mcneel/rhino3dm/blob/master/src/bindings/bnd_surface.h#L33
results in: