Pārlūkot izejas kodu

opt: 删除几何基准平面相关数据结构

wzj 11 mēneši atpakaļ
vecāks
revīzija
2693b3c826

+ 1 - 55
src/Geometry/geometryData.cpp

@@ -8,7 +8,6 @@
 #include <QDomDocument>
 #include <QDomElement>
 #include <QDataStream>
-#include "geometryDatum.h"
 #include "GeoComponent.h"
 
 namespace Geometry
@@ -30,15 +29,7 @@ namespace Geometry
 	{
 		_geometryList.append(set);
 	}
-	void GeometryData::appendGeometryDatum(GeometryDatum *plane)
-	{
-		_geomtretryDatumList.append(plane);
-	}
 
-	QList<GeometryDatum *> GeometryData::getGeometryDatum()
-	{
-		return _geomtretryDatumList;
-	}
 
 	int GeometryData::getGeometrySetCount()
 	{
@@ -85,11 +76,6 @@ namespace Geometry
 		return ishas;
 	}
 
-	void GeometryData::removeGeometryDatum(GeometryDatum *plane)
-	{
-		if (_geomtretryDatumList.contains(plane))
-			_geomtretryDatumList.removeOne(plane);
-	}
 
 	void GeometryData::setVisable(int index, bool visable)
 	{
@@ -108,20 +94,6 @@ namespace Geometry
 		}
 		_geometryList.clear();
 
-		const int nd = _geomtretryDatumList.size();
-		for (int i = 0; i < nd; ++i)
-		{
-			auto set = _geomtretryDatumList.at(i);
-			delete set;
-		}
-		_geomtretryDatumList.clear();
-
-		if (_sketchPlan != nullptr)
-		{
-			delete _sketchPlan;
-			_sketchPlan = nullptr;
-		}
-
 		const int nc = _geoCpList.size();
 		for (int i = 0; i < nc; ++i)
 		{
@@ -163,14 +135,6 @@ namespace Geometry
 				geoSet->writeToProjectFile(doc, &geoSetsRoot, isdiso);
 		}
 
-		n = _geomtretryDatumList.size();
-		if (n > 0)
-		{
-			QDomElement geoDatumsRoot = doc->createElement("GeoDatums");
-			georoot.appendChild(geoDatumsRoot);
-			for (auto datum : _geomtretryDatumList)
-				datum->writeToProjectFile(doc, &geoDatumsRoot, isdiso);
-		}
 
 		n = _geoCpList.size();
 		if (n > 0)
@@ -186,11 +150,9 @@ namespace Geometry
 	{
 		QDomElement georoot = nodelist->at(0).toElement();
 		QDomElement geoSetRoot = georoot.elementsByTagName("GeoSets").at(0).toElement();
-		QDomElement datumRoot = georoot.elementsByTagName("GeoDatums").at(0).toElement();
 		QDomElement gcRoot = georoot.elementsByTagName("GeoComponents").at(0).toElement();
 
 		QDomNodeList geoSetList = geoSetRoot.elementsByTagName("GeoSet");
-		QDomNodeList datumList = datumRoot.elementsByTagName("GeoDatum");
 		QDomNodeList gcList = gcRoot.elementsByTagName("GeoComponent");
 
 		const int geoCount = geoSetList.size();
@@ -202,14 +164,7 @@ namespace Geometry
 			s->readDataFromProjectFile(&geoset, isdiso);
 		}
 
-		const int nd = datumList.size();
-		for (int i = 0; i < nd; ++i)
-		{
-			QDomElement geoDat = datumList.at(i).toElement();
-			GeometryDatum *s = new GeometryDatum;
-			_geomtretryDatumList.append(s);
-			s->readDataFromProjectFile(&geoDat, isdiso);
-		}
+
 
 		const int gcCount = gcList.size();
 		for (int i = 0; i < gcCount; ++i)
@@ -235,14 +190,6 @@ namespace Geometry
 		return nullptr;
 	}
 
