asmaloney / asmaloney/libE57Format

How to iterate points?

Open
#312 0 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
C++
Stars
191
Forks
82
Avg merge
7h 21m
Merged PRs (30d)
1

Description

Hi, thanks for developing such a useful library.
I need to loop through the points and extract them later into another custom format, the simplest is console output, something like this:
```
e57::Reader* reader = nullptr;
e57::E57Root fileHeader;
e57::Data3D data3DHeader;

reader = new e57::Reader("C:\\temp\\input.e57", {});
reader->GetE57Root(fileHeader);
reader->ReadData3D(0, data3DHeader);

std::cout << "pointCount = " << data3DHeader.pointCount << '\n';

e57::Data3DPointsFloat pointsData(data3DHeader);

for (size_t i = 0; i < data3DHeader.pointCount; i++)
{
std::cout << "X = " << pointsData[i].X << "Y = " << pointsData[i].Y << "Z = " << pointsData[i].Z
<< "R = " << pointsData[i].R << "G = " << pointsData[i].G << "B = " << pointsData[i].B << '\n';
}
```

but it doesn't work. help, i'm not a c++ programmer

Contributor guide

Open the contributing guide

Research direction

Start with the Reader, E57Root, Data3D, and Data3DPointsFloat entry points shown in the issue, and determine why the proposed iteration does not work. Done means providing a verified way to loop through the points and extract their fields into console or another custom format.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend-api-design
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.