Esri / Esri/i3s-lib

Some confusing about convert_geometry() funciton of i3s_writer_impl.cpp.

Open
#14 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
31
Forks
14
PR merge metrics
No merged PRs in 30d

Description

In function `i3slib::i3s::convert_geomery()`, I notice that `src_pos` return a relative position of mesh, which should be a `std::vector`, and the `src_pos.size()` should return the size of vertices. But when I use a vertices with triangluar indices, the `size()` function of `Mesh_attrb` return an index size like this:
![image](https://github.com/Esri/i3s-lib/assets/37645461/ec35f237-d282-41d3-aabe-150a3da3efd0)
so, the next step code (in row 213)
![image](https://github.com/Esri/i3s-lib/assets/37645461/8b40b515-a198-40cf-b087-f0978b195415)
will always touch an assert: ERROR: mesh->size() != rel_pos.size();
I want to know, did I miss something? or the indices should not calculate like this?
![image](https://github.com/Esri/i3s-lib/assets/37645461/25f61b12-cc23-4565-a970-b301a5a61681)

Contributor guide

Open the contributing guide

Research direction

Start in i3s_writer_impl.cpp at convert_geometry() and inspect how src_pos, Mesh_attrb::size(), and triangular indices are populated before the assertion at row 213. Reproduce the reported mesh case and determine whether the conversion should compare vertex counts or index counts; done means the assertion behavior is explained and the issue’s expected handling is clear.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-graphics
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.