Ejemplo n.º 1
0
        private void button2_Click(object sender, EventArgs e)
        {
            mm.RemoteControl rc = new mm.RemoteControl();
            rc.Initialize();

            // you could import a mesh using this command:
            //sc.AppendSceneCommand_AppendMeshFile(...);

            StoredCommands sc = new StoredCommands();

            // [RMS] select entire mesh
            sc.AppendBeginToolCommand("select");
            sc.AppendSelectCommand_All();
            // [RMS] start remesh tool
            sc.AppendBeginToolCommand("remesh");
            // [RMS] configure parameters
            sc.AppendToolParameterCommand("density", 0.2f);
            sc.AppendToolParameterCommand("smooth", 1.0f);
            // [RMS] accept result
            sc.AppendCompleteToolCommand("accept");
            sc.AppendCompleteToolCommand("cancel");     // [RMS] to exit out of selection

            rc.ExecuteCommands(sc);

            // you could export result using this command
            //sc.AppendSceneCommand_ExportMeshFile_CurrentSelection(...);

            rc.Shutdown();
        }
Ejemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            mm.RemoteControl rc = new mm.RemoteControl();
            rc.Initialize();

            StoredCommands sc = new StoredCommands();

            sc.AppendBeginToolCommand("planeCut");
            sc.AppendCompleteToolCommand("accept");

            rc.ExecuteCommands(sc);

            rc.Shutdown();
        }
Ejemplo n.º 3
0
        private void brush_timer_elapsed(object sender, ElapsedEventArgs e)
        {
            float height = 0.1f;

            fAccumTime += fBrushTime;
            float r0 = 0.1f + fAccumTime * 0.02f;
            float r1 = 0.1f + (fAccumTime + fBrushTime) * 0.02f;
            float t0 = fAccumTime * 2.0f;
            float t1 = (fAccumTime + fBrushTime) * 2.0f;
            float x0 = r0 * (float)Math.Cos(t0); float y0 = r0 * (float)Math.Sin(t0);
            float x1 = r1 * (float)Math.Cos(t1); float y1 = r1 * (float)Math.Sin(t1);

            StoredCommands sc = new StoredCommands();
            vec3f          v0 = new vec3f(); v0.x = x0; v0.y = height; v0.z = y0;
            vec3f          v1 = new vec3f(); v1.x = x1; v1.y = height; v1.z = y1;

            sc.AppendActionCommand_LinearBrushStroke3D(v0, v1, 16);
            mmRemote.ExecuteCommands(sc);
        }