[Closed] Intersect bug in max
run across some strangeness with max
-- run
delete objects;
pobj = convertToPoly(plane dir:[0,1,0]);
r = point pos:[0,50,2] dir:[0,-1,0] cross:off axistripod:on;
-- select the border edges of the plane and shift scale to add a ring of faces then run....
mobj = convertToMesh pobj;
intersectRay mobj (ray r.pos r.dir);
-- delete the new extruded Faces then run....
intersectRay mobj (ray r.pos r.dir);
do you get the results
undefined
OK
(ray [0,0,2] [0,1,0])
OK
?
I remember this bug. It takes place for polyobjects. There should be another thread on this subject on this forum
… or on Area maybe
if you shift newly extruded faces out in ray direction it will work too.
the issue is that new faces overlap the original and faced backward to the ray.
RayMeshGridIntersect has a #doublesided option, and hopefully it can work it this case.
it’s not just editable poly though, it effects editable mesh too.
change
pobj = convertToPoly(plane dir:[0,1,0]);
to
mobj = convertToMesh(plane dir:[0,1,0]);
and repeat without the additional converttomesh()
!
and you still get the same problem. It’s odd as the ray is projected onto the original geometry, not the new extrusion. You can detach it and it works then reattach it and it breaks again
there are situations where this happens with the new geometry can be intersected but the original geometry can’t. My guess is theres a fault in the ray vs kdtree code they are using when things are planar or how the kdtree is constructed deciding the old geometry can be ignored .
maybe a forcing some “smart – extra – update” can help?
forcing some notifications?
rebuild normals? invalidate caches?
of course it has to be done automatically by the system … but who knows? maybe they forgot or missed something?
as I remember in version something 2018-2019, they changed the intersectRay method… the way of face processing
I’ve got plenty of ray intersect stuff I can use instead but it’s not my issue as such