Another rip question about rip software for a ... old fag enthusiasts.

Ok. I almost finish Multi Cut Tool for XSI.

The cut through edges - DONE.
The edge ring cuts - DONE.
The plane cuts - ON THE WAY.

So the question is about plane slice mode and mainly about PICK session,
variations and algorithms.
I tried ToolContext.Pick() , Pickbuffer, ToolContext.BeginPickDraw() (aka
OGL select) in lots of different variations, order etc.
And in most cases on my test mesh a have pick gaps.

The test mesh is a Sphere 3x3 divided 5 times. Pretty heavy.

Here is my current alg to get edges that we would cut:
01. Use Bresenham algorithm (or supercover algorithm) to calculate 2d
screen line as slice line.
02. Use all calculated in prev step screen coords to get polygons from pick
buffer ( or you can use BeginPickDraw() OGL select session the same way).
03. Create parametric Plane (CPlane) - slice plane in direction of camera
focus and with a normal(cross product between screen line and camera focus
line).
04. For each edge of picked polygons we create parametric line (CLine) and
try to get intersection with a slice plane (CPlane).
    If we get intersection in parameter range 0-1 we tacke intersection
coord and index of this edge.

This algorithm have lots of variations but the problem on a 02 step doesn't
solved.
On a dense mesh we miss components (polygons or edges it doesn't matter). I
tried to get edges right away from ToolContext.Pick() session - it miss
components.
Tryed get edges (not polys) from pickbuffer - miss components. In the end i
use that preaty have calculations with a parametric primitives, but it
doesn't solve the problem.

http://c2n.me/3JT9JZt
http://c2n.me/3JT9PxS

So any ideas or suggestions are welcome.
I looking for method that get all edges and intersection coords between
MouseDown --- MouseUp screen line.
------
Softimage Mailing List.
To unsubscribe, send a mail to [email protected] with 
"unsubscribe" in the subject, and reply to confirm.

Reply via email to