MeshFlattening: add function to unwrap mesh

This commit is contained in:
looooo
2017-10-03 22:52:49 +02:00
committed by wmayer
parent e1247dcb48
commit 2329ac38e8
5 changed files with 44 additions and 25 deletions

View File

@@ -112,6 +112,13 @@ PyMOD_INIT_FUNC(MeshGui)
// instantiating the commands
CreateMeshCommands();
(void)new MeshGui::CleanupHandler;
// try to instantiate flat-mesh commands
try{
Base::Interpreter().runString("import MeshFlatteningCommand");
} catch (Base::PyException &err){
err.ReportException();
}
// register preferences pages
(void)new Gui::PrefPageProducer<MeshGui::DlgSettingsMeshView> ("Display");

View File

@@ -193,7 +193,7 @@ Gui::MenuItem* Workbench::setupMenuBar() const
<< "Mesh_Merge" << "Mesh_PolySelect" << "Mesh_PolyCut"
<< "Mesh_PolySplit" << "Mesh_PolySegm" << "Mesh_PolyTrim" << "Separator"
<< "Mesh_TrimByPlane" << "Mesh_SectionByPlane" << "Mesh_Segmentation"
<< "Mesh_VertexCurvature";
<< "Mesh_VertexCurvature" << "CreateFlatMesh";
return root;
}

View File

@@ -39,13 +39,8 @@ class MeshWorkbench (Workbench):
def Initialize(self):
import Mesh
import MeshGui
# try:
import MeshFlatteningCommand
toolbar = MeshFlatteningCommand.initialize()
self.appendToolbar(toolbar)
# except ImportError:
# import FreeCAD as app
# app.Message("MeshPart not found")
def GetClassName(self):
return "MeshGui::Workbench"