修复等值面无变量bug
parent
ba6b338d52
commit
402a1ce747
|
@ -11,61 +11,42 @@
|
||||||
#include <BRepBndLib.hxx>
|
#include <BRepBndLib.hxx>
|
||||||
#include "geometryCommandAPI.h"
|
#include "geometryCommandAPI.h"
|
||||||
|
|
||||||
namespace Geometry
|
namespace Geometry {
|
||||||
{
|
|
||||||
class GeometrySet;
|
class GeometrySet;
|
||||||
}
|
}
|
||||||
namespace Command
|
namespace Command {
|
||||||
{
|
class GEOMETRYCOMMANDAPI GeoCommandCommon {
|
||||||
class GEOMETRYCOMMANDAPI GeoCommandCommon
|
|
||||||
{
|
|
||||||
public:
|
public:
|
||||||
GeoCommandCommon() = default;
|
GeoCommandCommon() = default;
|
||||||
~GeoCommandCommon() = default;
|
~GeoCommandCommon() = default;
|
||||||
|
|
||||||
static std::vector<TopoDS_Wire> bulidWire(std::list<TopoDS_Edge>& edgeList);
|
static std::vector<TopoDS_Wire> bulidWire(std::list<TopoDS_Edge>& edgeList);
|
||||||
static TopoDS_Shape makeFace(std::vector<TopoDS_Wire>& wires);
|
static TopoDS_Shape makeFace(std::vector<TopoDS_Wire>& wires);
|
||||||
static bool isInside(const TopoDS_Wire&, const TopoDS_Wire&);
|
static bool isInside(const TopoDS_Wire&, const TopoDS_Wire&);
|
||||||
static TopoDS_Face validateFace(const TopoDS_Face&);
|
static TopoDS_Face validateFace(const TopoDS_Face&);
|
||||||
static TopoDS_Shape removeSplitter(const TopoDS_Shape& shape);
|
static TopoDS_Shape removeSplitter(const TopoDS_Shape& shape);
|
||||||
static bool isEmpty(const TopoDS_Shape &shape);
|
static bool isEmpty(const TopoDS_Shape& shape);
|
||||||
//从inputShape中移除component,返回移除之前的副本
|
// 从inputShape中移除component,返回移除之前的副本
|
||||||
static TopoDS_Shape removeShape(TopoDS_Shape* inputShape, TopoDS_Shape* component);
|
static TopoDS_Shape removeShape(TopoDS_Shape* inputShape, TopoDS_Shape* component);
|
||||||
static gp_Ax2 getEdgeAxis(Geometry::GeometrySet* set ,int edgeindex);
|
static gp_Ax2 getEdgeAxis(Geometry::GeometrySet* set, int edgeindex);
|
||||||
static gp_Ax2 getFaceAxis(Geometry::GeometrySet* set, int index);
|
static gp_Ax2 getFaceAxis(Geometry::GeometrySet* set, int index);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static TopoDS_Shape makeFace(std::list<TopoDS_Wire>&);
|
static TopoDS_Shape makeFace(std::list<TopoDS_Wire>&);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// sort bounding boxes according to diagonal length
|
// sort bounding boxes according to diagonal length
|
||||||
class Wire_Compare : public std::binary_function<const TopoDS_Wire&,
|
class Wire_Compare : public std::binary_function<const TopoDS_Wire&, const TopoDS_Wire&, bool> {
|
||||||
const TopoDS_Wire&, bool>
|
|
||||||
{
|
|
||||||
public:
|
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;
|
Bnd_Box box1, box2;
|
||||||
if (!w1.IsNull())
|
if(!w1.IsNull()) {
|
||||||
{
|
|
||||||
BRepBndLib::Add(w1, box1);
|
BRepBndLib::Add(w1, box1);
|
||||||
box1.SetGap(0.0);
|
box1.SetGap(0.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!w2.IsNull())
|
if(!w2.IsNull()) {
|
||||||
{
|
|
||||||
BRepBndLib::Add(w2, box2);
|
BRepBndLib::Add(w2, box2);
|
||||||
box2.SetGap(0.0);
|
box2.SetGap(0.0);
|
||||||
}
|
}
|
||||||
|
@ -73,6 +54,6 @@ namespace Command
|
||||||
return box1.SquareExtent() < box2.SquareExtent();
|
return box1.SquareExtent() < box2.SquareExtent();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
} // namespace Command
|
||||||
|
|
||||||
#endif
|
#endif
|
|
@ -136,7 +136,7 @@ namespace Post
|
||||||
QStringList pArray = _parentObject->getPointDataArray();
|
QStringList pArray = _parentObject->getPointDataArray();
|
||||||
for (auto array : pArray)
|
for (auto array : pArray)
|
||||||
{
|
{
|
||||||
if (_parentObject->variableType(1, array) != 1)
|
if (_parentObject->variableType(1, array) != "scalar")
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
_ui->variableComboBox->addItem(array);
|
_ui->variableComboBox->addItem(array);
|
||||||
|
|
Loading…
Reference in New Issue