-	GeometryDatum *GeometryData::getDatumByIndex(const int index)
-	{
-		GeometryDatum *d = nullptr;
-		if (index >= 0 && index < _geomtretryDatumList.size())
-			d = _geomtretryDatumList.at(index);
-		return d;
-	}
-
 	GeoComponent *GeometryData::getGeoComponentByIndex(int index)
 	{
 		if (index >= 0 && index < _geoCpList.size())
@@ -269,7 +216,6 @@ namespace Geometry
 	void GeometryData::sort()
 	{
 		std::sort(_geometryList.begin(), _geometryList.end(), compareSet);
-		std::sort(_geomtretryDatumList.begin(), _geomtretryDatumList.end(), compareSet);
 		std::sort(_geoCpList.begin(), _geoCpList.end(), compareSet);
 	}
 

+ 2 - 37
src/Geometry/geometryData.h

@@ -17,7 +17,6 @@ class vtkPolyData;
 namespace Geometry
 {
 	class GeometrySet;
-	class GeometryDatum;
 	class GeoComponent;
 	/**
 	 * @brief 几何数据管理基类(单例)
@@ -39,18 +38,7 @@ namespace Geometry
 		 * @since 2.5.0
 		 */
 		void appendGeometrySet(GeometrySet *set);
-		/**
-		 * @brief 添加基准
-		 * @param datum 要添加的基准
-		 * @since 2.5.0
-		 */
-		void appendGeometryDatum(GeometryDatum *datum);
-		/**
-		 * @brief 获取全部基准
-		 * @return QList<GeometryDatum*> 返回的基准列表
-		 * @since 2.5.0
-		 */
-		QList<GeometryDatum *> getGeometryDatum();
+
 		/**
 		 * @brief 获取形状的数量
 		 * @return int 返回形状的数量
@@ -107,13 +95,6 @@ namespace Geometry
 		 * @since 2.5.0
 		 */
 		bool hasGeometrySet(GeometrySet *set);
-		//		void removeDatumPlaneByIndex(int index);
-		/**
-		 * @brief 移除直接子基准
-		 * @param datum 要移除的直接子形状
-		 * @since 2.5.0
-		 */
-		void removeGeometryDatum(GeometryDatum *datum);
 		/**
 		 * @brief 设置几何形状的可见性
 		 * @param index 要设置形状的索引
@@ -134,13 +115,7 @@ namespace Geometry
 		 * @since 2.5.0
 		 */
 		GeometrySet *getGeometrySetByID(const int id);
-		/**
-		 * @brief 获取索引为index的基准
-		 * @param index 要获取基准的索引值
-		 * @return GeometryDatum* 返回获取到的基准
-		 * @since 2.5.0
-		 */
-		GeometryDatum *getDatumByIndex(const int index);
+
 		/**
 		 * @brief 获取对象的md5值
 		 * @return QString 返回计算得到的md5值
@@ -215,16 +190,6 @@ namespace Geometry
 		 * @since 2.5.0
 		 */
 		QList<GeometrySet *> _geometryList{};
-		/**
-		 * @brief 基准列表
-		 * @since 2.5.0
-		 */
-		QList<GeometryDatum *> _geomtretryDatumList{};
-		/**
-		 * @brief 草绘平面
-		 * @since 2.5.0
-		 */
-		gp_Ax3 *_sketchPlan{};
 		/**
 		 * @brief 组件列表
 		 * @since 2.5.0

+ 0 - 117
src/Geometry/geometryDatum.cpp

@@ -1,117 +0,0 @@
-//基准(参考)形状类源文件
-
-#include "geometryDatum.h"
-#include <QDomDocument>
-#include <QDomElement>
-#include <QCoreApplication>
-
-namespace Geometry
-{
-GeometryDatum::GeometryDatum()
-    : GeometrySet(DATUM,true)
-{
-}
-GeometryDatum::~GeometryDatum()
-{
-
-}
-
-
-void GeometryDatum::setDatumType(DatumType t)
-{
-    _type = t;
-}
-
-DatumType GeometryDatum::getDatumType()
-{
-    return _type;
-}
-
-QDomElement& GeometryDatum::writeToProjectFile(QDomDocument* doc, QDomElement* ele, bool isDiso /* = false */)
-{
-    QDomElement element = doc->createElement("GeoDatum");  //创建子节点
-    QDomAttr idattr = doc->createAttribute("ID");
-    idattr.setValue(QString::number(_id));
-    element.setAttributeNode(idattr);
-    QDomAttr visible = doc->createAttribute("Visible");
-    visible.setValue("True");
-    if (!_visible) visible.setValue("False");
-    element.setAttributeNode(visible);
-    QString stype = this->datumTypeToString(_type);
-    element.setAttribute("Type", stype);
-    QDomElement nameele = doc->createElement("Name");
-    QDomText nameText = doc->createTextNode(_name);
-    nameele.appendChild(nameText);
-    element.appendChild(nameele);
-
-    ele->appendChild(element);  //子节点挂载
-
-    if (isDiso)
-    {
-        QString exelPath = QCoreApplication::applicationDirPath();
-        const QString tempPath = exelPath + "/../tempIO/" + QString("datum_%1.brep").arg(_id);
-        /*bool ok = */this->writeBrep(tempPath);
-    }
-    return element;
-}
-
-
-
-void GeometryDatum::readDataFromProjectFile(QDomElement* element, bool isDiso /* = false */)
-{
-    int id = element->attribute("ID").toInt();
-    this->setID(id);
-    bool visible = true;
-    QString vis = element->attribute("Visible");
-    if (vis.toLower() == "false") visible = false;
-    this->setVisible(visible);
-    QString stype = element->attribute("Type");
-    _type = datumTypeFromString(stype);
-    QDomNodeList nameNode = element->elementsByTagName("Name");
-
-    if (nameNode.size() != 1) return;
-    QString name = nameNode.at(0).toElement().text();
-    //		qDebug() << name;
-    this->setName(name);
-
-    if (isDiso)
-    {
-        QString exelPath = QCoreApplication::applicationDirPath();
-        const QString tempPath = exelPath + "/../tempIO/" + QString("datum_%1.brep").arg(_id);
-        this->readBrep(tempPath);
-    }
-
-}
-
-QString GeometryDatum::datumTypeToString(DatumType t)
-{
-    QString stype = "None";
-    switch (t)
-    {
-    case Geometry::DatumNone: break;
-    case Geometry::DatumPoint:
-        stype = "DatumPoint"; break;
-    case Geometry::DatumAxis:
-        stype = "DatumAxis"; break;
-    case Geometry::DatumPlane:
-        stype = "DatumPlane"; break;
-    default: break;
-    }
-    return stype;
-}
-
-Geometry::DatumType GeometryDatum::datumTypeFromString(QString s)
-{
-    DatumType t= DatumNone;
-    s = s.toLower();
-    if (s == "datumpoint")
-        t = DatumPoint;
-    else if (s == "datumaxis")
-        t = DatumAxis;
-    else if (s == "datumplane")
-        t = DatumPlane;
-    return t;
-
-}
-
-}

+ 0 - 83
src/Geometry/geometryDatum.h

@@ -1,83 +0,0 @@
-//基准(参考)形状类头文件
-
-#ifndef GEOMETRYDATUMPLANE_H_
-#define GEOMETRYDATUMPLANE_H_
-
-#include "geometryAPI.h"
-#include "geometrySet.h"
-
-class TopoDS_Shape;
-
-namespace Geometry
-{
-	/**
-	 * @brief 基准形状类型
-	 * @since 2.5.0
-	 */
-	enum DatumType
-	{
-		DatumNone,		///< 无定义,用于默认参数
-		DatumPoint,		///< 基准点
-		DatumAxis,		///< 基准轴
-		DatumPlane,		///< 基准平面
-	};
-
-	/**
-	 * @brief 基准形状类
-	 * @since 2.5.0
-	 */
-	class GEOMETRYAPI GeometryDatum : public GeometrySet
-	{
-	public:
-		/**
-		 * @brief 构造函数
-		 * @since 2.5.0
-		 */
-		GeometryDatum();
-		/**
-		 * @brief 析构函数
-		 * @since 2.5.0
-		 */
-		~GeometryDatum();
-		/**
-		 * @brief 设置基准类型
-		 * @param t 基准类型
-		 * @since 2.5.0
-		 */
-		void setDatumType(DatumType t);
-		/**
-		 * @brief 获取基准类型
-		 * @return DatumType 返回基准类型
-		 * @since 2.5.0
-		 */
-		DatumType getDatumType();
-
-		virtual QDomElement& writeToProjectFile(QDomDocument* doc, QDomElement* ele, bool isDisp /* = false */) override;
-		virtual void readDataFromProjectFile(QDomElement* e, bool isDiso /* = false */);
-		/**
-		 * @brief 将基准类型转换为字符串
-		 * @param t 要转换的基准类型
-		 * @return QString 返回转换后的字符串
-		 * @since 2.5.0
-		 */
-		static QString datumTypeToString(DatumType t);
-		/**
-		 * @brief 将字符串转换为基准类型
-		 * @param s 要转换的字符串
-		 * @return DatumType 返回转换后的基准类型
-		 * @attention 如果传入的字符串非法,则返回DatumNone
-		 * @since 2.5.0
-		 */
-		static DatumType datumTypeFromString(QString s);
-
-	private:
-		/**
-		 * @brief 基准类型
-		 * @since 2.5.0
-		 */
-		DatumType _type{ DatumNone };
-	};
-
-}
-
-#endif

