Patent ID: 8059122
Filing Date: 2011-11-15
Classification: G06T

Abstract:
1. A method for generating a Cartesian mesh model of an object, comprising a processor performing the steps of: a. receiving an ordered set of data points that describe the object in CAD-based Standard Tessellation Language (STL) format, wherein the object is described by a triangular facet surface mesh, each triangular facet having three vertices (V1, V2, V3) that uniquely define a plane and three facet edges defined by lines drawn between V1 and V2, V2 and V3, and V3 and V1; b. defining a volume domain in Cartesian coordinates (x, y, z) that encompasses said object, said volume being subdivided into small perfect cubic cells; c. casting ray along one of the coordinate directions originating from a cell face center of a volume domain face normal to the cast ray, to determine the intersection of said ray with said triangular facet; d. testing ray to see if it passes through said facet by applying the orientation test for the V1V2 facet edge relative to the ray coordinates given by the determinant of the orientation test matrix for the coordinate direction of the cast ray and similarly for the V2V3 and V3V1 facet edges; if all three orientation tests are greater than zero or all three are less than zero, proceed to step e; if only one orientation tests is zero, wherein the ray intersects an edge, or only two of the orientation tests are zero, wherein the ray intersects a vertex, then jump to step h; otherwise jump to step f; e. saving the ray-facet intersection coordinates; proceed to f; f. testing to see if there is another facet to test with the current ray position; if yes, jump to d and apply test to next facet; if no, proceed to g; g. testing to see if there is a next unused cell face center in said volume domain face to cast a ray; if no proceed to step i; if yes, position ray to next cell center face and jump to step c; h. applying a tie-breaker test to determine if the said facet is unique: (1) if said ray intersects said facet edge of a starting surface and the edge has a +x component or if the x component is zero and the facet edge has a +y component, jump to step e; if false jump to step f; (2) if said ray intersects said facet edge of an ending surface and 5 the edge has a −x component or if the x component is zero and the facet edge has a −y component, jump to step e; if false jump to step f; (3) if said ray intersects said facet vertex of a starting surface and both edges intersecting the vertex have +x components or if one of the x components is +x and the other zero with a +y component, jump to step e; if false jump to step f; (4) if said ray intersects said facet vertex of an ending 10 surface and both edges intersecting the vertex have −x components or if one of the x components is −x and the other is zero with a −y component, jump to step e; if false jump to step f; i. end ray casting.