def create_menu(): """Create the Hesperia menu.""" MenuData = [ ("&How To Use", howto), ("---", None), ("&Create Geometry", createGeometry), ("&Assign Properties", assignProperties), ("&Export Properties", exportProperties), ("&Select Properties", selectProperties), ("&Save Properties", saveProperties), ("&Read Properties", readProperties), ("---", None), ("&Create Frame Model", createFrameModel), ("&Create Shell Model", createShellModel), ("---", None), ("&Write Abaqus input file", createAbaqusInput), ("&Run Calpy Analysis", runCalpyAnalysis), ("&Show Calpy Results", postCalpy), ("---", None), ("&Close Menu", close_menu), ] return menu.Menu('Hesperia', items=MenuData, parent=pf.GUI.menu, before='help')
def create_menu(): """Create the Formex menu.""" MenuData = [ ("&Bbox", [ ('&Show Bbox Planes', showBbox), ('&Remove Bbox Planes', removeBbox), ]), ("&Transform", [ ("&Scale Selection", scaleSelection), ("&Scale non-uniformly", scale3Selection), ("&Translate", translateSelection), ("&Center", centerSelection), ("&Rotate", rotateSelection), ("&Rotate Around", rotateAround), ("&Roll Axes", rollAxes), ]), ("&Clip/Cut", [ ("&Clip", clipSelection), ("&Cut With Plane", cutSelection), ]), ("&Undo Last Changes", selection.undoChanges), ("---", None), ("&Concatenate Selection", concatenateSelection), ("&Partition Selection", partitionSelection), ("&Create Parts", createParts), ("&Sectionize Selection", sectionizeSelection), ("---", None), ("&Fly", fly), ("---", None), ("&Reload menu", reload_menu), ("&Close", close_menu), ] return menu.Menu(_menu, items=MenuData, parent=pf.GUI.menu, before='help')
def create_menu(): """Create the DXF menu.""" MenuData = [ ("&Read DXF file", importDxf), ("&Read DXFTEXT file", importDxfText), ("&Convert DXF to DXFTEXT", convertDxf, dict(tooltip="Parse a .dxf file and output a .dxftext script.")), ("&Read DXF without saving the DXFTEXT", importDxf), ("---", None), ("&Pick DXF selection", pickSelection), ("&Renumber DXF entities", renumberDxf), ("&Edit DXF entities", editParts), ("&Split Arcs", splitArcs), ("&Split Lines", splitLines), ("---", None), ("&Write DXFTEXT file", exportDxfText), ("&Convert to Formex", convertToFormex), ("&Write DXF file", exportDxf), #("&Clip by property",clipByProp), #("&Partition by connection",partition), ("---", None), ("&Print DXF selection", printSelection), ("&Draw DXF entities", drawDxf), ("&Toggle drawing property numbers", toggleProps), ("&Toggle drawing property colors", toggleColors), ("---", None), ("&Close Menu", close_menu), ] return menu.Menu(_menu, items=MenuData, parent=pf.GUI.menu, before='help')
def create_menu(window): #Find and create menu before = time.time() pyautogui.screenshot('test_screenshot.png', region=(0, 0, window.width, window.height)) print("Took", time.time() - before, "to take screenshot") before = time.time() menu_location = pyautogui.locateOnScreen('images/menu.png', region=(0, 0, window.width, window.height), confidence=0.8) print("Took", time.time() - before, "to find menu on screen") print("Menu is here: ", menu_location) mn = menu.Menu(menu_location.left, menu_location.top) return mn
def create_menu(): """Create the Jobs menu.""" MenuData = [ ("&About", about), ("&Configure Job Plugin", configure), ("&Run local Abaqus job", runLocalAbaqus), ("&Run local Calculix job", runLocalCalculix), ("&Submit Abaqus Job", submitToCluster), ("&Kill Cluster Job", killClusterJob), ("&List available results on server", checkResultsOnServer), ("&Get results from server", getResultsFromServer), ("&Execute remote command", remoteCommand), ("---", None), ("&Reload Menu", reload_menu), ("&Close Menu", close_menu), ] return menu.Menu(_menu, items=MenuData, parent=pf.GUI.menu, before='help')
def create_menu(): """Create the Postproc menu.""" MenuData = [ # ("&Translate Abaqus .fil to FeResult database",P.postABQ), ("&Read FeResult Database", importDB), ("&Read CalculiX results", importCalculix), ("&Read Flavia Database", importFlavia), ("&Select FeResult Data", selectDB), # ("&Forget FeResult Data",P.selection.forget), ("---", None), ("Show Geometry", showModel), # ("Select Step/Inc",P.selectStepInc), # ("Show Results",P.postProc), ("Results Dialog", open_dialog), ("---", None), ("&Reload menu", reload_menu), ("&Close menu", close_menu), ] return menu.Menu(_menu, items=MenuData, parent=pf.GUI.menu, before='help')
def create_menu(): """Create the %s menu.""" % _menu_ MenuData = [ ("&Run through example", example), ("---", None), ("&1. Import Bifurcation Geometry", importGeometry), ("&2. Input Central Point", inputCentralPoint), ("&3. Input Helper Lines", inputControlLines), ("&4a. Input Slicing Parameters", inputSlicingParameters), ("&4b. Create Center Lines", centerlines), ("&5. Slice the bifurcation", sliceIt), ("&6. Create Spline Mesh", splineIt), ("&7a. Input Longitudinal Seeds", inputLongitudinalSeeds), ("&7b. Seed Longitudinal Splines", seedLongitudinalSplines), ("&8a. Input Meshing Parameters", inputMeshingParameters), ("&8b. Sweeping Mesher", sweepingMesher), ("---", None), ("&Create Surface Mesh", surfMesh), ("---", None), ("&Draw", [ ("&All", drawAll), ("&Surface", drawSurface), ("&Helper Lines", drawHelperLines), ("&Control Lines", drawControlLines), ("&Central Point", drawCentralPoint), ("&Center Lines2D", drawCenterLines), ("&Center Lines3D", drawAxisSplines), ("&Cross Sections", drawCrossSections), ("&Cross Splines", drawCrossSplines), ("&Long Splines", drawLongSplines), ("&SurfaceMesh", drawSurfaceMesh), ("&Surface Spline_Mesh", drawSurfMesh), ("Set Draw Options", inputDrawOptions), ]), ("---", None), ("&Fly Along Center Lines", flyThru), ("---", None), ("&Close Menu", close_menu), ] return menu.Menu(_menu_, items=MenuData, parent=pf.GUI.menu, before='help')
def create_menu(before='help'): """Create the menu.""" MenuData = [ ("&Select drawable",selection.ask), ("&Set grid",create_grid), ("&Remove grid",remove_grid), ("---",None), ("&Toggle Preview",toggle_preview,{'checkable':True}), ("---",None), ("&Create Nurbs Curve ",[ ("Interactive",createInteractive), ("From Control Polygon",fromControlPolygon), ("Convert PolyLine",fromPolyLine), # ("Convert BezierSpline",fromBezierSpline), ]), ("---",None), ("&Reload Menu",reload_menu), ("&Close Menu",close_menu), ("Test menu",test_menu), ] w = menu.Menu(_menu,items=MenuData,parent=pf.GUI.menu,before=before) return w
def create_menu(): """Create the FeEx menu.""" MenuData = [ ("&Delete All",deleteAll), ("&Create Rectangular Part",createRectPart), ("&Create QuadrilateralPart",createQuadPart), ("&Convert to Quadratic-8",convertQuadratic), ("&Convert to Quadratic-9",convertQuadratic9), ("&Show All",drawParts), ("---",None), ("&Merge Parts into Model",createModel), ("&Show Merged Model",drawModel), ("&Show Calpy Numbers",drawCalpy), ("&Print model",printModel), ("---",None), ("&Add material properties",setMaterial), ("&Add boundary conditions",setBoundary), ("&Add concentrated loads",setCLoad), ("&Add edge loads",setELoad), ("&Delete all material properties",deleteAllMats), ("&Delete all boundary conditions",deleteAllBcons), ("&Delete all concentrated loads",deleteAllCLoads), ("&Delete all edge loads",deleteAllELoads), ("&Print property database",printDB), ("---",None), ("&Create Abaqus/Calculix input file",createAbaqusInput), ("&Create Calix input file",createCalixInput), ("&Run Calpy analysis",runCalpyAnalysis), ("---",None), ("&Import all",importAll), ("&Export all",exportAll), ("&Autorun example",autoRun), ("&Autorun quadratic example",autoRun2), ("&Autoconv example",autoConv), ("---",None), ("&Close Menu",close_menu), ] return menu.Menu('FeEx',items=MenuData,parent=pf.GUI.menu,before='help')
def create_menu(self, window): #Find and create menu menu_location = pyautogui.locateOnScreen('images/menu.png', region=(0,0, window.width, window.height), confidence = 0.8) mn = menu.Menu(menu_location.left, menu_location.top) self.menu = mn return mn
def create_menu(): """Create the plugin menu.""" from dxf_menu import importDxf _init_() MenuData = [ ( "&Import ", [ (utils.fileDescription('pgf'), importPgf), (utils.fileDescription('surface'), importSurface), (utils.fileDescription('tetgen'), importTetgen), ("Abaqus/Calculix FE model (*.inp)", importInp), ("All known geometry formats", importAny), ("Abaqus .inp", [ ("&Convert Abaqus .inp file", readInp), ("&Import Converted Abaqus Model", importModel), ]), # ("AutoCAD .dxf",[ # ("&Import .dxf or .dxftext",importDxf), # ("&Load DXF plugin menu",loadDxfMenu), # ]), ('&Upgrade pyFormex Geometry File', convertGeometryFile, dict( tooltip= "Convert a pyFormex Geometry File (.pgf) to the latest format, overwriting the file." )), ]), ("&Export ", [ (utils.fileDescription('pgf'), exportPgf), ("pyFormex Geometry File (binary)", exportPgfBinary), ("pyFormex Geometry File with short lines", exportPgfShortlines), ("Object File Format (.off)", exportOff), ]), ("&Select ", [ ('Any', set_selection), ('Formex', set_selection, { 'data': 'formex' }), ('Mesh', set_selection, { 'data': 'mesh' }), ('TriSurface', set_selection, { 'data': 'surface' }), ('PolyLine', set_selection, { 'data': 'polyline' }), ('Curve', set_selection, { 'data': 'curve' }), ('NurbsCurve', set_selection, { 'data': 'nurbs' }), ]), ("&Draw Selection", selection.draw), ("&Forget Selection", selection.forget), ("---", None), ("Print &Information ", [ ('&Bounding Box', selection.printbbox), ('&Type and Size', printDataSize), ]), ("Set &Attributes ", setAttributes), ("&Annotations ", [ ("&Names", selection.toggleNames, dict(checkable=True)), ("&Elem Numbers", selection.toggleNumbers, dict(checkable=True)), ("&Node Numbers", selection.toggleNodeNumbers, dict(checkable=True, checked=selection.hasNodeNumbers())), ("&Free Edges", selection.toggleFreeEdges, dict(checkable=True, checked=selection.hasFreeEdges())), ("&Node Marks", selection.toggleNodes, dict(checkable=True, checked=selection.hasNodeMarks())), ('&Toggle Bbox', selection.toggleBbox, dict(checkable=True)), ('&Toggle Shrink Mode', shrink, dict(checkable=True)), ("&Toggle Numbers On Top", toggleNumbersOntop), ]), ("---", None), ( "&Convert", [ ("To &Formex", toFormex), ("To &Mesh", toMesh), ("To &TriSurface", toSurface), ## ("To &PolyLine",toPolyLine), ## ("To &BezierSpline",toBezierSpline), ## ("To &NurbsCurve",toNurbsCurve), ]), ("&Property Numbers", [ ("&Set", selection.setProp), ("&Delete", selection.delProp), ("&Split", splitProp), ]), ("&Create Object", [ ('&Grid', createGrid), ('&Rectangle', createRectangle), ('&Cylinder, Cone, Truncated Cone', createCylinder), ('&Circle, Sector, Cone', createCone), ('&Sphere', createSphere), ]), ## ("&Shrink",shrink), ## ("&Bbox", ## [('&Show Bbox Planes',showBbox), ## ('&Remove Bbox Planes',removeBbox), ## ]), ## ("&Transform", ## [("&Scale Selection",scaleSelection), ## ("&Scale non-uniformly",scale3Selection), ## ("&Translate",translateSelection), ## ("&Center",centerSelection), ## ("&Rotate",rotateSelection), ## ("&Rotate Around",rotateAround), ## ("&Roll Axes",rollAxes), ## ]), ## ("&Clip/Cut", ## [("&Clip",clipSelection), ## ("&Cut With Plane",cutSelection), ## ]), ## ("&Undo Last Changes",selection.undoChanges), ("---", None), ("Show &Principal Axes", showPrincipal), ("Rotate to &Principal Axes", rotatePrincipal), ("Transform to &Principal Axes", transformPrincipal), ## ("---",None), ## ("&Concatenate Selection",concatenateSelection), ## ("&Partition Selection",partitionSelection), ## ("&Create Parts",createParts), ## ("&Sectionize Selection",sectionizeSelection), ## ("---",None), ## ("&Fly",fly), ("Mesh", [ ("&Reverse mesh elements", reverseMesh), ("&Convert element type", convertMesh), ("&Subdivide", subdivideMesh), ("&Compact", compactMesh), ("&Fuse nodes", fuseMesh), ("&Remove degenerate", removeDegenerate), ("&Renumber nodes", [ ("In element order", renumberMesh), ("In random order", renumberMeshRandom), ("In frontal order", renumberMeshFront), ]), ("&Get border mesh", getBorderMesh), ("&Peel off border", peelOffMesh), ]), ("---", None), ("&Reload menu", reload_menu), ("&Close", close_menu), ] M = menu.Menu(_menu, items=MenuData, parent=pf.GUI.menu, before='help') ## if not utils.hasExternal('dxfparser'): ## I = M.item("&Import ").item("AutoCAD .dxf") ## I.setEnabled(False) return M
def create_menu(): """Create the Tools menu.""" _init_() MenuData = [ ('Global &Variables',[ (' &List All',printall), (' &Select',database.ask), (' &Print Value',printval), (' &Print BBox',printbbox), (' &Draw',_drawables.ask), (' &Create',create), (' &Change Value',edit), (' &Rename',rename_), (' &Keep',keep_), (' &Delete',forget_), (' &Delete All',delete_all), ]), ("---",None), ('&Execute pyFormex command',command), ("&DOS to Unix",dos2unix,dict(tooltip="Convert a text file from DOS to Unix line terminators")), ("&Unix to DOS",unix2dos), ("Send &Mail",sendMail), ("---",None), ("&Create Plane",[ ("Coordinates", [("Point and normal", createPlaneCoordsPointNormal), ("Three points", createPlaneCoords3Points), ]), ("Visually", [("Three points", createPlaneVisual3Points), ]), ]), ("&Select Plane",planes.ask), ("&Draw Selection",planes.draw), ("&Forget Selection",planes.forget), ("---",None), ("Show an &Image file on the canvas",showImage), ("Show an &Image file as Formex",showImage3D), ("---",None), ('&Pick',[ ("&Actors",pick_actors), ("&Elements",pick_elements), ("&Points",pick_points), ("&Edges",pick_edges), ]), ('&Edit Points',edit_points), ("&Remove Highlights",removeHighlight), ("---",None), ('&Selection',[ ('&Create Report',report_selection), ('&Set Property',setprop_selection), ('&Grow',grow_selection), ('&Partition',partition_selection), ('&Get Partition',get_partition), ('&Export',export_selection), ]), ("---",None), ('&Query',[ ('&Actors',query_actors), ('&Elements',query_elements), ('&Points',query_points), ('&Edges',query_edges), ('&Distances',query_distances), ('&Angle',query_angle), ]), ("---",None), ('&Reload',reload_menu), ("&Close",close_menu), ] return menu.Menu(_menu,items=MenuData,parent=pf.GUI.menu,before='help')