+ 0 - 2
src/GeometryCommand/GeoCommandBase.cpp

@@ -22,9 +22,7 @@ namespace Command
 		if (_preWindow != nullptr)
 		{
 			connect(this, SIGNAL(showSet(Geometry::GeometrySet *, bool)), _preWindow, SIGNAL(showGeoSet(Geometry::GeometrySet *, bool)));
-			connect(this, SIGNAL(showDatum(Geometry::GeometryDatum *)), _preWindow, SIGNAL(showDatum(Geometry::GeometryDatum *)));
 			connect(this, SIGNAL(removeDisplayActor(Geometry::GeometrySet *)), _preWindow, SIGNAL(removeGemoActors(Geometry::GeometrySet *)));
-			connect(this, SIGNAL(removeDisplayDatumActor(Geometry::GeometryDatum *)), _preWindow, SIGNAL(removeGeoDatumActors(Geometry::GeometryDatum *)));
 		}
 
 		_commandList = GeoComandList::getInstance();

+ 0 - 3
src/GeometryCommand/GeoCommandBase.h

@@ -30,7 +30,6 @@ namespace Geometry
 {
 	class GeometryData;
 	class GeometrySet;
-	class GeometryDatum;
 }
 
 class TopoDS_Shape;
@@ -103,9 +102,7 @@ namespace Command
 	signals:
 		void updateGeoTree();
 		void showSet(Geometry::GeometrySet *s, bool r = true);
-		void showDatum(Geometry::GeometryDatum *);
 		void removeDisplayActor(Geometry::GeometrySet *s);
