Grid - wukevin/autoPACK GitHub Wiki
Welcome to the autoPACK wiki!
Currently, the only difference between this branch and Dr. Graham Johnson's master branch, is the new grid-building algorithm, called via projectPolyhedronToGrid2(gridSpacing). The function returns a list of gridPoint objects, spaced apart by a user-defined gridSpacing. Each such object is declared to be either inside, outside, or on the surface of the polyhedron. Points within a certain critical distance of the polyhedron (by default, one gridSpacing away) also have a closestDistance property that represents its distance to the closest face.
To use:
- Select the polyhedron in C4D's object manager
-
x = projectPolyhedronToGrid2(gridSpacing)
- You can also include a second optional argument, x = projectPolyhedronToGrid2(gridSpacing, radius) where radius is the critical distance within which points near the polyhedron surface will have annotated minimum distances.
- Three objects will be created in C4D's object manager, representing inside/outside/surface points. This is for visualization purposes. The actual return value is stored in the variable x (assuming you used the above command).