+ For MeshGui remove dependency to MeshPartGui when loading the workbench
This commit is contained in:
parent
90af2d5c68
commit
df53ad49cf
|
@ -448,6 +448,32 @@ bool CmdMeshFromGeometry::isActive(void)
|
|||
return getSelection().countObjectsOfType(App::GeoFeature::getClassTypeId()) >= 1;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
// Mesh_FromPart
|
||||
//===========================================================================
|
||||
DEF_STD_CMD_A(CmdMeshFromPartShape);
|
||||
|
||||
CmdMeshFromPartShape::CmdMeshFromPartShape()
|
||||
: Command("Mesh_FromPartShape")
|
||||
{
|
||||
sAppModule = "Mesh";
|
||||
sGroup = QT_TR_NOOP("Mesh");
|
||||
sMenuText = QT_TR_NOOP("Create mesh from shape...");
|
||||
sToolTipText = QT_TR_NOOP("Tessellate shape");
|
||||
sWhatsThis = sToolTipText;
|
||||
sStatusTip = sToolTipText;
|
||||
}
|
||||
|
||||
void CmdMeshFromPartShape::activated(int iMsg)
|
||||
{
|
||||
doCommand(Doc,"import MeshPartGui, FreeCADGui\nFreeCADGui.runCommand('MeshPart_Mesher')\n");
|
||||
}
|
||||
|
||||
bool CmdMeshFromPartShape::isActive(void)
|
||||
{
|
||||
return (hasActiveDocument() && !Gui::Control().activeDialog());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
DEF_STD_CMD_A(CmdMeshVertexCurvature);
|
||||
|
@ -1542,5 +1568,6 @@ void CreateMeshCommands(void)
|
|||
rcCmdMgr.addCommand(new CmdMeshFillInteractiveHole());
|
||||
rcCmdMgr.addCommand(new CmdMeshRemoveCompByHand());
|
||||
rcCmdMgr.addCommand(new CmdMeshFromGeometry());
|
||||
rcCmdMgr.addCommand(new CmdMeshFromPartShape());
|
||||
rcCmdMgr.addCommand(new CmdMeshSegmentation());
|
||||
}
|
||||
|
|
|
@ -185,7 +185,7 @@ Gui::MenuItem* Workbench::setupMenuBar() const
|
|||
*boolean << "Mesh_Union" << "Mesh_Intersection" << "Mesh_Difference";
|
||||
|
||||
mesh->setCommand("&Meshes");
|
||||
*mesh << "Mesh_Import" << "Mesh_Export" << "MeshPart_Mesher" << "Separator"
|
||||
*mesh << "Mesh_Import" << "Mesh_Export" << "Mesh_FromPartShape" << "Separator"
|
||||
<< analyze << "Mesh_HarmonizeNormals" << "Mesh_FlipNormals" << "Separator"
|
||||
<< "Mesh_FillupHoles" << "Mesh_FillInteractiveHole" << "Mesh_RemoveComponents"
|
||||
<< "Mesh_RemoveCompByHand" << "Mesh_AddFacet" << "Mesh_Smoothing" << "Separator"
|
||||
|
|
|
@ -69,10 +69,6 @@ class MeshWorkbench ( Workbench ):
|
|||
def Initialize(self):
|
||||
# load the module
|
||||
import MeshGui
|
||||
try:
|
||||
import MeshPartGui
|
||||
except:
|
||||
pass
|
||||
def GetClassName(self):
|
||||
return "MeshGui::Workbench"
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user