-		void removeDisplayDatumActor(Geometry::GeometryDatum *);
 		/**
 		 * @brief 命令执行后会触发此信号
 		 * @since 2.5.0

+ 0 - 140
src/GeometryCommand/GeoCommandCreateDatumplane.cpp

@@ -1,140 +0,0 @@
-#include "GeoCommandCreateDatumplane.h"
-#include <gp_Ax2.hxx>
-#include <BRepPrimAPI_MakeCone.hxx>
-#include "Geometry/geometryData.h"
-#include "Geometry/geometrySet.h"
-#include "Geometry/geometryDatum.h"
-#include <gp_Pln.hxx>
-#include <gp_Pnt.hxx>
-#include <gp_Dir.hxx>
-#include <Bnd_Box.hxx>
-#include <gp_Trsf.hxx>
-#include <TopoDS.hxx>
-#include <TopExp_Explorer.hxx>
-#include <TopoDS_Face.hxx>
-#include <BRepAlgoAPI_Section.hxx>
-#include <BRepLib.hxx>
-#include <BRepBndLib.hxx>
-#include <BRepBuilderAPI_MakeFace.hxx>
-#include <BRepPrimAPI_MakeBox.hxx>
-#include <BRepAlgoAPI_Common.hxx>
-#include <BRepBuilderAPI_Transform.hxx>
-#include "GeoCommandCommon.h"
-#include <QDebug>
-
-namespace Command
-{
-	GeoCommandCreateDatumplane::GeoCommandCreateDatumplane(GUI::MainWindow *m, MainWidget::PreWindow *p)
-		: GeoCommandBase(m, p)
-	{
-	}
-	bool GeoCommandCreateDatumplane::execute()
-	{
-		TopoDS_Shape *faceBelong = _face->getShape();
-		TopExp_Explorer faceExp(*faceBelong, TopAbs_FACE);
-		for (int index = 0; index < _faceIndex && faceExp.More(); faceExp.Next(), ++index)
-			;
-
-		const TopoDS_Shape &faceShape = faceExp.Current();
-		if (faceShape.IsNull())
-			return false;
-
-		Bnd_Box bndBox;
-		BRepBndLib::Add(faceShape, bndBox);
-		bndBox.SetGap(0.01);
-
-		gp_Pnt cornerMin = bndBox.CornerMin();
-		gp_Pnt cornerMax = bndBox.CornerMax();
-		TopoDS_Shape newBox = BRepPrimAPI_MakeBox(cornerMin, cornerMax).Shape();
-
-		gp_Pln plan(gp_Pnt(_planeLocation[0], _planeLocation[1], _planeLocation[2]), gp_Dir(_planeDirection[0], _planeDirection[1], _planeDirection[2]));
-		TopoDS_Shape planeShape = BRepBuilderAPI_MakeFace(plan);
-
-		BRepAlgoAPI_Common S(newBox, planeShape);
-		S.Build();
-		if (!S.IsDone())
-			return false;
-		const TopoDS_Shape &cutShape = S.Shape();
-		if (cutShape.IsNull())
-			return false;
-
-		gp_Trsf aTrsf;
-		gp_Vec vec(_axis[0], _axis[1], _axis[2]);
-		aTrsf.SetTranslation(vec);
-		BRepBuilderAPI_Transform aBRespTrsf(cutShape, aTrsf);
-		aBRespTrsf.Build();
-		if (!aBRespTrsf.IsDone())
-			return false;
-		const TopoDS_Shape &resShape = aBRespTrsf.Shape();
-		if (resShape.IsNull())
-			return false;
-
-		auto s = new TopoDS_Shape;
-		*s = resShape;
-		_result = new Geometry::GeometryDatum();
-		_result->setDatumType(Geometry::DatumPlane);
-		_result->setName(QString("Datum"));
-		_result->setShape(s);
-		_geoData->appendGeometryDatum(_result);
-		updateGeoTree();
-		emit showDatum(_result);
-
-		return true;
-	}
-	void GeoCommandCreateDatumplane::undo()
-	{
-		_geoData->removeGeometryDatum(_result);
-		emit removeDisplayDatumActor(_result);
-		updateGeoTree();
-	}
-
-	void GeoCommandCreateDatumplane::redo()
-	{
-		_geoData->appendGeometryDatum(_result);
-		emit showDatum(_result);
-		updateGeoTree();
-	}
-
-	void GeoCommandCreateDatumplane::setAxis(double *axis)
-	{
-		_axis[0] = axis[0];
-		_axis[1] = axis[1];
-		_axis[2] = axis[2];
-	}
-
-	void GeoCommandCreateDatumplane::setPlane(double *loc, double *dir)
-	{
-		for (int i = 0; i < 3; ++i)
-		{
-			_planeDirection[i] = dir[i];
-			_planeLocation[i] = loc[i];
-		}
-	}
-
-	void GeoCommandCreateDatumplane::setFaceBody(Geometry::GeometrySet *face, int index)
-	{
-		_face = face;
-		_faceIndex = index;
-	}
-
-	TopoDS_Shape *GeoCommandCreateDatumplane::common(TopoDS_Shape *shape1, TopoDS_Shape *shape2)
-	{
-
-		BRepAlgoAPI_Common S(*shape1, *shape2);
-		S.Build();
-		if (S.IsDone())
-		{
-			auto s = new TopoDS_Shape;
-			*s = S.Shape();
-			return s;
-		}
-		return nullptr;
-	}
-
-	void GeoCommandCreateDatumplane::releaseResult()
-	{
-		if (_result != nullptr)
-			delete _result;
-		_result = nullptr;
-	}
-}

+ 0 - 85
src/GeometryCommand/GeoCommandCreateDatumplane.h

@@ -1,85 +0,0 @@
-#ifndef GEOCOMMANDCREATEDATUMPLANE_H_
-#define GEOCOMMANDCREATEDATUMPLANE_H_
-
-#include "geometryCommandAPI.h"
-#include "GeoCommandBase.h"
-
-class TopoDS_Shape;
-
-namespace Geometry
-{
-	class GeometrySet;
-	class GeometryDatum;
-}
-
-namespace Command
-{
-	class GEOMETRYCOMMANDAPI GeoCommandCreateDatumplane : public GeoCommandBase
-	{
-	public:
-		GeoCommandCreateDatumplane(GUI::MainWindow* m, MainWidget::PreWindow* p);
-		~GeoCommandCreateDatumplane() = default;
-
-		bool execute()override;
-		void undo() override;
-		void redo() override;
-		void releaseResult() override;
-		void setAxis(double* axis);
-		void setPlane(double* loc, double* dir);
-		void setFaceBody(Geometry::GeometrySet* face, int index);
-	private:
-		TopoDS_Shape* common(TopoDS_Shape* shape1, TopoDS_Shape* shape2);
-
-	private:
-
-		double _axis[3];
-		double _planeDirection[3];
-		double _planeLocation[3];
-		Geometry::GeometrySet* _face;
-		int _faceIndex{ -1 };
-		//Geometry::GeometrySet* _result{};
-		Geometry::GeometryDatum* _result{};
-
-
-
-	};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-#endif

+ 0 - 58
src/GeometryCommand/GeoCommandRemoveDatum.cpp

@@ -1,58 +0,0 @@
-#include "GeoCommandRemoveDatum.h"
-#include "Geometry/geometryData.h"
-#include "Geometry/geometryDatum.h"
-#include <QDebug>
-
-namespace Command
-{
-	GeoCommandRemoveDatum::GeoCommandRemoveDatum(GUI::MainWindow *m, MainWidget::PreWindow *p)
-		: GeoCommandBase(m, p)
-	{
-	}
-
-	GeoCommandRemoveDatum::~GeoCommandRemoveDatum()
-	{
-		if (!needRelease && _removeOne != nullptr)
-			delete _removeOne;
-	}
-
-	bool GeoCommandRemoveDatum::execute()
-	{
-		QList<Geometry::GeometryDatum *> datumList = _geoData->getGeometryDatum();
-		Geometry::GeometryDatum *removeOne = datumList[_index];
-		_geoData->removeGeometryDatum(removeOne);
-		_removeOne = removeOne;
-		emit removeDisplayDatumActor(removeOne);
-		emit updateGeoTree();
-		return true;
-	}
-
-	void GeoCommandRemoveDatum::undo()
-	{
-		_geoData->appendGeometryDatum(_removeOne);
-		showDatum(_removeOne);
-		emit updateGeoTree();
-		needRelease = false;
-	}
-
-	void GeoCommandRemoveDatum::redo()
-	{
-		_geoData->removeGeometryDatum(_removeOne);
-		emit removeDisplayDatumActor(_removeOne);
-		emit updateGeoTree();
-		needRelease = true;
-	}
-
-	void GeoCommandRemoveDatum::releaseResult()
-	{
-		if (needRelease && _removeOne != nullptr)
-			delete _removeOne;
-		_removeOne = nullptr;
-	}
-
-	void GeoCommandRemoveDatum::setIndex(int index)
-	{
-		_index = index;
-	}
-
-}

+ 0 - 33
src/GeometryCommand/GeoCommandRemoveDatum.h

@@ -1,33 +0,0 @@
-#ifndef GEOCPMMANDREMOVEDATUM_H_
-#define GEOCPMMANDREMOVEDATUM_H_
-
-#include "GeoCommandBase.h"
-
-namespace Command
-{
-	class GEOMETRYCOMMANDAPI GeoCommandRemoveDatum : public GeoCommandBase
-	{
-		Q_OBJECT
-	public:
-		GeoCommandRemoveDatum(GUI::MainWindow* m, MainWidget::PreWindow* p);
-		~GeoCommandRemoveDatum();
-
-		void setIndex(int index);
-
-		bool execute() override;
-		void undo() override;
-		void redo() override;
-		void releaseResult() override;
-
-	private:
-		int _index{ -1 };
-		Geometry::GeometryDatum* _removeOne{};
-		bool needRelease{ false };
-
-
-	};
-}
-
-
-
-#endif

+ 0 - 158
src/GeometryWidgets/dialogCreateDatumplane.cpp

@@ -1,158 +0,0 @@
-#include "dialogCreateDatumplane.h"
-#include "ui_dialogCreateDatumplane.h"
-#include "MainWindow/MainWindow.h"
-#include "ModuleBase/ModuleType.h"
-#include "MainWidgets/preWindow.h"
-#include "GeometryCommand/GeoCommandList.h"
-#include "GeometryCommand/GeoCommandCreateDatumplane.h"
-#include <QMessageBox>
-#include <QDebug>
-#include <QColor>
-#include <TopoDS.hxx>
-#include <gp_Pln.hxx>
-#include <TopoDS_Shape.hxx>
-#include <TopExp_Explorer.hxx>
-#include <BRepAdaptor_Surface.hxx>
-#include <BRep_Tool.hxx>
-#include "Geometry/geometrySet.h"
-
-namespace GeometryWidget
-{
-
-	CreateDatumplaneDialog::CreateDatumplaneDialog(GUI::MainWindow *m, MainWidget::PreWindow *p)
-		: GeoDialogBase(m, p)
-	{
-		_ui = new Ui::CreateDatumplaneDialog;
-		_ui->setupUi(this);
-		this->translateButtonBox(_ui->buttonBox);
-	}
-
-	CreateDatumplaneDialog::~CreateDatumplaneDialog()
-	{
-		if (_ui != nullptr)
-			delete _ui;
-	}
-
-	void CreateDatumplaneDialog::shapeSlected(Geometry::GeometrySet *set, int index)
-	{
-		if (_faceBody != nullptr)
-		{
-			emit highLightGeometryFaceSig(_faceBody, _faceIndex, false);
-		}
-
-		_faceIndex = index;
-		_faceBody = set;
-
-		emit highLightGeometryFaceSig(_faceBody, _faceIndex, true);
-	}
-
-	void CreateDatumplaneDialog::on_geoSelectSurface_clicked()
-	{
-		emit setSelectMode(int(ModuleBase::GeometrySurface));
-	}
-
-	// 	void CreateDatumplaneDialog::closeEvent(QCloseEvent *e)
-	// 	{
-	// 		QDialog::closeEvent(e);
-	// 		delete this;
-	// 	}
-
-	void CreateDatumplaneDialog::accept()
-	{
-		double floc[3] = {0.0};
-		double fdir[3] = {0.0};
-
-		double distance{0.0};
-		double dir[3] = {0.0};
-
-		bool ok = getDirection(floc, fdir);
-		if (ok)
-		{
-			QString text = _ui->lineEditDistance->text();
-			distance = text.toDouble(&ok);
-			if (distance < 1e-6)
-				ok = false;
-		}
-
-		memcpy(dir, fdir, sizeof(floc));
-		if (ok)
-		{
-			if (_ui->reversecheckBox->isChecked())
-			{
-				for (int i = 0; i < 3; ++i)
-					dir[i] *= -1;
-			}
-		}
-		double mod = sqrt(dir[0] * dir[0] + dir[1] * dir[1] + dir[2] * dir[2]);
-		if (mod < 1e-6)
-			ok = false;
-		if (ok)
-		{
-			double factor = distance / mod;
-			for (int i = 0; i < 3; ++i)
-				dir[i] *= factor;
-		}
-		if (!ok)
-		{
-			QMessageBox::warning(this, tr("Warning"), tr("Input Wrong !"));
-			return;
-		}
-		Command::GeoCommandCreateDatumplane *command = new Command::GeoCommandCreateDatumplane(_mainWindow, _preWindow);
-		command->setPlane(floc, fdir);
-		command->setAxis(dir);
-		command->setFaceBody(_faceBody, _faceIndex);
-
-		bool success = Command::GeoComandList::getInstance()->executeCommand(command);
-		if (!success)
-		{
-			QMessageBox::warning(this, tr("Warning"), tr("Create failed ! "));
-			return;
-		}
-
-		QDialog::accept();
-		this->close();
-	}
-
-	void CreateDatumplaneDialog::reject()
-	{
-		QDialog::reject();
-		this->close();
-	}
-
-	bool CreateDatumplaneDialog::getDirection(double *basePt, double *dir)
-	{
-		if (_faceBody == nullptr)
-			return false;
-
-		TopoDS_Shape *shape = _faceBody->getShape();
-		TopExp_Explorer faceExp(*shape, TopAbs_FACE);
-		for (int index = 0; index < _faceIndex && faceExp.More(); faceExp.Next(), ++index)
-			;
-
-		const TopoDS_Shape &faceShape = faceExp.Current();
-		if (faceShape.IsNull())
-			return false;
-
-		const TopoDS_Face &face = TopoDS::Face(faceShape);
-		if (face.IsNull())
-			return false;
-
-		BRepAdaptor_Surface adapt(face);
-		if (adapt.GetType() != GeomAbs_Plane)
-			return false;
-		gp_Pln plane = adapt.Plane();
-		gp_Ax1 normal = plane.Axis();
-
-		gp_Pnt loca = normal.Location();
-		gp_Dir dirt = normal.Direction();
-
-		basePt[0] = loca.X();
-		basePt[1] = loca.Y();
-		basePt[2] = loca.Z();
-		dir[0] = dirt.X();
-		dir[1] = dirt.Y();
-		dir[2] = dirt.Z();
-		return true;
-	}
-
-}

+ 0 - 50
src/GeometryWidgets/dialogCreateDatumplane.h

@@ -1,50 +0,0 @@
-#ifndef _DIALOGCREATEDATUMPLANE_H_
-#define _DIALOGCREATEDATUMPLANE_H_
-
-#include "ModuleBase/ModuleType.h"
-#include "geoDialogBase.h"
-#include <QMultiHash>
-
-// class vtkActor;
-class TopoDS_Shape;
-
-namespace Ui
-{
-	class CreateDatumplaneDialog;
-}
-namespace Geometry
-{
-	class GeometrySet;
-}
-namespace GeometryWidget
-{
-	class GEOMETRYWIDGETSAPI CreateDatumplaneDialog : public GeoDialogBase
-	{
-		Q_OBJECT
-	public:
-		CreateDatumplaneDialog(GUI::MainWindow *m, MainWidget::PreWindow *p);
-		~CreateDatumplaneDialog();
-
-	private slots:
-		void shapeSlected(Geometry::GeometrySet *set, int shape) override;
-		void on_geoSelectSurface_clicked();
-
-	private:
-		//		void closeEvent(QCloseEvent *);
-		void accept() override;
-		void reject() override;
-		bool getDirection(double *basePt, double *dir);
-
-	private:
-		Ui::CreateDatumplaneDialog *_ui{};
-
-		//		vtkActor* _faceActor{};
-		int _faceIndex{0};
-		Geometry::GeometrySet *_faceBody{};
-
-		double _distance{1.0};
-	};
-
-}
-
-#endif

+ 0 - 158
src/GeometryWidgets/dialogCreateDatumplane.ui

@@ -1,158 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>CreateDatumplaneDialog</class>
- <widget class="QDialog" name="CreateDatumplaneDialog">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>334</width>
-    <height>191</height>
-   </rect>
-  </property>
-  <property name="windowTitle">
-   <string>Create Datum</string>
-  </property>
-  <layout class="QGridLayout" name="gridLayout_4">
-   <item row="3" column="0">
-    <widget class="QCheckBox" name="reversecheckBox">
-     <property name="text">
-      <string>Reverse</string>
-     </property>
-    </widget>
-   </item>
-   <item row="4" column="0">
-    <widget class="QDialogButtonBox" name="buttonBox">
-     <property name="orientation">
-      <enum>Qt::Horizontal</enum>
-     </property>
-     <property name="standardButtons">
-      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
-     </property>
-    </widget>
-   </item>
-   <item row="1" column="0">
-    <widget class="QGroupBox" name="groupBox_5">
-     <property name="sizePolicy">
-      <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
-       <horstretch>0</horstretch>
-       <verstretch>0</verstretch>
-      </sizepolicy>
-     </property>
-     <property name="maximumSize">
-      <size>
-       <width>16777215</width>
-       <height>16777215</height>
-      </size>
-     </property>
-     <property name="title">
-      <string>Distance</string>
-     </property>
-     <layout class="QGridLayout" name="gridLayout">
-      <item row="0" column="0">
-       <widget class="QLabel" name="label_2">
-        <property name="sizePolicy">
-         <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
-          <horstretch>0</horstretch>
-          <verstretch>0</verstretch>
-         </sizepolicy>
-        </property>
-        <property name="text">
-         <string>Distance</string>
-        </property>
-       </widget>
-      </item>
-      <item row="0" column="1">
-       <widget class="QLineEdit" name="lineEditDistance">
-        <property name="sizePolicy">
-         <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
-          <horstretch>0</horstretch>
-          <verstretch>0</verstretch>
-         </sizepolicy>
-        </property>
-        <property name="text">
-         <string>10.00</string>
-        </property>
-       </widget>
-      </item>
-     </layout>
-    </widget>
-   </item>
-   <item row="0" column="0">
-    <widget class="QGroupBox" name="groupBox_3">
-     <property name="title">
-      <string>Select</string>
-     </property>
-     <layout class="QHBoxLayout" name="horizontalLayout">
-      <item>
-       <widget class="QLabel" name="edglabel">
-        <property name="text">
-         <string>Selected Plane</string>
-        </property>
-       </widget>
-      </item>
-      <item>
-       <widget class="QPushButton" name="geoSelectSurface">
-        <property name="minimumSize">
-         <size>
-          <width>32</width>
-          <height>32</height>
-         </size>
-        </property>
-        <property name="maximumSize">
-         <size>
-          <width>32</width>
-          <height>32</height>
-         </size>
-        </property>
-        <property name="styleSheet">
-         <string notr="true">background-image: url(:/QUI/geometry/selectface.png);</string>
-        </property>
-        <property name="text">
-         <string/>
-        </property>
-       </widget>
-      </item>
-     </layout>
-    </widget>
-   </item>
-  </layout>
- </widget>
- <resources>
-  <include location="../qrc/qianfan.qrc"/>
- </resources>
- <connections>
-  <connection>
-   <sender>buttonBox</sender>
-   <signal>accepted()</signal>
-   <receiver>CreateDatumplaneDialog</receiver>
-   <slot>accept()</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>248</x>
-     <y>254</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>157</x>
-     <y>274</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>buttonBox</sender>
-   <signal>rejected()</signal>
-   <receiver>CreateDatumplaneDialog</receiver>
-   <slot>reject()</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>316</x>
-     <y>260</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>286</x>
-     <y>274</y>
-    </hint>
-   </hints>
-  </connection>
- </connections>
-</ui>

+ 0 - 111
src/MainWidgets/DialogCreateMaterial.cpp

@@ -1,111 +0,0 @@
-#include "DialogCreateMaterial.h"
-#include "ui_DialogCreateMaterial.h"
-#include "Material/Material.h"
-#include "Material/MaterialSingletion.h"
-#include "ConfigOptions/ConfigOptions.h"
-#include "ConfigOptions/MaterialConfig.h"
-#include <QDebug>
-#include <QMessageBox>
-#include "Material/MaterialFactory.h"
-#include "PythonModule/PyAgent.h"
-
-namespace MainWidget
-{
-	CreateMaterialDialog::CreateMaterialDialog(GUI::MainWindow *mainwindow) : QFDialog(mainwindow)
-	{
-		_ui = new Ui::DialogCreateMaterial;
-		_ui->setupUi(this);
-		init();
-	}
-	CreateMaterialDialog::~CreateMaterialDialog()
-	{
-		if (_ui != nullptr)
-			delete _ui;
-	}
-
-	void CreateMaterialDialog::init()
-	{
-		int maxid = Material::Material::getMaxID();
-		_ui->materialName->setPlaceholderText(QString("Material_%1").arg(maxid + 1));
-		QStringList materialtypes = ConfigOption::ConfigOption::getInstance()->getMaterialConfig()->getMaterialTypes();
-		for (int i = 0; i < materialtypes.size(); ++i)
-		{
-			QString m = materialtypes.at(i);
-			_ui->comboBox->addItem(m);
-		}
-		QStringList regs = Material::MaterialFactory::getRegTypes();
-		for (QString m : regs)
-		{
-			_ui->comboBox->addItem(m);
-		}
-	}
-
-	void CreateMaterialDialog::accept()
-	{
-		QString sname = _ui->materialName->text();
-		QString name{};
-		if (sname.isEmpty())
-			sname = _ui->materialName->placeholderText();
-		else if (sname.simplified().isEmpty())
-		{
-			QMessageBox::warning(this, tr("Warning"), tr("Material name can not be empty!"));
-			return;
-		}
-		bool isequal = false;
-
-		Material::MaterialSingleton *s = Material::MaterialSingleton::getInstance();
-		const int nmodle = s->getMaterialCount();
-		for (int i = 0; i < nmodle; ++i)
-		{
-			Material::Material *data = s->getMaterialAt(i);
-
-			QString modelName = data->getName();
-			if (sname == modelName)
-			{
-				isequal = true;
-				break;
-			}
-		}
-		if (isequal)
-		{
-			QString info = tr("Material \"%1\" has already  existed !").arg(sname);
-			QMessageBox::warning(this, tr("Warning"), info);
-			return;
-		}
-		name = sname;
-		const QString type = _ui->comboBox->currentText();
-		if (type.isEmpty())
-		{
-			QMessageBox::warning(this, tr("Warning"), tr("Material type can not be empty!"));
-			return;
-		}
-
-		QString code = QString("ControlPanel.CreateMaterial('%1','%2')").arg(name).arg(type);
-		Py::PythonAgent::getInstance()->submit(code);
-
-		/*Material::Material* material = nullptr;
-
-		auto ma = ConfigOption::ConfigOption::getInstance()->getMaterialConfig()->getMaterialByType(type);
-		if (ma != nullptr)
-		{
-			material = new Material::Material;
-			material->copy(ma);
-		}
-		else
-		{
-			material = Material::MaterialFactory::createMaterial(type);
-		}
-
-		if (material == nullptr)
-		{
-			QMessageBox::warning(this, tr("Warning"), tr("Material create failed!"));
-			return;
-		}
-		material->setName(name);
-
-		Material::MaterialSingleton::getInstance()->appendMaterial(material);*/
-
-		QDialog::accept();
-	}
-
-}

