Skip to content

glb/glTF I/O question #1171

Answered by pca006132
starseeker asked this question in Q&A
Feb 26, 2025 · 4 comments · 18 replies
Discussion options

You must be logged in to vote

Ah, we actually faced this problem and we wrote a custom obj file IO for this dumping full double precision for vertex positions:

manifold/src/impl.cpp

Lines 604 to 688 in cba9e35

#ifdef MANIFOLD_DEBUG
std::ostream& operator<<(std::ostream& stream, const Manifold::Impl& impl) {
stream << std::setprecision(17); // for double precision
stream << "# ======= begin mesh ======" << std::endl;
stream << "# tolerance = " << impl.tolerance_ << std::endl;
stream << "# epsilon = " << impl.epsilon_ << std::endl;
// TODO: Mesh relation, vertex normal and face normal
for (const vec3& v : impl.vertPos_)
stream << "v " << v.x << " " << v.y << " " << v.z

Replies: 4 comments 18 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by starseeker
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
18 replies
@pca006132
Comment options

@starseeker
Comment options

@starseeker
Comment options

@pca006132
Comment options

@starseeker
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #1170 on February 27, 2025 08:45.