Beispiel #1
0
        private void modelToolStripMenuItem_Click(object sender, EventArgs e)
        {
            string resultName = FileIo.GetOpenFilename("Open a model File", "Stereolithography file (*.STL)|*.stl|OBJ file (*.OBJ)|*.obj|All files (*.*)|*.*");

            if (resultName != null)
            {
                Triangles triangles = RasterLib.RasterApi.StlToTriangles(resultName);
                Grid      grid      = RasterLib.RasterApi.CreateGrid(16, 16, 16, 4);
                RasterLib.RasterApi.Renderer.RenderTrianglesToGrid(triangles, grid);
                _hc = new DownSolver(grid, DownSolver.enables.QuickView);
                UpdateDisplay();
            }
        }
Beispiel #2
0
        private void openGlyphicsFileToolStripMenuItem_Click(object sender, EventArgs e)
        {
            string filename = FileIo.GetOpenFilename("Open a GlyphC File", "Glyphics file (*.GLYC)|*.glyc|All files (*.*)|*.*");

            if (filename != null && filename.Length > 1)
            {
                //filename = @"C:\Github\Glyphics2\Glyph Cores\Game.glyc";
                string strCode = RasterLib.RasterApi.ReadGlyc(filename);


                textBoxMain.Text = strCode;// strCode.Split('*')[0];
                textBoxMain.Text = textBoxMain.Text.Replace(";", "\r\n");

                strCode = Linearize(strCode);

//                strCode = strCode.Replace(';','\n');
                Code code = RasterLib.RasterApi.CreateCode(strCode);
                _hc = new DownSolver(code, DownSolver.enables.QuickView);
                UpdateDisplay();
            }
        }