diff --git a/src/Mod/TechDraw/App/CMakeLists.txt b/src/Mod/TechDraw/App/CMakeLists.txt index 46e1f5d090..30da18df39 100644 --- a/src/Mod/TechDraw/App/CMakeLists.txt +++ b/src/Mod/TechDraw/App/CMakeLists.txt @@ -186,6 +186,8 @@ SET(Geometry_SRCS GeometryObject.h Cosmetic.cpp Cosmetic.h + CosmeticVertex.cpp + CosmeticVertex.h PropertyGeomFormatList.cpp PropertyGeomFormatList.h PropertyCenterLineList.cpp diff --git a/src/Mod/TechDraw/App/Cosmetic.cpp b/src/Mod/TechDraw/App/Cosmetic.cpp index 76fbefcceb..313b9e8e06 100644 --- a/src/Mod/TechDraw/App/Cosmetic.cpp +++ b/src/Mod/TechDraw/App/Cosmetic.cpp @@ -45,7 +45,6 @@ #include #include #include -#include #include #include "Cosmetic.h" @@ -118,209 +117,6 @@ int LineFormat::getDefEdgeStyle() return style; } -//**************************************************************************************** - -TYPESYSTEM_SOURCE(TechDraw::CosmeticVertex, Base::Persistence) - -CosmeticVertex::CosmeticVertex() : TechDraw::Vertex() -{ - point(Base::Vector3d(0.0, 0.0, 0.0)); - permaPoint = Base::Vector3d(0.0, 0.0, 0.0); - linkGeom = -1; - color = Preferences::vertexColor(); - size = Preferences::vertexScale() * - LineGroup::getDefaultWidth("Thin"); - style = 1; - visible = true; - hlrVisible = true; - cosmetic = true; - - createNewTag(); -} - -CosmeticVertex::CosmeticVertex(const TechDraw::CosmeticVertex* cv) : TechDraw::Vertex(cv) -{ - permaPoint = cv->permaPoint; - linkGeom = cv->linkGeom; - color = cv->color; - size = cv->size; - style = cv->style; - visible = cv->visible; - hlrVisible = true; - cosmetic = true; - - createNewTag(); -} - -CosmeticVertex::CosmeticVertex(Base::Vector3d loc) : TechDraw::Vertex(loc) -{ - permaPoint = loc; - linkGeom = -1; - color = Preferences::vertexColor(); - size = Preferences::vertexScale() * - LineGroup::getDefaultWidth("Thick"); - style = 1; //TODO: implement styled vertexes - visible = true; - hlrVisible = true; - cosmetic = true; - - createNewTag(); - -} - -void CosmeticVertex::move(Base::Vector3d newPos) -{ - permaPoint = newPos; -} - -void CosmeticVertex::moveRelative(Base::Vector3d movement) -{ - permaPoint += movement; -} - -std::string CosmeticVertex::toString() const -{ - std::stringstream ss; - ss << permaPoint.x << ", " << - permaPoint.y << ", " << - permaPoint.z << ", " << - " / "; - ss << point().x << ", " << - point().y << ", " << - point().z << ", " << - " / " << - linkGeom << ", " << - " / " << - color.asHexString() << ", " << - " / " << - size << ", " << - " / " << - style << ", " << - " / " << - visible << " / " ; - ss << getTagAsString(); - return ss.str(); -} - -// Persistence implementers -unsigned int CosmeticVertex::getMemSize () const -{ - return 1; -} - -void CosmeticVertex::Save(Base::Writer &writer) const -{ - TechDraw::Vertex::Save(writer); - writer.Stream() << writer.ind() << "" << endl; - writer.Stream() << writer.ind() << "" << endl; - writer.Stream() << writer.ind() << "" << endl; - writer.Stream() << writer.ind() << "" << endl; - writer.Stream() << writer.ind() << "