private void smooth_groups_test() { mm.RemoteControl rc = new mm.RemoteControl(); rc.Initialize(); List <int> o = get_selected_objects(rc); int id = o[0]; StoredCommands sc = new StoredCommands(); uint key1 = sc.AppendSceneCommand_ListFaceGroups(id); rc.ExecuteCommands(sc); vectori groupv = new vectori(); sc.GetSceneCommandResult_ListFaceGroups(key1, groupv); var vGroups = groupv.ToList(); foreach (int g in vGroups) { StoredCommands cmd = new StoredCommands(); vectori v = new vectori() { g }; cmd.AppendSelectCommand_ByFaceGroups(v); cmd.AppendBeginToolCommand("smoothBoundary"); cmd.AppendToolParameterCommand("preserveGroupBorders", false); cmd.AppendToolParameterCommand("preserveBoundary", true); cmd.AppendCompleteToolCommand("accept"); cmd.AppendCompleteToolCommand("cancel"); rc.ExecuteCommands(cmd); } rc.Shutdown(); }
public void SelectObjects(List <int> vObjects) { StoredCommands sc = new StoredCommands(); vectori objs = new vectori(vObjects); sc.AppendSceneCommand_SelectObjects(objs); ExecuteCommands(sc); }
private List <int> get_selected_objects(mm.RemoteControl rc) { StoredCommands sc = new StoredCommands(); uint key = sc.AppendSceneCommand_ListSelectedObjects(); rc.ExecuteCommands(sc); vectori v = new vectori(); bool bOK = sc.GetSceneCommandResult_ListSelectedObjects(key, v); return(v.ToList()); }
public List <int> ListSelectedFaceGroups() { StoredCommands sc = new StoredCommands(); uint key = sc.AppendSelectCommand_ListSelectedFaceGroups(); ExecuteCommands(sc); vectori tmp = new vectori(); sc.GetSelectCommandResult_ListSelectedFaceGroups(key, tmp); return(tmp.ToList()); }
public List <int> ListNewFaceGroups() { StoredCommands sc = new StoredCommands(); uint key = sc.AppendToolQuery_NewGroups(); ExecuteCommands(sc); vectori newobjs = new vectori(); sc.GetToolQueryResult_NewGroups(key, newobjs); return(newobjs.ToList()); }
public List <int> ListSelectedObjects() { StoredCommands sc = new StoredCommands(); uint key = sc.AppendSceneCommand_ListSelectedObjects(); ExecuteCommands(sc); vectori newobjs = new vectori(); sc.GetSceneCommandResult_ListSelectedObjects(key, newobjs); return(newobjs.ToList()); }
public List <int> ImportFile(string sPath) { StoredCommands sc = new StoredCommands(); uint key = sc.AppendSceneCommand_AppendMeshFile(sPath); ExecuteCommands(sc); vectori objs = new vectori(); sc.GetSceneCommandResult_AppendMeshFile(key, objs); return(objs.ToList()); }