ref and out parameters are returned as a tuple in python. In this case, python would get a tuple of (bool, double []) as a return value when calling method(values)
The weird stuff is that I get output as a tuple where result is composed from two objects int and double and I still pass a value by reference which actually get never modifies. So the working version looks like this:
I find that if you can make the syntax work well with python, the SDK in general is easier for people to read. In this case, why would you be using a ref; it seems like this should either be an out parameter or be what is returned by the function itself.
I would also suggest other namespaces than ON and PInvoke, but that is a stylistic preference and not the topic of this thread.
For this function example, I would tend to just return a double[] and have the failure case either return null or an empty array. This completely avoids using a ref or and out parameter.
I keep getting this error: TypeError: No method matches given arguments for PythonCollisionDetectionPolygons: (<class 'System.Double[]'>, <class 'int'>, <class 'System.Int32[]'>, <class 'int'>)
I am wondering what I am missing when I write this: public static bool PythonCollisionDetectionPolygons(double[] PositionsXYZ, int PositionsXYZ_N, int[] VertexSums, int VertexSums_N, out int[] pairs, out double[] outlines )
For names I agree, they look very badly named.