+ 0 - 34
src/MainWidgets/DialogCreateMaterial.h

@@ -1,34 +0,0 @@
-#ifndef _DIALOGCREATEMATERIAL_H_
-#define _DIALOGCREATEMATERIAL_H_
-
-#include "SelfDefObject/QFDialog.h"
-
-namespace GUI
-{
-	class MainWindow;
-}
-namespace Ui
-{
-	class DialogCreateMaterial;
-}
-
-namespace MainWidget
-{
-	class CreateMaterialDialog : public QFDialog
-	{
-		Q_OBJECT
-	public:
-		CreateMaterialDialog(GUI::MainWindow*  mainwindow);
-		~CreateMaterialDialog();
-
-		void init();
-		
-	private:
-		void accept() override;
-	
-	private:
-		Ui::DialogCreateMaterial* _ui{};
-	};
-}
-
-#endif

+ 0 - 113
src/MainWidgets/DialogCreateMaterial.ui

@@ -1,113 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>DialogCreateMaterial</class>
- <widget class="QDialog" name="DialogCreateMaterial">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>317</width>
-    <height>112</height>
-   </rect>
-  </property>
-  <property name="windowTitle">
-   <string>Create Material</string>
-  </property>
-  <layout class="QVBoxLayout" name="verticalLayout">
-   <item>
-    <layout class="QGridLayout" name="gridLayout">
-     <item row="0" column="0">
-      <layout class="QVBoxLayout" name="nameLayout">
-       <item>
-        <widget class="QLabel" name="label">
-         <property name="text">
-          <string>Name:</string>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <widget class="QLabel" name="label_2">
-         <property name="text">
-          <string>Type:</string>
-         </property>
-        </widget>
-       </item>
-      </layout>
-     </item>
-     <item row="0" column="1">
-      <layout class="QVBoxLayout" name="controlLayout">
-       <item>
-        <widget class="QLineEdit" name="materialName"/>
-       </item>
-       <item>
-        <widget class="QComboBox" name="comboBox"/>
-       </item>
-      </layout>
-     </item>
-    </layout>
-   </item>
-   <item>
-    <layout class="QHBoxLayout" name="horizontalLayout_2">
-     <item>
-      <spacer name="horizontalSpacer">
-       <property name="orientation">
-        <enum>Qt::Horizontal</enum>
-       </property>
-       <property name="sizeHint" stdset="0">
-        <size>
-         <width>40</width>
-         <height>20</height>
-        </size>
-       </property>
-      </spacer>
-     </item>
-     <item>
-      <widget class="QDialogButtonBox" name="buttonBox">
-       <property name="orientation">
-        <enum>Qt::Horizontal</enum>
-       </property>
-       <property name="standardButtons">
-        <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
-       </property>
-      </widget>
-     </item>
-    </layout>
-   </item>
-  </layout>
- </widget>
- <resources/>
- <connections>
-  <connection>
-   <sender>buttonBox</sender>
-   <signal>accepted()</signal>
-   <receiver>DialogCreateMaterial</receiver>
-   <slot>accept()</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>248</x>
-     <y>254</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>157</x>
-     <y>274</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>buttonBox</sender>
-   <signal>rejected()</signal>
-   <receiver>DialogCreateMaterial</receiver>
-   <slot>reject()</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>316</x>
-     <y>260</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>286</x>
-     <y>274</y>
-    </hint>
-   </hints>
-  </connection>
- </connections>
-</ui>

