Mesh segmentation
This commit is contained in:
@@ -43,7 +43,7 @@ public:
|
||||
virtual bool TestFacet (const MeshFacet &rclFacet) const = 0;
|
||||
virtual void Initialize(unsigned long);
|
||||
void AddSegment(const std::vector<unsigned long>&);
|
||||
const std::vector<MeshSegment> GetSegments() const { return segments; }
|
||||
const std::vector<MeshSegment>& GetSegments() const { return segments; }
|
||||
|
||||
protected:
|
||||
std::vector<MeshSegment> segments;
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#ifndef FEATURE_MESH_SEGMENT_H
|
||||
#define FEATURE_MESH_SEGMENT_H
|
||||
#ifndef FEATURE_MESH_SEGMENTBYMESH_H
|
||||
#define FEATURE_MESH_SEGMENTBYMESH_H
|
||||
|
||||
#include <App/PropertyStandard.h>
|
||||
|
||||
@@ -63,4 +63,4 @@ public:
|
||||
|
||||
}
|
||||
|
||||
#endif // FEATURE_MESH_SEGMENT_H
|
||||
#endif // FEATURE_MESH_SEGMENTBYMESH_H
|
||||
|
||||
@@ -1395,8 +1395,6 @@ PyObject* MeshPy::getSegmentsByCurvature(PyObject *args)
|
||||
|
||||
Py::List func(l);
|
||||
std::vector<MeshCore::MeshSurfaceSegment*> segm;
|
||||
//segm.push_back(new MeshCore::MeshCurvatureCylindricalSegment(meshCurv.GetCurvature(), minFacets, dev, 4.75f));
|
||||
//segm.push_back(new MeshCore::MeshCurvaturePlanarSegment(meshCurv.GetCurvature(), minFacets, dev));
|
||||
for (Py::List::iterator it = func.begin(); it != func.end(); ++it) {
|
||||
Py::Tuple t(*it);
|
||||
float c1 = (float)Py::Float(t[0]);
|
||||
@@ -1410,15 +1408,15 @@ PyObject* MeshPy::getSegmentsByCurvature(PyObject *args)
|
||||
|
||||
Py::List list;
|
||||
for (std::vector<MeshCore::MeshSurfaceSegment*>::iterator segmIt = segm.begin(); segmIt != segm.end(); ++segmIt) {
|
||||
std::vector<MeshCore::MeshSegment> data = (*segmIt)->GetSegments();
|
||||
delete (*segmIt);
|
||||
for (std::vector<MeshCore::MeshSegment>::iterator it = data.begin(); it != data.end(); ++it) {
|
||||
const std::vector<MeshCore::MeshSegment>& data = (*segmIt)->GetSegments();
|
||||
for (std::vector<MeshCore::MeshSegment>::const_iterator it = data.begin(); it != data.end(); ++it) {
|
||||
Py::List ary;
|
||||
for (MeshCore::MeshSegment::const_iterator jt = it->begin(); jt != it->end(); ++jt) {
|
||||
ary.append(Py::Int((int)*jt));
|
||||
}
|
||||
list.append(ary);
|
||||
}
|
||||
delete (*segmIt);
|
||||
}
|
||||
|
||||
return Py::new_reference_to(list);
|
||||
|
||||
Reference in New Issue
Block a user