From 402a1ce7473f17c6747045443fbd6cf6464fafe5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A6=85=E5=85=83=E5=A4=A9=E9=81=93?= Date: Tue, 14 Nov 2023 17:07:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=AD=89=E5=80=BC=E9=9D=A2?= =?UTF-8?q?=E6=97=A0=E5=8F=98=E9=87=8Fbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/GeometryCommand/GeoCommandCommon.h | 53 +++++++++----------------- src/PostInterface/DialogCreateISO.cpp | 2 +- 2 files changed, 18 insertions(+), 37 deletions(-) diff --git a/src/GeometryCommand/GeoCommandCommon.h b/src/GeometryCommand/GeoCommandCommon.h index 8177016..82d718d 100644 --- a/src/GeometryCommand/GeoCommandCommon.h +++ b/src/GeometryCommand/GeoCommandCommon.h @@ -11,61 +11,42 @@ #include #include "geometryCommandAPI.h" -namespace Geometry -{ +namespace Geometry { class GeometrySet; } -namespace Command -{ - class GEOMETRYCOMMANDAPI GeoCommandCommon - { +namespace Command { + class GEOMETRYCOMMANDAPI GeoCommandCommon { public: - GeoCommandCommon() = default; + GeoCommandCommon() = default; ~GeoCommandCommon() = default; static std::vector bulidWire(std::list& edgeList); - static TopoDS_Shape makeFace(std::vector& wires); - static bool isInside(const TopoDS_Wire&, const TopoDS_Wire&); - static TopoDS_Face validateFace(const TopoDS_Face&); - static TopoDS_Shape removeSplitter(const TopoDS_Shape& shape); - static bool isEmpty(const TopoDS_Shape &shape); - //从inputShape中移除component,返回移除之前的副本 + static TopoDS_Shape makeFace(std::vector& wires); + static bool isInside(const TopoDS_Wire&, const TopoDS_Wire&); + static TopoDS_Face validateFace(const TopoDS_Face&); + static TopoDS_Shape removeSplitter(const TopoDS_Shape& shape); + static bool isEmpty(const TopoDS_Shape& shape); + // 从inputShape中移除component,返回移除之前的副本 static TopoDS_Shape removeShape(TopoDS_Shape* inputShape, TopoDS_Shape* component); - static gp_Ax2 getEdgeAxis(Geometry::GeometrySet* set ,int edgeindex); - static gp_Ax2 getFaceAxis(Geometry::GeometrySet* set, int index); + static gp_Ax2 getEdgeAxis(Geometry::GeometrySet* set, int edgeindex); + static gp_Ax2 getFaceAxis(Geometry::GeometrySet* set, int index); private: static TopoDS_Shape makeFace(std::list&); - }; - - - - - - - - - - - // sort bounding boxes according to diagonal length - class Wire_Compare : public std::binary_function - { + class Wire_Compare : public std::binary_function { public: - bool operator() (const TopoDS_Wire& w1, const TopoDS_Wire& w2) + bool operator()(const TopoDS_Wire& w1, const TopoDS_Wire& w2) { Bnd_Box box1, box2; - if (!w1.IsNull()) - { + if(!w1.IsNull()) { BRepBndLib::Add(w1, box1); box1.SetGap(0.0); } - if (!w2.IsNull()) - { + if(!w2.IsNull()) { BRepBndLib::Add(w2, box2); box2.SetGap(0.0); } @@ -73,6 +54,6 @@ namespace Command return box1.SquareExtent() < box2.SquareExtent(); } }; -} +} // namespace Command #endif \ No newline at end of file diff --git a/src/PostInterface/DialogCreateISO.cpp b/src/PostInterface/DialogCreateISO.cpp index c43d2d3..177c735 100644 --- a/src/PostInterface/DialogCreateISO.cpp +++ b/src/PostInterface/DialogCreateISO.cpp @@ -136,7 +136,7 @@ namespace Post QStringList pArray = _parentObject->getPointDataArray(); for (auto array : pArray) { - if (_parentObject->variableType(1, array) != 1) + if (_parentObject->variableType(1, array) != "scalar") continue; _ui->variableComboBox->addItem(array);