Exemple #1
0
    protected override void OnActivate()
    {
        StopTool();
        var data = DetailEditor.instance.WriteXml();

        NoteCADJS.SaveData(data, "NoteCADFile.xml", "xml");
    }
    protected override void OnActivate()
    {
        StopTool();
        var data = DetailEditor.instance.ExportSTL();

        NoteCADJS.SaveData(data, "NoteCADExport.stl", "stl");
    }
    protected override void OnActivate()
    {
        StopTool();
        var data = DetailEditor.instance.ExportCurrentSTL();

        if (data == "")
        {
            return;
        }
        NoteCADJS.SaveData(data, "NoteCADExport.stl");
    }
Exemple #4
0
    protected override void OnActivate()
    {
        if (!(DetailEditor.instance.activeFeature is SliceFeature))
        {
            message = "SliceFeature should be activated!";
            return;
        }
        var feature = DetailEditor.instance.activeFeature as SliceFeature;

        message = "Generating GCode...";
        StartCoroutine(feature.GenerateGCode(
                           progress => {
            message = progress.stage + " " + progress.current + "/" + progress.total + "(" + Mathf.Floor((float)progress.current / progress.total * 100f) + "%)";
            //Debug.Log(message);
        },
                           data => {
            NoteCADJS.SaveData(data, "NoteCAMFile.gcode", "gcode");
            message = "";
            StopTool();
        }
                           ));
    }