+ 2 - 12
src/MainWidgets/PhysicsWidget.cpp

@@ -21,13 +21,11 @@
 #include "ConfigOptions/ConfigOptions.h"
 #include "ConfigOptions/GlobalConfig.h"
 #include "ProjectTreeExtend/ProjectTreeExtend.h"
-#include "DialogCreateMaterial.h"
 #include "Material/MaterialSingletion.h"
 #include "Material/Material.h"
 #include "PythonModule/PyAgent.h"
 #include <QTextCodec>
 #include "PropertyTable.h"
-// #include "IO/ProjectTemplete.h"
 #include "ProjectTreeFactory.h"
 #include "Common/Types.h"
 namespace MainWidget
@@ -100,10 +98,7 @@ namespace MainWidget
 		connect(this, SIGNAL(importProjectSig(int)), this, SLOT(importProject(int)));
 		//		connect(this, SIGNAL(caseRenameSig(int, QString)), this, SLOT(caseRename(int, QString)));
 		connect(this, SIGNAL(showMessage(ModuleBase::Message)), _mainWindow, SIGNAL(printMessageToMessageWindow(ModuleBase::Message)));
-		///< MG 节点变换
-		// 		connect(this, SIGNAL(itemSelectionChanged()), this, SLOT(slot_selected_item_changed()));
-		//
-		// 		connect(_mainWindow, SIGNAL(sig_action_open()), this, SLOT(slot_action_open()));
+
 	}
 
 	QTreeWidgetItem *PhysicsWidget::getProjectRoot(QTreeWidgetItem *item) const
