From dc220f3e4f25a68fcde61339b242fa6c905bbfa2 Mon Sep 17 00:00:00 2001 From: mbs Date: Fri, 15 Dec 2023 21:43:14 +0000 Subject: [PATCH] added new Advanced Repair menu --- src/GEOMGUI/GEOM_msg_en.ts | 36 ++++++++++++++++++++++++++++ src/GEOMGUI/GeometryGUI.cxx | 11 +++++++++ src/GEOMGUI/GeometryGUI_Operations.h | 3 +++ src/RepairGUI/RepairGUI.cxx | 3 +++ 4 files changed, 53 insertions(+) diff --git a/src/GEOMGUI/GEOM_msg_en.ts b/src/GEOMGUI/GEOM_msg_en.ts index ba2b35507..2d25cd520 100644 --- a/src/GEOMGUI/GEOM_msg_en.ts +++ b/src/GEOMGUI/GEOM_msg_en.ts @@ -5028,6 +5028,42 @@ Please, select face, shell or solid and try again STB_UNION_FACES Union faces + + TOP_LOCATE_SUBSHAPES + Locate Subshapes + + + MEN_LOCATE_SUBSHAPES + Locate Subshapes + + + STB_LOCATE_SUBSHAPES + Locate subshapes + + + TOP_MERGE_FACES + Merge faces + + + MEN_MERGE_FACES + Merge Faces + + + STB_MERGE_FACES + Merge faces + + + TOP_UNION_EDGES + Union edges + + + MEN_UNION_EDGES + Union Edges + + + STB_UNION_EDGES + Union edges + TOP_INSPECT_OBJECT Inspect Object diff --git a/src/GEOMGUI/GeometryGUI.cxx b/src/GEOMGUI/GeometryGUI.cxx index bb667ddd1..7e2b3aa0f 100644 --- a/src/GEOMGUI/GeometryGUI.cxx +++ b/src/GEOMGUI/GeometryGUI.cxx @@ -697,6 +697,9 @@ void GeometryGUI::OnGUIEvent( int id, const QVariant& theParam ) case GEOMOp::OpRemoveExtraEdges: // MENU REPAIR - REMOVE EXTRA EDGES case GEOMOp::OpFuseEdges: // MENU REPAIR - FUSE COLLINEAR EDGES case GEOMOp::OpUnionFaces: // MENU REPAIR - UNION FACES + case GEOMOp::OpLocateSubShapes: // MENU REPAIR - ADVANCED - LOCATE SUBSHAPES + case GEOMOp::OpMergeFaces: // MENU REPAIR - ADVANCED - MERGE FACES + case GEOMOp::OpUnionEdges: // MENU REPAIR - ADVANCED - UNION EDGES case GEOMOp::OpInspectObj: // MENU REPAIR - INSPECT OBJECT libName = "RepairGUI"; break; @@ -1095,6 +1098,9 @@ void GeometryGUI::initialize( CAM_Application* app ) createGeomAction( GEOMOp::OpRemoveExtraEdges, "REMOVE_EXTRA_EDGES" ); createGeomAction( GEOMOp::OpFuseEdges, "FUSE_EDGES" ); createGeomAction( GEOMOp::OpUnionFaces, "UNION_FACES" ); + createGeomAction( GEOMOp::OpLocateSubShapes, "LOCATE_SUBSHAPES" ); + createGeomAction( GEOMOp::OpMergeFaces, "MERGE_FACES" ); + createGeomAction( GEOMOp::OpUnionEdges, "UNION_EDGES" ); createGeomAction( GEOMOp::OpInspectObj, "INSPECT_OBJECT" ); createGeomAction( GEOMOp::OpPointCoordinates, "POINT_COORDS" ); @@ -1363,6 +1369,11 @@ void GeometryGUI::initialize( CAM_Application* app ) createMenu( GEOMOp::OpFuseEdges, repairId, -1 ); createMenu( GEOMOp::OpUnionFaces, repairId, -1 ); + int advId = createMenu( tr( "MEN_ADVANCED" ), repairId, -1 ); + createMenu( GEOMOp::OpLocateSubShapes, advId, -1 ); + createMenu( GEOMOp::OpMergeFaces, advId, -1 ); + createMenu( GEOMOp::OpUnionEdges, advId, -1 ); + int measurId = createMenu( tr( "MEN_MEASURES" ), -1, -1, 10 ); createMenu( GEOMOp::OpPointCoordinates, measurId, -1 ); createMenu( GEOMOp::OpProperties, measurId, -1 ); diff --git a/src/GEOMGUI/GeometryGUI_Operations.h b/src/GEOMGUI/GeometryGUI_Operations.h index 0dc3bb965..91966ff79 100644 --- a/src/GEOMGUI/GeometryGUI_Operations.h +++ b/src/GEOMGUI/GeometryGUI_Operations.h @@ -185,6 +185,9 @@ namespace GEOMOp { OpFuseEdges = 4014, // MENU REPAIR - FUSE COLLINEAR EDGES OpUnionFaces = 4015, // MENU REPAIR - UNION FACES OpRemoveWebs = 4016, // MENU REPAIR - REMOVE INTERNAL FACES + OpLocateSubShapes = 4017, // MENU REPAIR - ADVANCED - LOCATE SUB SHAPES + OpMergeFaces = 4018, // MENU REPAIR - ADVANCED - MERGE FACES + OpUnionEdges = 4019, // MENU REPAIR - ADVANCED - UNION EDGES // MeasureGUI ------------------//-------------------------------- OpProperties = 5000, // MENU MEASURES - PROPERTIES OpCenterMass = 5001, // MENU MEASURES - CENTRE OF MASS diff --git a/src/RepairGUI/RepairGUI.cxx b/src/RepairGUI/RepairGUI.cxx index 82fa717d6..d40ff4f15 100644 --- a/src/RepairGUI/RepairGUI.cxx +++ b/src/RepairGUI/RepairGUI.cxx @@ -98,6 +98,9 @@ bool RepairGUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent ) case GEOMOp::OpRemoveExtraEdges: aDlg = new RepairGUI_RemoveExtraEdgesDlg (getGeometryGUI(), parent); break; case GEOMOp::OpFuseEdges: aDlg = new RepairGUI_FuseEdgesDlg (getGeometryGUI(), parent); break; case GEOMOp::OpUnionFaces: aDlg = new RepairGUI_UnionFacesDlg (getGeometryGUI(), parent); break; + // case GEOMOp::OpLocateSubShapes: /*to be implemented*/ break; + // case GEOMOp::OpMergeFaces: /*to be implemented*/ break; + // case GEOMOp::OpUnionEdges: /*to be implemented*/ break; case GEOMOp::OpInspectObj: aDlg = new RepairGUI_InspectObjectDlg (getGeometryGUI(), parent); break; default: app->putInfo(tr("GEOM_PRP_COMMAND").arg(theCommandID)); -- 2.39.2