Tuesday, December 19, 2006

Flank Contouring w/ Check Surface Collision Detection

Althrough it's still not complete/successful, I just get a basic idea to prove my thoughts (or maybe just another rough explanation) for handling check surface in the standard flank contouring operation.


First I assumed every check surface can be decomposed into or approimated by multiple so-called check patches, which are small "planar" rectangles lie on the check surface. (Assumption 1)

Also I assumed the tessellated sweep segment of the tool path is approximately planar rectangle if the drive surface is simple enough and the tessellation step is small enough.(Assumption 2)

So intuitively if I can figure out how to detect the collection with a specific check patch, I can apply the same approach to solve the entire check surface.


For any orientation (rotation+translation) of a specific check patch, it can be again decomposed into the rotation on X-axis, Y-axis, and Z-axis (as well as translation on XY/YZ/XZ planes).
Note that by assumption 2, we can define the X/Y/Z axes intuitively on each sweep segment. we define XZ plane is coplanar with the sweep segment plane with X to the right, Z to the up,
and Y = cross(X,Z).


Assume some patch with only rotation on Y axis and translation on XZ plane is collided with a sweep segment of the tool path, the point which is a distance of R along the
tool backward direction away from the minimal extremum point of the intersection between patch and sweep segment (note. the intersection will be a curve on the sweep
segment), will be right on the tool axis of the collided tool.
So we can conclude that
(Lemma 1)
(tool collided with the check patch oriented by Y axis rotation and XZ translation) =>
(the translation of check patch along the tool backward direction at a distance of R should intersection with the sweep segment and the minimal extremum point lies on tool axis)
(abrv. L1 => A)


Again, assume some patch with only rotation on Z axis and translation on XY plane is collided with a sweep segment of the tool path, the offset of check surface (along the check surface
normal) by a distance R should intersect with the sweep segment, and the intersection, which is degenerated as a point on this view direction, will lie on the tool axis.
So we can again conclude that
(Lemma2)
(tool collided with the check patch oriented by Z axis rotation and XY translation) =>
(the intersection of the offseted check patch by a distance R and the sweep segment lies on the tool axis)
(abrv. L2 => B)


Finally let's take a look at the X axis rotation and YZ translation case, in this case, since the YZ plane is approximiately prependicular to the sweep segmnt (by Assumption 2), the rotation
and translation will not affect the solution of collided point, and the collision happened only if the check patch intersects with the sweep segment.
(Lemma3)
(tool collided with the check patch oriented by X axis rotation and YZ translation) =>
(the check patch intersects with the sweep segment)
(abrv. L3 => C)


Next, by Lemma1~3,
(tool collided with check patch of arbitary orientation) := L1 OR L2 OR L3 => A OR B OR C


By simple Modus Tollen that
P => Q <==> ~Q => ~P


We have
(tool collided with check patch of arbitary orientation)
=> A OR B OR C
<==>
~(A OR B OR C)
:= (~A AND ~B AND ~C)
=>
~(tool collided with check patch of arbitary orientation)
:= (tool is NOT collided with check patch of arbitary orientation)

So if neither A, B nor C happened, then the tool is not collided with a specific check patch. This can be easily generalized for the entire check surface.

But the above statements failed to prove the tool axis can be exactly calculated by finding the minimal extremum point of the result from A, B, and C, which I used in my implementation.
Maybe this will make things more comfusing?...still wondering...

0 Comments: