Access to arrays (PolyShape.Lines, PolyLine.Pts ...)

 
 
 
Posted by:MichiMichbeck
Data created:28 May 2010

Hey

I am trying to access the lines stored in a PolyLine:

             poly = (IPolyLine)(thePolyShape.Lines[0]);

In c++ SDK this works, but in .Net the thePolyShape.Lines (without indexing [i] ) already returns an Object of type PolyLine and if the index is used it tries to access the Points stored in that PolyLine. Normally thePolyShape.Lines should return an array of PolyLines! The same problem exists with that: thePolyLine.Pts[0] (trying to access the points stored in a PolyLine Object)

Thx in Advance
Greets, Michbeck

Right, confirmed. The reason is that the translator assumes its a pointer to polyshape/points, not an array of them. I will try to handle this for next build.

Marsel Khadiyev (Software Developer, EPHERE Inc.)

Thx for your fast answer! Can you estimate when the next build of Max.Net might be available for us?

Greets
Michbeck

No problem, I hope to have the new build out next week but it depends on the difficulty of implementation of some things in it (like the arrays) so maybe a bit later. Are you on a deadline?

Marsel Khadiyev (Software Developer, EPHERE Inc.)

We are not on a deadline and it is accaptable for us to wait 2-3 weeks - we worked around the problem by using the function InterpPiece3D(segment s, float t) on a PolyShape - is gives the controlpoints of the spline by iterating through the segments with t = 0.0. But that is just a hack and the direct access of points or lines of those arrays is much faster.

Thx, have a nice weekend
Michbeck