@@ -477,12 +472,7 @@ namespace MainWidget
 
 	void PhysicsWidget::slot_create_material()
 	{
-		CreateMaterialDialog dlg(_mainWindow);
-		dlg.exec();
-		/*	if (QDialog::Accepted == dlg.exec())
-					{
-							updateMaterialTree();
-					}*/
+
 	}
 
 	void PhysicsWidget::slot_delete_material()

+ 0 - 2
src/MainWidgets/TreeWidget.cpp

@@ -22,7 +22,6 @@
 #include "DataProperty/modelTreeItemType.h"
 #include "Geometry/geometryData.h"
 #include "Geometry/geometrySet.h"
-#include "Geometry/geometryDatum.h"
 #include "Geometry/GeoComponent.h"
 #include "MainWidgets/preWindow.h"
 #include <QMenu>
@@ -37,7 +36,6 @@
 #include "GeometryCommand/GeoCommandList.h"
 #include "GeometryCommand/GeoCommandRemove.h"
 #include "DialogGeometryRename.h"
-#include "GeometryCommand/GeoCommandRemoveDatum.h"
 #include <QMessageBox>
 #include "PythonModule/PyAgent.h"
 #include <QFileInfo>

+ 0 - 1
src/MainWidgets/TreeWidget.h

@@ -9,7 +9,6 @@ namespace Geometry
 {
 	class GeometryData;
 	class GeometrySet;
-	class GeometryDatum;
 	class GeoComponent;
 }
 

