示例#1
0
 private void defineSkinCells()
 {
     foreach (List <StructuralCell> sc in voxels)
     {
         foreach (StructuralCell c in sc)
         {
             if (c.id == cellDebugId)
             {
                 int g = 0;
             }
             Mesh extendSplitter = MeshTools.makeCuboid(c.cellPlane, c.xDim, c.yDim, c.zDim);
             var  intersectCurve = Rhino.Geometry.Intersect.Intersection.MeshMeshAccurate(slice, extendSplitter, RhinoDoc.ActiveDoc.ModelAbsoluteTolerance);
             if (intersectCurve != null)
             {
                 if (intersectCurve.Length > 0)
                 {
                     //we know there is defintely an intersection if we have result from MeshMesh
                     Mesh caveface = MeshTools.findIntersection(slice, c);
                     if (caveface == null)
                     {
                         return;
                     }
                     MeshTools.matchOrientation(slice, ref caveface);
                     c.setSkinCell(caveface);
                 }
             }
         }
     }
 }