Salome HOME
projects
/
modules
/
shaper.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix for import/export features
[modules/shaper.git]
/
src
/
GeomData
/
GeomData_Dir.cpp
diff --git
a/src/GeomData/GeomData_Dir.cpp
b/src/GeomData/GeomData_Dir.cpp
index 3800c938ce04ee810e1bca6d6ff858bd83114f28..d5272dda21f432786c2ca04ff8e983b99a7a5108 100644
(file)
--- a/
src/GeomData/GeomData_Dir.cpp
+++ b/
src/GeomData/GeomData_Dir.cpp
@@
-1,9
+1,12
@@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
// File: GeomData_Dir.cxx
// Created: 2 Apr 2014
// Author: Mikhail PONIKAROV
#include "GeomData_Dir.h"
// File: GeomData_Dir.cxx
// Created: 2 Apr 2014
// Author: Mikhail PONIKAROV
#include "GeomData_Dir.h"
-#include "GeomAPI_Dir.h"
+#include <GeomAPI_Dir.h>
+#include <GeomAPI_XYZ.h>
#include <gp_Dir.hxx>
#include <ModelAPI_Feature.h>
#include <ModelAPI_Data.h>
#include <gp_Dir.hxx>
#include <ModelAPI_Feature.h>
#include <ModelAPI_Data.h>
@@
-12,8
+15,8
@@
using namespace std;
void GeomData_Dir::setValue(const double theX, const double theY, const double theZ)
{
void GeomData_Dir::setValue(const double theX, const double theY, const double theZ)
{
- if (!myIsInitialized || myCoords->Value(0) != theX || myCoords->Value(1) != theY
||
- myCoords->Value(2) != theZ) {
+ if (!myIsInitialized || myCoords->Value(0) != theX || myCoords->Value(1) != theY
+
||
myCoords->Value(2) != theZ) {
myCoords->SetValue(0, theX);
myCoords->SetValue(1, theY);
myCoords->SetValue(2, theZ);
myCoords->SetValue(0, theX);
myCoords->SetValue(1, theY);
myCoords->SetValue(2, theZ);
@@
-21,10
+24,9
@@
void GeomData_Dir::setValue(const double theX, const double theY, const double t
}
}
}
}
-void GeomData_Dir::setValue(const
boost
::shared_ptr<GeomAPI_Dir>& theDir)
+void GeomData_Dir::setValue(const
std
::shared_ptr<GeomAPI_Dir>& theDir)
{
setValue(theDir->x(), theDir->y(), theDir->z());
{
setValue(theDir->x(), theDir->y(), theDir->z());
- owner()->data()->sendAttributeUpdated(this);
}
double GeomData_Dir::x() const
}
double GeomData_Dir::x() const
@@
-42,10
+44,16
@@
double GeomData_Dir::z() const
return myCoords->Value(2);
}
return myCoords->Value(2);
}
-boost::shared_ptr<GeomAPI_Dir> GeomData_Dir::dir()
+std::shared_ptr<GeomAPI_Dir> GeomData_Dir::dir()
+{
+ return std::shared_ptr<GeomAPI_Dir>(
+ new GeomAPI_Dir(myCoords->Value(0), myCoords->Value(1), myCoords->Value(2)));
+}
+
+std::shared_ptr<GeomAPI_XYZ> GeomData_Dir::xyz()
{
{
- return
boost::shared_ptr<GeomAPI_Dir>(new GeomAPI_Dir
(
- myCoords->Value(0), myCoords->Value(1), myCoords->Value(2)));
+ return
std::shared_ptr<GeomAPI_XYZ>
(
+
new GeomAPI_XYZ(
myCoords->Value(0), myCoords->Value(1), myCoords->Value(2)));
}
GeomData_Dir::GeomData_Dir(TDF_Label& theLabel)
}
GeomData_Dir::GeomData_Dir(TDF_Label& theLabel)