+ 1 - 15
src/MainWidgets/geometryViewProvider.cpp

@@ -3,7 +3,6 @@
 #include "MainWidgets/preWindow.h"
 #include "Geometry/geometryData.h"
 #include "Geometry/geometrySet.h"
-#include "Geometry/geometryDatum.h"
 #include "Settings/BusAPI.h"
 #include "Settings/GraphOption.h"
 #include <QColor>
@@ -52,9 +51,7 @@ namespace MainWidget
 	{
 		_geoData = Geometry::GeometryData::getInstance();
 		connect(_preWindow, SIGNAL(showGeoSet(Geometry::GeometrySet *, bool)), this, SLOT(showGeoSet(Geometry::GeometrySet *, bool)));
-		connect(_preWindow, SIGNAL(showDatum(Geometry::GeometryDatum *)), this, SLOT(showDatum(Geometry::GeometryDatum *)));
 		connect(_preWindow, SIGNAL(removeGemoActors(Geometry::GeometrySet *)), this, SLOT(removeActors(Geometry::GeometrySet *)));
-		//connect(_preWindow, SIGNAL(removeGeoDatumActors(Geometry::GeometryDatum *)), this, SLOT(removeDatumActors(Geometry::GeometryDatum *)));
 		//		connect(_preWindow, SIGNAL(selectGeometry(bool)), this, SLOT(selectGeometry(bool)));
 		connect(_preWindow, SIGNAL(selectGeometry(bool, vtkActor *, int)), this, SLOT(selectGeometry(bool, vtkActor *, int)));
 		connect(_preWindow, SIGNAL(setGeoSelectMode(int)), this, SLOT(setGeoSelectMode(int)));
@@ -202,10 +199,7 @@ namespace MainWidget
 			_preWindow->resetCamera();
 	}
 
-	void GeometryViewProvider::showDatum(Geometry::GeometryDatum *datm)
-	{
-		Q_UNUSED(datm)
-	}
+
 
 	void GeometryViewProvider::removeActors(Geometry::GeometrySet *set)
 	{
@@ -408,14 +402,6 @@ namespace MainWidget
 			showGeoSet(set, false);
 		}
 		_preWindow->resetCamera();
-		QList<Geometry::GeometryDatum *> dl = _geoData->getGeometryDatum();
-		for (auto da : dl)
-		{
-			TopoDS_Shape *shape = da->getShape();
-			if (shape == nullptr)
-				continue;
-			showDatum(da);
-		}
 	}
 
 }

+ 0 - 2
src/MainWidgets/geometryViewProvider.h

@@ -18,7 +18,6 @@ namespace Geometry
 {
 	class GeometryData;
 	class GeometrySet;
-	class GeometryDatum;
 }
 
 namespace MainWidget
@@ -40,7 +39,6 @@ namespace MainWidget
 
 	public slots:
 		void showGeoSet(Geometry::GeometrySet *set, bool render = true);
-		void showDatum(Geometry::GeometryDatum *datm);
 		void removeActors(Geometry::GeometrySet *set);
 		void setGeometryDisplay(bool v, bool c, bool f);
 		void setGeoSelectMode(int);

+ 0 - 5
src/MainWidgets/preWindow.h

@@ -12,7 +12,6 @@ namespace Geometry
 {
 	class GeometryData;
 	class GeometrySet;
-	class GeometryDatum;
 	class GeoComponent;
 }
 
@@ -56,10 +55,6 @@ namespace MainWidget
 		void showGeoSet(Geometry::GeometrySet *set, bool render = true);
 		//移除几何形状的显示
 		void removeGemoActors(Geometry::GeometrySet *set);
-		//显示基准
-		void showDatum(Geometry::GeometryDatum *);
-		//移除几何基准显示
-		void removeGeoDatumActors(Geometry::GeometryDatum *);
 		//设置选择模式
 		void setGeoSelectMode(int);
 		//选择的几何元素

+ 0 - 14
src/MainWindow/SignalHandler.cpp

@@ -15,7 +15,6 @@
 #include "GeometryWidgets/dialogCreateCone.h"
 #include "GeometryWidgets/dialogCreateCylinder.h"
 #include "GeometryWidgets/dialogCreateCylindricalComplex.h"
-#include "GeometryWidgets/dialogCreateDatumplane.h"
 #include "GeometryWidgets/dialogCreateFace.h"
 #include "GeometryWidgets/dialogCreateLine.h"
 #include "GeometryWidgets/dialogCreatePoint.h"
@@ -1057,19 +1056,6 @@ namespace GUI {
 	   GeometryWidget::CreateBoxComplexDialog(_mainWindow, p); this->showDialog(dlg);
 			}*/
 
-	void SignalHandler::CreateDatumplane()
-	{
-		SubWindowManager* sw = _mainWindow->getSubWindowManager();
-		if(!sw->isPreWindowOpened()) {
-			QMessageBox::warning(_mainWindow, tr("Warning"), tr("Open PreWindow First!"));
-			return;
-		}
-		MainWidget::PreWindow*					p = sw->getPreWindow();
-		GeometryWidget::CreateDatumplaneDialog* dlg =
-			new GeometryWidget::CreateDatumplaneDialog(_mainWindow, p);
-		this->showDialog(dlg);
-	}
-
 	void SignalHandler::DrawGraphicsLine()
 	{
 		SubWindowManager*	   sw = _mainWindow->getSubWindowManager();

+ 0 - 1
src/MainWindow/SignalHandler.h

@@ -121,7 +121,6 @@ namespace GUI {
 		void CreateRevol();
 		void CreateLoft();
 		void CreateSweep();
-		void CreateDatumplane();
 		void DrawGraphicsLine();
 		void DrawGraphicsRectangle();
 		void DrawGraphicsCircle();