| |
|
| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| |
|
| |
|
| | #ifndef MESH_MESHPROPERTIES_H
|
| | #define MESH_MESHPROPERTIES_H
|
| |
|
| | #include <list>
|
| | #include <map>
|
| | #include <set>
|
| | #include <string>
|
| | #include <vector>
|
| |
|
| | #include <Base/Handle.h>
|
| | #include <Base/Matrix.h>
|
| |
|
| | #include <Mod/Mesh/App/Core/MeshIO.h>
|
| | #include <Mod/Mesh/App/Core/MeshKernel.h>
|
| |
|
| | #include "Mesh.h"
|
| |
|
| |
|
| | namespace Mesh
|
| | {
|
| |
|
| | class MeshPy;
|
| |
|
| | |
| | |
| | |
| |
|
| | class MeshExport PropertyNormalList: public App::PropertyLists
|
| | {
|
| | TYPESYSTEM_HEADER_WITH_OVERRIDE();
|
| |
|
| | public:
|
| | PropertyNormalList();
|
| |
|
| | void setSize(int newSize) override;
|
| | int getSize() const override;
|
| |
|
| | void setValue(const Base::Vector3f&);
|
| | void setValue(float x, float y, float z);
|
| |
|
| | const Base::Vector3f& operator[](const int idx) const
|
| | {
|
| | return _lValueList[idx];
|
| | }
|
| |
|
| | void set1Value(const int idx, const Base::Vector3f& value)
|
| | {
|
| | _lValueList[idx] = value;
|
| | }
|
| |
|
| | void setValues(const std::vector<Base::Vector3f>& values);
|
| |
|
| | const std::vector<Base::Vector3f>& getValues() const
|
| | {
|
| | return _lValueList;
|
| | }
|
| |
|
| | PyObject* getPyObject() override;
|
| | void setPyObject(PyObject*) override;
|
| |
|
| | void Save(Base::Writer& writer) const override;
|
| | void Restore(Base::XMLReader& reader) override;
|
| |
|
| | void SaveDocFile(Base::Writer& writer) const override;
|
| | void RestoreDocFile(Base::Reader& reader) override;
|
| |
|
| | App::Property* Copy() const override;
|
| | void Paste(const App::Property& from) override;
|
| |
|
| | unsigned int getMemSize() const override;
|
| |
|
| | void transformGeometry(const Base::Matrix4D& rclMat);
|
| |
|
| | private:
|
| | std::vector<Base::Vector3f> _lValueList;
|
| | };
|
| |
|
| |
|
| | struct MeshExport CurvatureInfo
|
| | {
|
| | float fMaxCurvature {0.0F};
|
| | float fMinCurvature {0.0F};
|
| | Base::Vector3f cMaxCurvDir;
|
| | Base::Vector3f cMinCurvDir;
|
| | };
|
| |
|
| | |
| | |
| |
|
| | class MeshExport PropertyCurvatureList: public App::PropertyLists
|
| | {
|
| | TYPESYSTEM_HEADER_WITH_OVERRIDE();
|
| |
|
| | public:
|
| | enum
|
| | {
|
| | MeanCurvature = 0,
|
| | GaussCurvature = 1,
|
| | MaxCurvature = 2,
|
| | MinCurvature = 3,
|
| | AbsCurvature = 4
|
| | };
|
| |
|
| | public:
|
| | PropertyCurvatureList();
|
| |
|
| | void setSize(int newSize) override
|
| | {
|
| | _lValueList.resize(newSize);
|
| | }
|
| | int getSize() const override
|
| | {
|
| | return _lValueList.size();
|
| | }
|
| | std::vector<float> getCurvature(int tMode) const;
|
| | void setValue(const CurvatureInfo&);
|
| | void setValues(const std::vector<CurvatureInfo>&);
|
| |
|
| |
|
| | const CurvatureInfo& operator[](const int idx) const
|
| | {
|
| | return _lValueList[idx];
|
| | }
|
| | void set1Value(const int idx, const CurvatureInfo& value)
|
| | {
|
| | _lValueList[idx] = value;
|
| | }
|
| | const std::vector<CurvatureInfo>& getValues() const
|
| | {
|
| | return _lValueList;
|
| | }
|
| | void transformGeometry(const Base::Matrix4D& rclMat);
|
| |
|
| | void Save(Base::Writer& writer) const override;
|
| | void Restore(Base::XMLReader& reader) override;
|
| |
|
| | void SaveDocFile(Base::Writer& writer) const override;
|
| | void RestoreDocFile(Base::Reader& reader) override;
|
| |
|
| |
|
| |
|
| | PyObject* getPyObject() override;
|
| | void setPyObject(PyObject* value) override;
|
| |
|
| |
|
| | App::Property* Copy() const override;
|
| | void Paste(const App::Property& from) override;
|
| |
|
| | unsigned int getMemSize() const override
|
| | {
|
| | return _lValueList.size() * sizeof(CurvatureInfo);
|
| | }
|
| |
|
| | private:
|
| | std::vector<CurvatureInfo> _lValueList;
|
| | };
|
| |
|
| | |
| |
|
| | class MeshExport PropertyMaterial: public App::Property
|
| | {
|
| | TYPESYSTEM_HEADER_WITH_OVERRIDE();
|
| |
|
| | public:
|
| | PropertyMaterial() = default;
|
| |
|
| | |
| |
|
| | void setValue(const MeshCore::Material& value);
|
| | void setAmbientColor(const std::vector<Base::Color>& value);
|
| | void setDiffuseColor(const std::vector<Base::Color>& value);
|
| | void setSpecularColor(const std::vector<Base::Color>& value);
|
| | void setEmissiveColor(const std::vector<Base::Color>& value);
|
| | void setShininess(const std::vector<float>&);
|
| | void setTransparency(const std::vector<float>&);
|
| | void setBinding(MeshCore::MeshIO::Binding);
|
| |
|
| | const MeshCore::Material& getValue() const;
|
| | const std::vector<Base::Color>& getAmbientColor() const;
|
| | const std::vector<Base::Color>& getDiffuseColor() const;
|
| | const std::vector<Base::Color>& getSpecularColor() const;
|
| | const std::vector<Base::Color>& getEmissiveColor() const;
|
| | const std::vector<float>& getShininess() const;
|
| | const std::vector<float>& getTransparency() const;
|
| | MeshCore::MeshIO::Binding getBinding() const;
|
| |
|
| | PyObject* getPyObject() override;
|
| | void setPyObject(PyObject*) override;
|
| |
|
| | void Save(Base::Writer& writer) const override;
|
| | void Restore(Base::XMLReader& reader) override;
|
| |
|
| | void SaveDocFile(Base::Writer& writer) const override;
|
| | void RestoreDocFile(Base::Reader& reader) override;
|
| |
|
| | const char* getEditorName() const override;
|
| |
|
| | Property* Copy() const override;
|
| | void Paste(const Property& from) override;
|
| |
|
| | unsigned int getMemSize() const override;
|
| | bool isSame(const Property& other) const override;
|
| |
|
| | private:
|
| | MeshCore::Material _material;
|
| | };
|
| |
|
| | |
| | |
| |
|
| | class MeshExport PropertyMeshKernel: public App::PropertyComplexGeoData
|
| | {
|
| | TYPESYSTEM_HEADER_WITH_OVERRIDE();
|
| |
|
| | public:
|
| | PropertyMeshKernel();
|
| | ~PropertyMeshKernel() override;
|
| |
|
| | PropertyMeshKernel(const PropertyMeshKernel&) = delete;
|
| | PropertyMeshKernel(PropertyMeshKernel&&) = delete;
|
| | PropertyMeshKernel& operator=(const PropertyMeshKernel&) = delete;
|
| | PropertyMeshKernel& operator=(PropertyMeshKernel&&) = delete;
|
| |
|
| |
|
| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| |
|
| | void setValuePtr(MeshObject* m);
|
| |
|
| | void setValue(const MeshObject& m);
|
| |
|
| | void setValue(const MeshCore::MeshKernel& m);
|
| |
|
| | void swapMesh(MeshObject&);
|
| |
|
| | void swapMesh(MeshCore::MeshKernel&);
|
| | |
| | |
| |
|
| | const MeshObject& getValue() const;
|
| | const MeshObject* getValuePtr() const;
|
| | unsigned int getMemSize() const override;
|
| |
|
| |
|
| |
|
| |
|
| | const Data::ComplexGeoData* getComplexData() const override;
|
| |
|
| | Base::BoundBox3d getBoundingBox() const override;
|
| |
|
| |
|
| |
|
| |
|
| | MeshObject* startEditing();
|
| | void finishEditing();
|
| |
|
| | void transformGeometry(const Base::Matrix4D& rclMat) override;
|
| | void setPointIndices(const std::vector<std::pair<PointIndex, Base::Vector3f>>&);
|
| | void setTransform(const Base::Matrix4D& rclTrf) override;
|
| | Base::Matrix4D getTransform() const override;
|
| |
|
| |
|
| |
|
| |
|
| | |
| | |
| | |
| |
|
| | PyObject* getPyObject() override;
|
| | |
| | |
| | |
| | |
| |
|
| | void setPyObject(PyObject* value) override;
|
| |
|
| |
|
| | const char* getEditorName() const override
|
| | {
|
| | return "MeshGui::PropertyMeshKernelItem";
|
| | }
|
| |
|
| |
|
| |
|
| | void Save(Base::Writer& writer) const override;
|
| | void Restore(Base::XMLReader& reader) override;
|
| |
|
| | void SaveDocFile(Base::Writer& writer) const override;
|
| | void RestoreDocFile(Base::Reader& reader) override;
|
| |
|
| | App::Property* Copy() const override;
|
| | void Paste(const App::Property& from) override;
|
| |
|
| |
|
| | private:
|
| | Base::Reference<MeshObject> _meshObject;
|
| | MeshPy* meshPyObject {nullptr};
|
| | };
|
| |
|
| | }
|
| |
|
| | #endif
|
| |
|