From d2c592943592ae2d6118e1881ea899df81d692dc Mon Sep 17 00:00:00 2001 From: sbh Date: Mon, 27 Oct 2014 18:03:01 +0300 Subject: [PATCH] Refactoring: GeomAPI_Wire renamed to GeomAPI_PlanarEdges --- src/GeomAPI/CMakeLists.txt | 4 ++-- .../{GeomAPI_Wire.cpp => GeomAPI_PlanarEdges.cpp} | 10 +++++----- src/GeomAPI/{GeomAPI_Wire.h => GeomAPI_PlanarEdges.h} | 8 ++++---- src/GeomAlgoAPI/GeomAlgoAPI_SketchBuilder.cpp | 4 ++-- src/Model/Model_AttributeSelection.cpp | 4 ++-- src/ModuleBase/ModuleBase_ResultPrs.cpp | 6 +++--- src/SketchPlugin/SketchPlugin_Sketch.cpp | 4 ++-- 7 files changed, 20 insertions(+), 20 deletions(-) rename src/GeomAPI/{GeomAPI_Wire.cpp => GeomAPI_PlanarEdges.cpp} (80%) rename src/GeomAPI/{GeomAPI_Wire.h => GeomAPI_PlanarEdges.h} (92%) diff --git a/src/GeomAPI/CMakeLists.txt b/src/GeomAPI/CMakeLists.txt index f2e238051..8700473ee 100644 --- a/src/GeomAPI/CMakeLists.txt +++ b/src/GeomAPI/CMakeLists.txt @@ -19,7 +19,7 @@ SET(PROJECT_HEADERS GeomAPI_Pln.h GeomAPI_Shape.h GeomAPI_Edge.h - GeomAPI_Wire.h + GeomAPI_PlanarEdges.h GeomAPI_AISObject.h GeomAPI_IPresentable.h GeomAPI_Curve.h @@ -40,7 +40,7 @@ SET(PROJECT_SOURCES GeomAPI_Pln.cpp GeomAPI_Shape.cpp GeomAPI_Edge.cpp - GeomAPI_Wire.cpp + GeomAPI_PlanarEdges.cpp GeomAPI_AISObject.cpp GeomAPI_Curve.cpp ) diff --git a/src/GeomAPI/GeomAPI_Wire.cpp b/src/GeomAPI/GeomAPI_PlanarEdges.cpp similarity index 80% rename from src/GeomAPI/GeomAPI_Wire.cpp rename to src/GeomAPI/GeomAPI_PlanarEdges.cpp index 39da519fe..f12d62204 100644 --- a/src/GeomAPI/GeomAPI_Wire.cpp +++ b/src/GeomAPI/GeomAPI_PlanarEdges.cpp @@ -1,9 +1,9 @@ -// File: GeomAPI_Wire.cpp +// File: GeomAPI_PlanarEdges.cpp // Created: 06 Oct 2014 // Author: Sergey BELASH #include -#include +#include #include #include @@ -17,7 +17,7 @@ #include -GeomAPI_Wire::GeomAPI_Wire() : GeomAPI_Shape() +GeomAPI_PlanarEdges::GeomAPI_PlanarEdges() : GeomAPI_Shape() { TopoDS_Compound aBigWireImpl; BRep_Builder aBuilder; @@ -25,7 +25,7 @@ GeomAPI_Wire::GeomAPI_Wire() : GeomAPI_Shape() this->setImpl(new TopoDS_Shape(aBigWireImpl)); } -void GeomAPI_Wire::addEdge(boost::shared_ptr theEdge) +void GeomAPI_PlanarEdges::addEdge(boost::shared_ptr theEdge) { const TopoDS_Edge& anEdge = theEdge->impl(); if (anEdge.ShapeType() != TopAbs_EDGE) @@ -35,7 +35,7 @@ void GeomAPI_Wire::addEdge(boost::shared_ptr theEdge) aBuilder.Add(aWire, anEdge); } -std::list > GeomAPI_Wire::getEdges() +std::list > GeomAPI_PlanarEdges::getEdges() { TopoDS_Shape& aShape = const_cast(impl()); //BRepTools_WireExplorer aWireExp(TopoDS::Wire(aShape)); diff --git a/src/GeomAPI/GeomAPI_Wire.h b/src/GeomAPI/GeomAPI_PlanarEdges.h similarity index 92% rename from src/GeomAPI/GeomAPI_Wire.h rename to src/GeomAPI/GeomAPI_PlanarEdges.h index 86a457830..af8422619 100644 --- a/src/GeomAPI/GeomAPI_Wire.h +++ b/src/GeomAPI/GeomAPI_PlanarEdges.h @@ -1,4 +1,4 @@ -// File: GeomAPI_Wire.hxx +// File: GeomAPI_PlanarEdges.hxx // Created: 24 Jul 2014 // Author: Artem ZHIDKOV @@ -14,16 +14,16 @@ #include -/**\class GeomAPI_Wire +/**\class GeomAPI_PlanarEdges * \ingroup DataModel * \brief Interface to the edge object */ -class GeomAPI_Wire : public GeomAPI_Shape +class GeomAPI_PlanarEdges : public GeomAPI_Shape { public: /// Creation of empty (null) shape - GEOMAPI_EXPORT GeomAPI_Wire(); + GEOMAPI_EXPORT GeomAPI_PlanarEdges(); GEOMAPI_EXPORT virtual bool isVertex() const { diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_SketchBuilder.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_SketchBuilder.cpp index 0d0fc3418..ddd6d3977 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_SketchBuilder.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_SketchBuilder.cpp @@ -3,7 +3,7 @@ // Author: Artem ZHIDKOV #include -#include +#include #include @@ -378,7 +378,7 @@ void GeomAlgoAPI_SketchBuilder::createFaces(const boost::shared_ptr const boost::shared_ptr& theWire, std::list >& theResultFaces) { - boost::shared_ptr aWire = boost::dynamic_pointer_cast(theWire); + boost::shared_ptr aWire = boost::dynamic_pointer_cast(theWire); if(!aWire) return; // Filter wires, return only faces. diff --git a/src/Model/Model_AttributeSelection.cpp b/src/Model/Model_AttributeSelection.cpp index fd363ae41..54a52a22a 100644 --- a/src/Model/Model_AttributeSelection.cpp +++ b/src/Model/Model_AttributeSelection.cpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include @@ -96,7 +96,7 @@ bool Model_AttributeSelection::update() } else if (aContext->groupName() == ModelAPI_ResultConstruction::group()) { // construction: identification by the results indexes, recompute faces and // take the face that more close by the indexes - boost::shared_ptr aWirePtr = boost::dynamic_pointer_cast( + boost::shared_ptr aWirePtr = boost::dynamic_pointer_cast( boost::dynamic_pointer_cast(aContext)->shape()); if (aWirePtr && aWirePtr->hasPlane()) { // If this is a wire with plane defined thin it is a sketch-like object diff --git a/src/ModuleBase/ModuleBase_ResultPrs.cpp b/src/ModuleBase/ModuleBase_ResultPrs.cpp index c8eea52c2..b039e9bfd 100644 --- a/src/ModuleBase/ModuleBase_ResultPrs.cpp +++ b/src/ModuleBase/ModuleBase_ResultPrs.cpp @@ -5,7 +5,7 @@ #include "ModuleBase_ResultPrs.h" #include -#include +#include #include #include @@ -20,8 +20,8 @@ ModuleBase_ResultPrs::ModuleBase_ResultPrs(ResultPtr theResult) : AIS_Shape(TopoDS_Shape()), myResult(theResult), myIsSketchMode(false) { boost::shared_ptr aShapePtr = ModelAPI_Tools::shape(theResult); - boost::shared_ptr aWirePtr = - boost::dynamic_pointer_cast(aShapePtr); + boost::shared_ptr aWirePtr = + boost::dynamic_pointer_cast(aShapePtr); if (aWirePtr) { if (aWirePtr->hasPlane() ) { // If this is a wire with plane defined thin it is a sketch-like object diff --git a/src/SketchPlugin/SketchPlugin_Sketch.cpp b/src/SketchPlugin/SketchPlugin_Sketch.cpp index d0ebbbf8e..a66bd9ffb 100644 --- a/src/SketchPlugin/SketchPlugin_Sketch.cpp +++ b/src/SketchPlugin/SketchPlugin_Sketch.cpp @@ -9,7 +9,7 @@ #include #include -#include +#include #include #include @@ -88,7 +88,7 @@ void SketchPlugin_Sketch::execute() return; // Collect all edges as one big wire - boost::shared_ptr aBigWire(new GeomAPI_Wire); + boost::shared_ptr aBigWire(new GeomAPI_PlanarEdges); std::list >::const_iterator aShapeIt = aFeaturesPreview.begin(); for (; aShapeIt != aFeaturesPreview.end(); ++aShapeIt) { aBigWire->addEdge(*aShapeIt); -- 2.39.2