Ejemplo n.º 1
0
 /// <summary>
 /// build stl files from ring data
 /// </summary>
 /// <param name="correctedRingList"></param>
 /// <param name="flatFileName"></param>
 /// <param name="rolledFileName"></param>
 static void SaveRolledSTLFile(Barrel barrel, DataOutputOptions options, CylGridData correctedRingList, double unrollRadius, string fileName, IProgress <int> progress)
 {
     try
     {
         var v3rolledPtList = correctedRingList.AsCartGridData();
         var _flatStlFile   = new StlFile();
         var trimesh        = new TriMesh();
         trimesh.BuildFromGrid(v3rolledPtList);
         StlFile.SaveBinary(trimesh, fileName);
     }
     catch (Exception)
     {
         throw;
     }
 }
Ejemplo n.º 2
0
        static void SaveFlatSTLFile(Barrel barrel, DataOutputOptions options, CylGridData correctedRingList, double unrollRadius, string fileName, IProgress <int> progress)
        {
            try
            {
                Debug.WriteLine("writing STL file " + fileName);
                var _flatStlFile = new StlFile();


                var v3flatptList = DataUtil.UnrollCylinder(correctedRingList, options.SurfaceFileScaleFactor, unrollRadius);
                var trimesh      = new TriMesh();
                trimesh.BuildFromGrid(v3flatptList);
                StlFile.SaveBinary(trimesh, fileName);
            }
            catch (Exception)
            {
                throw;
            }
        }