Example #1
0
Gui::MenuItem* Workbench::setupMenuBar() const
{
    Gui::MenuItem* root = StdWorkbench::setupMenuBar();
    Gui::MenuItem* item = root->findItem("&Windows");

// == Profile menu ==========================================
    Gui::MenuItem* profile = new Gui::MenuItem;
    root->insertItem(item, profile);
    profile->setCommand("P&rofiles");

    *profile << "Sketcher_ProfilesHexagon1";

// == Sketcher menu ==========================================

    Gui::MenuItem* sketch = new Gui::MenuItem;
    root->insertItem(profile, sketch);
    sketch->setCommand("S&ketch");
    Gui::MenuItem* geom = new Gui::MenuItem();
    geom->setCommand("Sketcher geometries");
    addSketcherWorkbenchGeometries( *geom );

    Gui::MenuItem* cons = new Gui::MenuItem();
    cons->setCommand("Sketcher constraints");
    addSketcherWorkbenchConstraints(*cons);


    addSketcherWorkbenchSketchActions( *sketch );
    *sketch << geom
            << cons;

    return root;
}
Example #2
0
Gui::MenuItem* Workbench::setupMenuBar() const
{
    Gui::MenuItem* root = StdWorkbench::setupMenuBar();
    Gui::MenuItem* item = root->findItem("&Windows");


    Gui::MenuItem* asmCmd = new Gui::MenuItem();
    root->insertItem(item, asmCmd);
    asmCmd->setCommand("&Assembly");
    *asmCmd 
		
		//<< "Assembly_ConstraintFix"
	 //   << "Assembly_ConstraintDistance"
	 //   << "Assembly_ConstraintOrientation"
	 //   << "Assembly_ConstraintAngle"
	 //   << "Assembly_ConstraintCoincidence"
	 //   << "Assembly_ConstraintAlignment"
            << "Separator"
            << "Assembly_AddNewPart"
            << "Assembly_AddNewComponent"
            << "Assembly_AddExistingComponent";

    Gui::MenuItem* impCmd = new Gui::MenuItem();
    root->insertItem(asmCmd, impCmd);
    impCmd->setCommand("&Import");
    *impCmd << "Assembly_Import";


    return root;
}
Example #3
0
Gui::MenuItem* Workbench::setupMenuBar() const
{
    Gui::MenuItem* root = StdWorkbench::setupMenuBar();
    Gui::MenuItem* item = root->findItem("&Windows");

    Gui::MenuItem* prim = new Gui::MenuItem;
    prim->setCommand("Primitives");
	*prim << "Part_Box" << "Part_Box20" << "Part_Fractal" << "Part_Cylinder" << "Part_Sphere"
          << "Part_Cone" << "Part_Torus";

    Gui::MenuItem* bop = new Gui::MenuItem;
    bop->setCommand("Boolean");
    *bop << "Part_Boolean" << "Part_Cut" << "Part_Fuse" << "Part_Common";
    

    Gui::MenuItem* part = new Gui::MenuItem;
    root->insertItem(item, part);
    part->setCommand("&Part");
    *part << "Part_Import" << "Part_Export" << "Separator";
    *part << prim << "Part_Primitives" << "Part_Builder" << "Separator"
          << "Part_ShapeFromMesh" << "Part_MakeSolid" << "Part_ReverseShape"
          << "Part_SimpleCopy" << "Part_RefineShape" << "Part_CheckGeometry"
	      << "Separator" << bop << "Separator"
          << "Part_CrossSections" << "Part_Compound" << "Part_Extrude"
          << "Part_Revolve" << "Part_Mirror" << "Part_Fillet" << "Part_Chamfer"
          << "Part_RuledSurface" << "Part_Loft" << "Part_Sweep"
          << "Part_Offset" << "Part_Thickness";

    Gui::MenuItem* measure = new Gui::MenuItem;
    root->insertItem(item,measure);
    measure->setCommand("Measure");
    *measure << "Part_Measure_Linear" << "Part_Measure_Angular" << "Separator" << "Part_Measure_Clear_All" << "Part_Measure_Toggle_All" <<
      "Part_Measure_Toggle_3d" << "Part_Measure_Toggle_Delta";

    // leave this for 0.14 until #0000477 is fixed
#if 0
    Gui::MenuItem* view = root->findItem("&View");
    if (view) {
        Gui::MenuItem* appr = view->findItem("Std_RandomColor");
        appr = view->afterItem(appr);
        Gui::MenuItem* face = new Gui::MenuItem();
        face->setCommand("Part_ColorPerFace");
        view->insertItem(appr, face);
    }
#endif

    return root;
}
Example #4
0
Gui::MenuItem* Workbench::setupMenuBar() const
{
    Gui::MenuItem* root = StdWorkbench::setupMenuBar();
    Gui::MenuItem* item = root->findItem("&Windows");
    Gui::MenuItem* mesh = new Gui::MenuItem;
    root->insertItem( item, mesh );

    // analyze
    Gui::MenuItem* analyze = new Gui::MenuItem;
    analyze->setCommand("Analyze");
    *analyze << "Mesh_Evaluation" << "Mesh_EvaluateFacet" << "Mesh_CurvatureInfo" << "Separator" 
             << "Mesh_EvaluateSolid" << "Mesh_BoundingBox";

    // boolean
    Gui::MenuItem* boolean = new Gui::MenuItem;
    boolean->setCommand("Boolean");
    *boolean << "Mesh_Union" << "Mesh_Intersection" << "Mesh_Difference";
 
    mesh->setCommand("&Meshes");
    *mesh << "Mesh_Import" << "Mesh_Export" << "Mesh_FromGeometry" << "Separator"
          << analyze << "Mesh_HarmonizeNormals" << "Mesh_FlipNormals" << "Separator" 
          << "Mesh_FillupHoles" << "Mesh_FillInteractiveHole" << "Mesh_RemoveComponents"
          << "Mesh_RemoveCompByHand" << "Mesh_AddFacet" << "Mesh_Smoothing" << "Separator" 
          << "Mesh_BuildRegularSolid" << boolean << "Separator" << "Mesh_PolySelect" << "Mesh_PolyCut"
          << "Mesh_PolySplit" << "Mesh_PolySegm" << "Mesh_PolyTrim" << "Mesh_VertexCurvature";
    return root;
}
Example #5
0
Gui::MenuItem* Workbench::setupMenuBar() const
{
    Gui::MenuItem* root = StdWorkbench::setupMenuBar();
    Gui::MenuItem* item = root->findItem("&Windows");
    Gui::MenuItem* fem = new Gui::MenuItem;
    root->insertItem(item, fem);
    fem->setCommand("&FEM");
    *fem << "Fem_NewMechanicalAnalysis"
         << "Fem_CreateFromShape"
         << "Fem_MechanicalMaterial"
         << "Fem_BeamSection"
         << "Fem_ShellThickness"
         << "Separator"
         << "Fem_CreateNodesSet"
         << "Separator"
         << "Fem_ConstraintFixed"
         << "Fem_ConstraintForce"
         << "Fem_ConstraintPressure"
         << "Fem_ConstraintBearing"
         << "Fem_ConstraintGear"   
         << "Fem_ConstraintPulley"
         << "Separator"
         << "Fem_MechanicalJobControl"
         << "Fem_Quick_Analysis"
         << "Fem_PurgeResults"
         << "Fem_ShowResult";

    return root;
}
Example #6
0
Gui::MenuItem* Workbench::setupMenuBar() const
{
    Gui::MenuItem* root = StdWorkbench::setupMenuBar();
    Gui::MenuItem* item = root->findItem("&Windows");

    Gui::MenuItem* ray = new Gui::MenuItem;
    root->insertItem(item, ray);

    // utilities
    Gui::MenuItem* utilities = new Gui::MenuItem;
    utilities->setCommand("Utilities");
    *utilities
            << "Raytracing_WriteView"
            << "Raytracing_WriteCamera"
            << "Raytracing_WritePart";

    ray->setCommand("&Raytracing");
    *ray
            << utilities
            << "Raytracing_NewPovrayProject"
            << "Raytracing_NewLuxProject"
            << "Raytracing_NewPartSegment"
            << "Raytracing_ResetCamera"
            << "Raytracing_ExportProject"
            << "Raytracing_Render";

    return root;
}
Gui::MenuItem* Workbench::setupMenuBar() const
{
    Gui::MenuItem* root = StdWorkbench::setupMenuBar();
    Gui::MenuItem* item = root->findItem("&Windows");

    Gui::MenuItem* sketch = new Gui::MenuItem;
    root->insertItem(item, sketch);
    sketch->setCommand("S&ketch");
    Gui::MenuItem* geom = new Gui::MenuItem();
    geom->setCommand("Sketcher geometries");
    *geom << "Sketcher_CreatePoint"
          << "Sketcher_CreateArc"
          << "Sketcher_Create3PointArc"
          << "Sketcher_CreateCircle"
          << "Sketcher_CreateLine"
          << "Sketcher_CreatePolyline"
          << "Sketcher_CreateRectangle"
          << "Separator"
          << "Sketcher_CreateFillet"
          << "Sketcher_Trimming"
          << "Sketcher_External"
          << "Sketcher_ToggleConstruction"
          /*<< "Sketcher_CreateText"*/
          /*<< "Sketcher_CreateDraftLine"*/;

    Gui::MenuItem* cons = new Gui::MenuItem();
    cons->setCommand("Sketcher constraints");
    *cons << "Sketcher_ConstrainCoincident"
          << "Sketcher_ConstrainPointOnObject"
          << "Sketcher_ConstrainVertical"
          << "Sketcher_ConstrainHorizontal"
          << "Sketcher_ConstrainParallel"
          << "Sketcher_ConstrainPerpendicular"
          << "Sketcher_ConstrainTangent"
          << "Sketcher_ConstrainEqual"
          << "Sketcher_ConstrainSymmetric"
          << "Separator"
          << "Sketcher_ConstrainLock"
          << "Sketcher_ConstrainDistanceX"
          << "Sketcher_ConstrainDistanceY"
          << "Sketcher_ConstrainDistance"
          << "Sketcher_ConstrainRadius"
          << "Sketcher_ConstrainAngle";

    *sketch
        << "Sketcher_NewSketch"
        << "Sketcher_LeaveSketch"
        << "Sketcher_ViewSketch"
        << "Sketcher_MapSketch"
        << "Sketcher_ReorientSketch"
        << "Sketcher_ValidateSketch"
        << geom
        << cons
    ;

    return root;
}
Gui::MenuItem* Workbench::setupMenuBar() const
{

    Gui::MenuItem* root = StdWorkbench::setupMenuBar();
    Gui::MenuItem* item = root->findItem( "&Windows" );

    Gui::MenuItem* make = new Gui::MenuItem;
    root->insertItem( item, make );
    make->setCommand("MakeSurface");
    *make << "SurfaceTools_Filling";

    Gui::MenuItem* mod = new Gui::MenuItem;
    root->insertItem( item, mod );
    mod->setCommand("ModSurface");
    *mod << "SurfaceTools_Cut";

    return root;
}
Example #9
0
Gui::MenuItem* Workbench::setupMenuBar() const
{
    Gui::MenuItem* root = StdWorkbench::setupMenuBar();
    Gui::MenuItem* item = root->findItem("&Windows");
    Gui::MenuItem* cam = new Gui::MenuItem;
    root->insertItem(item, cam);
    cam->setCommand(QT_TR_NOOP("&Cam"));
    *cam /*<< "Cam_ShapeInfo"*/ << "Cam_Cutting";
    return root;
}
Example #10
0
Gui::MenuItem* Workbench::setupMenuBar() const
{
    Gui::MenuItem* root = StdWorkbench::setupMenuBar();
    Gui::MenuItem* item = root->findItem("&Windows");
    Gui::MenuItem* test = new Gui::MenuItem;
    root->insertItem(item, test);
    Gui::MenuItem* threads = new Gui::MenuItem;
    threads->setCommand("Python Threads");
    *threads << "Sandbox_PythonLockThread" << "Sandbox_NolockPython"
             << "Sandbox_PyQtThread" << "Sandbox_PythonThread" << "Sandbox_PythonMainThread";
    test->setCommand("Threads");
    *test << "Sandbox_Thread" << "Sandbox_TestThread" << "Sandbox_SaveThread"
          << "Sandbox_WorkerThread" << "Sandbox_SeqThread"
          << "Sandbox_BlockThread" << "Sandbox_NoThread" << threads << "Separator"
          << "Sandbox_Dialog" << "Sandbox_FileDialog";
    Gui::MenuItem* misc = new Gui::MenuItem;
    root->insertItem(item, misc);
    misc->setCommand("Misc");
    *misc << "Sandbox_EventLoop" << "Sandbox_MeshLoad"
          << "Sandbox_MeshLoaderBoost"
          << "Sandbox_MeshLoaderFuture"
          << "Sandbox_MeshTestJob"
          << "Sandbox_MeshTestRef"
          << "Sandbox_CryptographicHash"
          << "Sandbox_MengerSponge";

    Gui::MenuItem* widg = new Gui::MenuItem;
    root->insertItem(item, widg);
    widg->setCommand("Widgets");
    *widg << "Std_GrabWidget"
          << "Std_ImageNode"
          << "Sandbox_WidgetShape"
          << "Sandbox_GDIWidget"
          << "Sandbox_RedirectPaint"
          << "Std_TestGraphicsView"
          << "Std_TestTaskBox";
    return root;
}
Example #11
0
Gui::MenuItem* Workbench::setupMenuBar() const
{
    Gui::MenuItem* root = StdWorkbench::setupMenuBar();
    Gui::MenuItem* item = root->findItem("&Windows");
    Gui::MenuItem* pnts = new Gui::MenuItem;
    root->insertItem(item, pnts);

    Gui::MenuItem* test = new Gui::MenuItem;
    test->setCommand("Test");
    *test << "Points_Transform";
 
    pnts->setCommand("&Points");
    *pnts << test << "Separator" << "Points_Import" << "Points_Export" << "Separator" << "Points_PolyCut";
    return root;
}
Example #12
0
Gui::MenuItem* Workbench::setupMenuBar() const
{
    Gui::MenuItem* root = StdWorkbench::setupMenuBar();
    Gui::MenuItem* item = root->findItem("&Windows");
    Gui::MenuItem* robot = new Gui::MenuItem;
    root->insertItem( item, robot );

    // analyze
    Gui::MenuItem* insertRobots = new Gui::MenuItem;
    insertRobots->setCommand("Insert Robots");
    *insertRobots << "Robot_InsertKukaIR500" 
                  << "Robot_InsertKukaIR210" 
                  << "Robot_InsertKukaIR125" 
                  << "Robot_InsertKukaIR16" 
                  << "Separator"
                  << "Robot_AddToolShape"
                  ;

    // boolean
    Gui::MenuItem* exportM = new Gui::MenuItem;
    exportM->setCommand("Export trajectory");
    *exportM << "Robot_ExportKukaCompact" 
             << "Robot_ExportKukaFull"
             ;
 
    robot->setCommand("&Robot");
    *robot << insertRobots 
           << "Robot_CreateTrajectory"
           << "Separator"
           << "Robot_CreateTrajectory"
           << "Robot_InsertWaypoint"
           << "Robot_InsertWaypointPreselect"
           << "Robot_Edge2Trac"
           << "Separator"
           << "Robot_SetHomePos"
           << "Robot_RestoreHomePos"
           << "Separator"
           << "Robot_SetDefaultOrientation"
           << "Robot_SetDefaultValues"
           << "Separator"
           << "Robot_Simulate"
           << exportM
           ;
    return root;
}
Example #13
0
Gui::MenuItem* Workbench::setupMenuBar() const
{
    Gui::MenuItem* root = StdWorkbench::setupMenuBar();
    Gui::MenuItem* item = root->findItem("&Windows");
    Gui::MenuItem* reen = new Gui::MenuItem;
    root->insertItem(item, reen);
    reen->setCommand("&REEN");
    *reen << "Reen_ApproxPlane"
          << "Reen_ApproxSurface";

    Gui::MenuItem *reconstruct = new Gui::MenuItem();
    reconstruct->setCommand("Surface reconstruction");
    *reconstruct << "Reen_PoissonReconstruction"
                 << "Reen_ViewTriangulation";
    *reen << reconstruct;

    return root;
}
Example #14
0
Gui::MenuItem* Workbench::setupMenuBar() const
{
    Gui::MenuItem* root = StdWorkbench::setupMenuBar();
    Gui::MenuItem* item = root->findItem("&Windows");
    Gui::MenuItem* fem = new Gui::MenuItem;
    root->insertItem(item, fem);
    fem->setCommand("&FEM");
    *fem << "Fem_Analysis"
         << "Fem_SolverCalculix"
         << "Fem_SolverZ88"
         << "Fem_MeshFromShape"
         << "Fem_MechanicalMaterial"
         << "Fem_BeamSection"
         << "Fem_ShellThickness"
         << "Separator"
         << "Fem_CreateNodesSet"
         << "Separator"
         << "Fem_ConstraintFixed"
         << "Fem_ConstraintDisplacement"
         << "Fem_ConstraintPlaneRotation"
         << "Fem_ConstraintContact"
         << "Separator"
         << "Fem_ConstraintSelfWeight"
         << "Fem_ConstraintForce"
         << "Fem_ConstraintPressure"
         << "Separator"
         << "Fem_ConstraintBearing"
         << "Fem_ConstraintGear"
         << "Fem_ConstraintPulley"
         << "Separator"
         << "Fem_ConstraintFluidBoundary"
         << "Separator"
         << "Fem_ConstraintTemperature"
         << "Fem_ConstraintHeatflux"
         << "Fem_ConstraintInitialTemperature"
         << "Separator"
         << "Fem_ControlSolver"
         << "Fem_RunSolver"
         << "Separator"
         << "Fem_PurgeResults"
         << "Fem_ShowResult";

    return root;
}
Example #15
0
Gui::MenuItem *Workbench::setupMenuBar() const
{
    Gui::MenuItem* root = StdWorkbench::setupMenuBar();
    Gui::MenuItem* item = root->findItem("&Windows");

    Gui::MenuItem* spreadsheet = new Gui::MenuItem;
    root->insertItem(item, spreadsheet);

    // utilities
    Gui::MenuItem* alignments = new Gui::MenuItem;
    alignments->setCommand("&Alignment");
    *alignments
            << "Spreadsheet_AlignLeft"
            << "Spreadsheet_AlignCenter"
            << "Spreadsheet_AlignRight"
            << "Spreadsheet_AlignTop"
            << "Spreadsheet_AlignVCenter"
            << "Spreadsheet_AlignBottom"
               ;

    Gui::MenuItem* styles = new Gui::MenuItem;
    styles->setCommand("&Styles");
    *styles
            << "Spreadsheet_StyleBold"
            << "Spreadsheet_StyleItalic"
            << "Spreadsheet_StyleUnderline"
               ;

    spreadsheet->setCommand("&Spreadsheet");
    *spreadsheet << "Spreadsheet_CreateSheet"
          << "Separator"
          << "Spreadsheet_Import"
          << "Spreadsheet_Export"
          << "Separator"
          << "Spreadsheet_MergeCells"
          << "Spreadsheet_SplitCell"
          << "Separator"
          << alignments
          << styles
             ;

    return root;
}
Gui::MenuItem* Workbench::setupMenuBar() const
{
    Gui::MenuItem* root = StdWorkbench::setupMenuBar();
    Gui::MenuItem* item = root->findItem("&Windows");
    Gui::MenuItem* fem = new Gui::MenuItem;
    root->insertItem(item, fem);
    fem->setCommand("&FEM");
    *fem << "Fem_CreateFromShape"
		 << "Fem_MechanicalMaterial"
		 << "Fem_NewMechanicalAnalysis"
		 << "Fem_MechanicalJobControl"
         << "Fem_CreateNodesSet"
	     << "Fem_ConstraintFixed"
         << "Fem_ConstraintForce"
         << "Fem_ConstraintBearing"
         << "Fem_ConstraintGear"   
         << "Fem_ConstraintPulley";

    return root;
}
Example #17
0
Gui::MenuItem* Workbench::setupMenuBar() const
{
    Gui::MenuItem* root = StdWorkbench::setupMenuBar();
    Gui::MenuItem* item = root->findItem("&Windows");

    Gui::MenuItem* prim = new Gui::MenuItem;
    prim->setCommand("Primitives");
    *prim << "Part_Box" << "Part_Cylinder" << "Part_Sphere"
          << "Part_Cone" << "Part_Torus";

    Gui::MenuItem* part = new Gui::MenuItem;
    root->insertItem(item, part);
    part->setCommand("&Part");
    *part << "Part_Import" << "Part_Export" << "Separator";
    *part << prim << "Part_Primitives" << "Part_Builder" << "Separator"
          << "Part_ShapeFromMesh" << "Part_MakeSolid" << "Part_ReverseShape"
          << "Part_SimpleCopy" << "Part_RefineShape" << "Separator"
          << "Part_Boolean" << "Part_CrossSections" << "Part_Extrude"
          << "Part_Revolve" << "Part_Mirror" << "Part_Fillet" << "Part_Chamfer"
          << "Part_RuledSurface" << "Part_Loft" << "Part_Sweep";

    return root;
}
Example #18
0
Gui::MenuItem* Workbench::setupMenuBar() const
{
    Gui::MenuItem* root = StdWorkbench::setupMenuBar();
    Gui::MenuItem* item = root->findItem("&Windows");

    Gui::MenuItem* part = new Gui::MenuItem;
    root->insertItem(item, part);
    part->setCommand("Drawing");
    *part << "Drawing_Open";
    //*part << "Drawing_NewA3Landscape";
    *part << "Drawing_NewPage";
    *part << "Drawing_NewView";
    *part << "Drawing_OrthoViews";
    *part << "Drawing_OpenBrowserView";
    *part << "Drawing_Annotation";
    *part << "Drawing_Clip";
    *part << "Drawing_Symbol";
    *part << "Drawing_ExportPage";
    *part << "Separator";
    *part << "Drawing_ProjectShape";

    return root;
}
Gui::MenuItem* Workbench::setupMenuBar() const
{
    Gui::MenuItem* root = StdWorkbench::setupMenuBar();
    Gui::MenuItem* item = root->findItem("&Windows");

    Gui::MenuItem* part = new Gui::MenuItem;
    root->insertItem(item, part);
    part->setCommand("&Part Design");
    *part << "PartDesign_Part"
          << "PartDesign_Body"
          << "PartDesign_NewSketch"
          << "Sketcher_LeaveSketch"
          << "Sketcher_ViewSketch"
          << "Sketcher_MapSketch"
          << "Sketcher_ReorientSketch"
          << "Sketcher_ValidateSketch"
          << "Separator"
          << "PartDesign_Point"
          << "PartDesign_Line"
          << "PartDesign_Plane"
          << "PartDesign_ShapeBinder"
          << "Separator"
          << "PartDesign_Pad"         
          << "PartDesign_Revolution"          
          << "PartDesign_AdditiveLoft"
          << "PartDesign_AdditivePipe"          
          << "PartDesign_CompPrimitiveAdditive"
          << "Separator"
          << "PartDesign_Pocket"
          << "PartDesign_Groove"
          << "PartDesign_SubtractiveLoft"
          << "PartDesign_SubtractivePipe"
          << "PartDesign_CompPrimitiveSubtractive"
          << "Separator"
          << "PartDesign_Mirrored"
          << "PartDesign_LinearPattern"
          << "PartDesign_PolarPattern"
//          << "PartDesign_Scaled"
          << "PartDesign_MultiTransform"
          << "Separator"
          << "PartDesign_Fillet"
          << "PartDesign_Chamfer"
          << "PartDesign_Draft"
          << "PartDesign_Thickness"
          << "Separator"
          << "PartDesign_Boolean"
          << "Separator"
          //<< "PartDesign_Hole"
          << "PartDesign_InvoluteGear"
          << "Separator"
          << "PartDesign_Migrate";

    // For 0.13 a couple of python packages like numpy, matplotlib and others
    // are not deployed with the installer on Windows. Thus, the WizardShaft is
    // not deployed either hence the check for the existence of the command.
    if (Gui::Application::Instance->commandManager().getCommandByName("PartDesign_InvoluteGear")) {
        *part << "PartDesign_InvoluteGear";
    }
    if (Gui::Application::Instance->commandManager().getCommandByName("PartDesign_WizardShaft")) {
        *part << "Separator" << "PartDesign_WizardShaft";
    }

    // Replace the "Duplicate selection" menu item with a replacement that is compatible with Body
    item = root->findItem("&Edit");
    Gui::MenuItem* dup = item->findItem("Std_DuplicateSelection");
    dup->setCommand("PartDesign_DuplicateSelection");

    return root;
}
Example #20
0
Gui::MenuItem* Workbench::setupMenuBar() const
{
    Gui::MenuItem* root = StdWorkbench::setupMenuBar();
    Gui::MenuItem* item = root->findItem("&Windows");

    Gui::MenuItem* mech = new Gui::MenuItem;
    mech->setCommand("&Mechanical Constraints");
    *mech << "FEM_ConstraintFixed"
          << "FEM_ConstraintDisplacement"
          << "FEM_ConstraintPlaneRotation"
          << "FEM_ConstraintContact"
          << "FEM_ConstraintTransform"
          << "Separator"
          << "FEM_ConstraintForce"
          << "FEM_ConstraintPressure"
          << "FEM_ConstraintSelfWeight"
          << "Separator"
          << "FEM_ConstraintBearing"
          << "FEM_ConstraintGear"
          << "FEM_ConstraintPulley";

    Gui::MenuItem* thermal = new Gui::MenuItem;
    thermal->setCommand("&Thermal Constraints");
    *thermal << "FEM_ConstraintInitialTemperature"
             << "Separator"
             << "FEM_ConstraintHeatflux"
             << "FEM_ConstraintTemperature";

    Gui::MenuItem* fluid = new Gui::MenuItem;
    fluid->setCommand("&Fluid Constraints");
    *fluid << "FEM_ConstraintFluidBoundary";

    Gui::MenuItem* model = new Gui::MenuItem;
    root->insertItem(item, model);
    model->setCommand("M&odel");
    *model << "FEM_Analysis"
           << "Separator"
           << "FEM_MaterialSolid"
           << "FEM_MaterialFluid"
           << "FEM_MaterialMechanicalNonlinear"
           << "FEM_ElementGeometry1D"
           << "FEM_ElementGeometry2D"
           << "FEM_ElementFluid1D"
           << "Separator"
           << mech
           << thermal
           << fluid;

    Gui::MenuItem* mesh = new Gui::MenuItem;
    root->insertItem(item, mesh);
    mesh->setCommand("M&esh");
    *mesh << "FEM_MeshNetgenFromShape"
          << "FEM_MeshGmshFromShape"
          << "Separator"
          << "FEM_MeshBoundaryLayer"
          << "FEM_MeshRegion"
          << "FEM_MeshGroup"
          << "Separator"
          << "FEM_CreateNodesSet"
          << "FEM_FEMMesh2Mesh";

    Gui::MenuItem* solve = new Gui::MenuItem;
    root->insertItem(item, solve);
    solve->setCommand("&Solve");
    *solve << "FEM_SolverCalculix"
           << "FEM_SolverZ88"
           << "Separator"
           << "FEM_SolverControl"
           << "FEM_SolverRun";

    Gui::MenuItem* results = new Gui::MenuItem;
    root->insertItem(item, results);
    results->setCommand("&Results");
    *results << "FEM_ResultsPurge"
             << "FEM_ResultShow"
             << "Separator"
             << "FEM_PostApplyChanges"
             << "FEM_PostPipelineFromResult"
             << "Separator"
             << "FEM_PostCreateClipFilter"
             << "FEM_PostCreateScalarClipFilter"
             << "FEM_PostCreateCutFilter"
             << "FEM_PostCreateWarpVectorFilter"
             << "FEM_PostCreateDataAlongLineFilter"
             << "FEM_PostCreateLinearizedStressesFilter"
             << "Separator"
             << "FEM_PostCreateFunctions";

    return root;
}
Gui::MenuItem* Workbench::setupMenuBar() const
{
    Gui::MenuItem* root = StdWorkbench::setupMenuBar();
    Gui::MenuItem* item = root->findItem("&Windows");

    Gui::MenuItem* geom = new Gui::MenuItem();
    geom->setCommand("Sketcher geometries");
    *geom << "Sketcher_CreatePoint"
          << "Sketcher_CreateArc"
          << "Sketcher_CreateCircle"
          << "Sketcher_CreateLine"
          << "Sketcher_CreatePolyline"
          << "Sketcher_CreateRectangle"
          << "Separator"
          << "Sketcher_CreateFillet"
          << "Sketcher_Trimming"
          << "Sketcher_External"
          << "Sketcher_ToggleConstruction"
          /*<< "Sketcher_CreateText"*/
          /*<< "Sketcher_CreateDraftLine"*/;

    Gui::MenuItem* cons = new Gui::MenuItem();
    cons->setCommand("Sketcher constraints");
    *cons << "Sketcher_ConstrainCoincident"
          << "Sketcher_ConstrainPointOnObject"
          << "Sketcher_ConstrainVertical"
          << "Sketcher_ConstrainHorizontal"
          << "Sketcher_ConstrainParallel"
          << "Sketcher_ConstrainPerpendicular"
          << "Sketcher_ConstrainTangent"
          << "Sketcher_ConstrainEqual"
          << "Sketcher_ConstrainSymmetric"
          << "Separator"
          << "Sketcher_ConstrainLock"
          << "Sketcher_ConstrainDistanceX"
          << "Sketcher_ConstrainDistanceY"
          << "Sketcher_ConstrainDistance"
          << "Sketcher_ConstrainRadius"
          << "Sketcher_ConstrainAngle";

    Gui::MenuItem* part = new Gui::MenuItem;
    root->insertItem(item, part);
    part->setCommand("&Part Design");
    *part << "Sketcher_NewSketch"
          << "Sketcher_LeaveSketch"
          << "Sketcher_ViewSketch"
          << "Sketcher_MapSketch"
          << "Sketcher_ReorientSketch"
          << "Sketcher_ValidateSketch"
          << geom
          << cons
          << "Separator"
          << "PartDesign_Pad"
          << "PartDesign_Pocket"
          << "PartDesign_Revolution"
          << "PartDesign_Groove"
          << "PartDesign_Fillet"
          << "PartDesign_Chamfer"
          << "PartDesign_Draft"
          << "PartDesign_Mirrored"
          << "PartDesign_LinearPattern"
          << "PartDesign_PolarPattern"
//          << "PartDesign_Scaled"
          << "PartDesign_MultiTransform";
    // For 0.13 a couple of python packages like numpy, matplotlib and others
    // are not deployed with the installer on Windows. Thus, the WizardShaft is
    // not deployed either hence the check for the existence of the command.
    if (Gui::Application::Instance->commandManager().getCommandByName("PartDesign_WizardShaft")) {
        *part << "Separator" << "PartDesign_WizardShaft";
    }

    return root;
}
Example #22
0
Gui::MenuItem* Workbench::setupMenuBar() const
{
    Gui::MenuItem* root = StdWorkbench::setupMenuBar();
    Gui::MenuItem* item = root->findItem("&Windows");

    Gui::MenuItem* material = new Gui::MenuItem;
    material->setCommand("Materials");
    *material << "FEM_MaterialSolid"
              << "FEM_MaterialFluid"
              << "FEM_MaterialMechanicalNonlinear"
              << "FEM_MaterialEditor";

    Gui::MenuItem* elec = new Gui::MenuItem;
    elec->setCommand("&Electrostatic Constraints");
    *elec << "FEM_ConstraintElectrostaticPotential";

    Gui::MenuItem* elegeom = new Gui::MenuItem;
    elegeom->setCommand("&Element Geometry");
    *elegeom << "FEM_ElementGeometry1D"
             << "FEM_ElementRotation1D"
             << "FEM_ElementGeometry2D"
             << "FEM_ElementFluid1D";

    Gui::MenuItem* mech = new Gui::MenuItem;
    mech->setCommand("&Mechanical Constraints");
    *mech << "FEM_ConstraintFixed"
          << "FEM_ConstraintDisplacement"
          << "FEM_ConstraintPlaneRotation"
          << "FEM_ConstraintContact"
          << "FEM_ConstraintTransform"
          << "Separator"
          << "FEM_ConstraintForce"
          << "FEM_ConstraintPressure"
          << "FEM_ConstraintSelfWeight"
          << "Separator"
          << "FEM_ConstraintBearing"
          << "FEM_ConstraintGear"
          << "FEM_ConstraintPulley";

    Gui::MenuItem* thermal = new Gui::MenuItem;
    thermal->setCommand("&Thermal Constraints");
    *thermal << "FEM_ConstraintInitialTemperature"
             << "Separator"
             << "FEM_ConstraintHeatflux"
             << "FEM_ConstraintTemperature"
             << "FEM_ConstraintBodyHeatSource";

    Gui::MenuItem* fluid = new Gui::MenuItem;
    fluid->setCommand("&Fluid Constraints");
    *fluid << "FEM_ConstraintInitialFlowVelocity"
           << "Separator"
           << "FEM_ConstraintFluidBoundary"
           << "FEM_ConstraintFlowVelocity";

    Gui::MenuItem* model = new Gui::MenuItem;
    root->insertItem(item, model);
    model->setCommand("M&odel");
    *model << "FEM_Analysis"
           << "Separator"
           << material
           << elegeom
           << "Separator"
           << elec
           << fluid
           << mech
           << thermal;

    Gui::MenuItem* mesh = new Gui::MenuItem;
    root->insertItem(item, mesh);
    mesh->setCommand("M&esh");
#ifdef FCWithNetgen
     *mesh << "FEM_MeshNetgenFromShape";
#endif
     *mesh << "FEM_MeshGmshFromShape"
           << "Separator"
           << "FEM_MeshBoundaryLayer"
           << "FEM_MeshRegion"
           << "FEM_MeshGroup"
           << "Separator"
           << "FEM_CreateNodesSet"
           << "FEM_FEMMesh2Mesh";

    Gui::MenuItem* solve = new Gui::MenuItem;
    root->insertItem(item, solve);
    solve->setCommand("&Solve");
    *solve << "FEM_SolverCalculixCxxtools"
           << "FEM_SolverCalculiX"
           << "FEM_SolverElmer"
           << "FEM_SolverZ88"
           << "Separator"
           << "FEM_EquationHeat"
           << "FEM_EquationElasticity"
           << "FEM_EquationElectrostatic"
           << "FEM_EquationFluxsolver"
           << "FEM_EquationFlow"
           << "Separator"
           << "FEM_SolverControl"
           << "FEM_SolverRun";

    Gui::MenuItem* results = new Gui::MenuItem;
    root->insertItem(item, results);
    results->setCommand("&Results");
    *results << "FEM_ResultsPurge"
             << "FEM_ResultShow";
#ifdef FC_USE_VTK
    *results << "Separator"
             << "FEM_PostApplyChanges"
             << "FEM_PostPipelineFromResult"
             << "Separator"
             << "FEM_PostCreateWarpVectorFilter"
             << "FEM_PostCreateScalarClipFilter"
             << "FEM_PostCreateCutFilter"
             << "FEM_PostCreateClipFilter"
             << "FEM_PostCreateDataAlongLineFilter"
             << "FEM_PostCreateLinearizedStressesFilter"
             << "FEM_PostCreateDataAtPointFilter"
             << "Separator"
             << "FEM_PostCreateFunctions";
#endif

    Gui::MenuItem* utils = new Gui::MenuItem;
    root->insertItem(item, utils);
    utils->setCommand("Utilities");
    *utils << "FEM_ClippingPlaneAdd"
           << "FEM_ClippingPlaneRemoveAll";

    return root;
}