diff --git a/src/Mod/Mesh/App/MeshProperties.cpp b/src/Mod/Mesh/App/MeshProperties.cpp index 7c3425834..38258bc2a 100644 --- a/src/Mod/Mesh/App/MeshProperties.cpp +++ b/src/Mod/Mesh/App/MeshProperties.cpp @@ -192,7 +192,7 @@ unsigned int PropertyNormalList::getMemSize (void) const return static_cast(_lValueList.size() * sizeof(Base::Vector3f)); } -void PropertyNormalList::transform(const Base::Matrix4D &mat) +void PropertyNormalList::transformGeometry(const Base::Matrix4D &mat) { // A normal vector is only a direction with unit length, so we only need to rotate it // (no translations or scaling) @@ -222,7 +222,6 @@ void PropertyNormalList::transform(const Base::Matrix4D &mat) } hasSetValue(); - } // ---------------------------------------------------------------------------- @@ -300,7 +299,7 @@ std::vector PropertyCurvatureList::getCurvature( int mode ) const return fValues; } -void PropertyCurvatureList::transform(const Base::Matrix4D &mat) +void PropertyCurvatureList::transformGeometry(const Base::Matrix4D &mat) { // The principal direction is only a vector with unit length, so we only need to rotate it // (no translations or scaling) diff --git a/src/Mod/Mesh/App/MeshProperties.h b/src/Mod/Mesh/App/MeshProperties.h index 94efa5786..567eecde7 100644 --- a/src/Mod/Mesh/App/MeshProperties.h +++ b/src/Mod/Mesh/App/MeshProperties.h @@ -65,11 +65,11 @@ public: void setValue(float x, float y, float z); const Base::Vector3f& operator[] (const int idx) const { - return _lValueList.operator[] (idx); + return _lValueList[idx]; } void set1Value (const int idx, const Base::Vector3f& value) { - _lValueList.operator[] (idx) = value; + _lValueList[idx] = value; } void setValues (const std::vector& values); @@ -92,7 +92,7 @@ public: virtual unsigned int getMemSize (void) const; - void transform(const Base::Matrix4D &rclMat); + void transformGeometry(const Base::Matrix4D &rclMat); private: std::vector _lValueList; @@ -132,10 +132,16 @@ public: void setValues(const std::vector&); /// index operator - const CurvatureInfo& operator[] (const int idx) const {return _lValueList.operator[] (idx);} - void set1Value (const int idx, const CurvatureInfo& value){_lValueList.operator[] (idx) = value;} - const std::vector &getValues(void) const{return _lValueList;} - void transform(const Base::Matrix4D &rclMat); + const CurvatureInfo& operator[] (const int idx) const { + return _lValueList[idx]; + } + void set1Value (const int idx, const CurvatureInfo& value) { + _lValueList[idx] = value; + } + const std::vector &getValues(void) const { + return _lValueList; + } + void transformGeometry(const Base::Matrix4D &rclMat); void Save (Base::Writer &writer) const; void Restore(Base::XMLReader &reader); @@ -231,7 +237,9 @@ public: void setPyObject(PyObject *value); //@} - const char* getEditorName(void) const { return "MeshGui::PropertyMeshKernelItem"; } + const char* getEditorName(void) const { + return "MeshGui::PropertyMeshKernelItem"; + } /** @name Save/restore */ //@{ diff --git a/src/Mod/Points/App/Properties.cpp b/src/Mod/Points/App/Properties.cpp index 4aecac874..1c94f60d8 100644 --- a/src/Mod/Points/App/Properties.cpp +++ b/src/Mod/Points/App/Properties.cpp @@ -364,7 +364,7 @@ unsigned int PropertyNormalList::getMemSize (void) const return static_cast(_lValueList.size() * sizeof(Base::Vector3f)); } -void PropertyNormalList::transform(const Base::Matrix4D &mat) +void PropertyNormalList::transformGeometry(const Base::Matrix4D &mat) { // A normal vector is only a direction with unit length, so we only need to rotate it // (no translations or scaling) @@ -386,10 +386,14 @@ void PropertyNormalList::transform(const Base::Matrix4D &mat) } } + aboutToSetValue(); + // Rotate the normal vectors for (int ii=0; ii& uIndices ) @@ -489,7 +493,7 @@ std::vector PropertyCurvatureList::getCurvature( int mode ) const return fValues; } -void PropertyCurvatureList::transform(const Base::Matrix4D &mat) +void PropertyCurvatureList::transformGeometry(const Base::Matrix4D &mat) { // The principal direction is only a vector with unit length, so we only need to rotate it // (no translations or scaling) @@ -511,6 +515,8 @@ void PropertyCurvatureList::transform(const Base::Matrix4D &mat) } } + aboutToSetValue(); + // Rotate the principal directions for (int ii=0; ii& uIndices ) diff --git a/src/Mod/Points/App/Properties.h b/src/Mod/Points/App/Properties.h index 584515bb3..6f2c6c68e 100644 --- a/src/Mod/Points/App/Properties.h +++ b/src/Mod/Points/App/Properties.h @@ -71,13 +71,19 @@ public: void setValue(float); /// index operator - float operator[] (const int idx) const {return _lValueList.operator[] (idx);} - - void set1Value (const int idx, float value){_lValueList.operator[] (idx) = value;} + float operator[] (const int idx) const { + return _lValueList[idx]; + } + + void set1Value (const int idx, float value) { + _lValueList[idx] = value; + } void setValues (const std::vector& values); - const std::vector &getValues(void) const{return _lValueList;} - + const std::vector &getValues(void) const { + return _lValueList; + } + virtual PyObject *getPyObject(void); virtual void setPyObject(PyObject *); @@ -115,11 +121,11 @@ public: void setValue(float x, float y, float z); const Base::Vector3f& operator[] (const int idx) const { - return _lValueList.operator[] (idx); + return _lValueList[idx]; } void set1Value (const int idx, const Base::Vector3f& value) { - _lValueList.operator[] (idx) = value; + _lValueList[idx] = value; } void setValues (const std::vector& values); @@ -144,7 +150,7 @@ public: /** @name Modify */ //@{ - void transform(const Base::Matrix4D &rclMat); + void transformGeometry(const Base::Matrix4D &rclMat); void removeIndices( const std::vector& ); //@} @@ -178,16 +184,26 @@ public: PropertyCurvatureList(); ~PropertyCurvatureList(); - void setSize(int newSize){_lValueList.resize(newSize);} - int getSize(void) const {return _lValueList.size();} + void setSize(int newSize) { + _lValueList.resize(newSize); + } + int getSize(void) const { + return _lValueList.size(); + } void setValue(const CurvatureInfo&); void setValues(const std::vector&); std::vector getCurvature( int tMode) const; /// index operator - const CurvatureInfo& operator[] (const int idx) const {return _lValueList.operator[] (idx);} - void set1Value (const int idx, const CurvatureInfo& value){_lValueList.operator[] (idx) = value;} - const std::vector &getValues(void) const{return _lValueList;} + const CurvatureInfo& operator[] (const int idx) const { + return _lValueList[idx]; + } + void set1Value (const int idx, const CurvatureInfo& value) { + _lValueList[idx] = value; + } + const std::vector &getValues(void) const { + return _lValueList; + } /** @name Save/restore */ //@{ @@ -209,7 +225,7 @@ public: /** @name Modify */ //@{ - void transform(const Base::Matrix4D &rclMat); + void transformGeometry(const Base::Matrix4D &rclMat); void removeIndices( const std::vector& ); //@}