Mesh: define the typenames FacetIndex and PointIndex to distinguish between facet and point related indexes

This commit is contained in:
wmayer
2021-09-14 23:01:29 +02:00
parent 9ce79bf3c7
commit 2295c4b9a3
91 changed files with 2057 additions and 2254 deletions

View File

@@ -180,9 +180,9 @@ bool MergeExporter::addMesh(const char *name, const MeshObject & mesh)
for (unsigned long i=0; i<numSegm; i++) {
const Segment& segm = mesh.getSegment(i);
if (segm.isSaved()) {
std::vector<unsigned long> indices = segm.getIndices();
std::vector<FacetIndex> indices = segm.getIndices();
std::for_each( indices.begin(), indices.end(),
[countFacets] (unsigned long &v) {
[countFacets] (FacetIndex &v) {
v += countFacets;
} );
Segment new_segm(&mergingMesh, indices, true);
@@ -192,9 +192,9 @@ bool MergeExporter::addMesh(const char *name, const MeshObject & mesh)
}
} else {
// now create a segment for the added mesh
std::vector<unsigned long> indices;
std::vector<FacetIndex> indices;
indices.resize(mergingMesh.countFacets() - countFacets);
std::generate(indices.begin(), indices.end(), Base::iotaGen<unsigned long>(countFacets));
std::generate(indices.begin(), indices.end(), Base::iotaGen<FacetIndex>(countFacets));
Segment segm(&mergingMesh, indices, true);
segm.setName(name);
mergingMesh.addSegment(segm);