Hello,
first of all, thank you for your code. Im an optical engineer, and i need to mesh a polygon (equally distribute points) to calculate the homogenity of the luminance at these points, this is why your code is helpful to me.
However, i have a couple questions:
why is this line needed? declaring an other variable seems to be unnecessary to me, can i use just polygon instead of poly?Code:Poly = Polygon what is the exact purpose of CBool? NumSidesCrossed Mod 2 gives 1 or 0 (remember, PtInPoly is a variant, not boolean) which can be used as the condition input for IF, no need to make the code longer with CBoolean.Code:PtInPoly = CBool(NumSidesCrossed Mod 2)- you mention that the first and last point of the polygon have to be the same. Since this is a _must_ condition, why not write the code in such a way, that the last point would be added as the first point. this way no error correction would be necessary, since the last point would be automatically copied from the first point.




Reply With Quote

Bookmarks