Comments (6)
Just done the following check:
#include <Bff.h>
#include <MeshIO.h>
#include <iostream>
int main(int argc, char** argv) {
std::ifstream ifs("./test_mesh.obj");
std::stringstream ss_content;
std::string content;
std::istringstream iss_content;
if(ifs) {
std::cout << "Reading file!" << std::endl;
ss_content << ifs.rdbuf();
content = ss_content.str();
iss_content = std::istringstream(content);
}
ifs.close();
Mesh test_mesh;
if(!MeshIO::read(iss_content,test_mesh))
std::cout << "Reading problems!" << std::endl;
test_mesh.write("./output_test_mesh.obj", false, false);
return 0;
}
And I get the same problem, so the processing has nothing to do with it.
from boundary-first-flattening.
The output of your binaries is instead the following:
v 0.707107 -0.707107 0
v 0.707107 0.707107 0
v -0.707107 0.707107 0
v -0.707107 -0.707107 0
vt 1 2e-08
vt -1e-08 1
vt 1e-08 -1
vt -1e-08 1
vt -1 -2e-08
vt 1e-08 -1
f 1/3 2/1 3/2
f 1/6 3/4 4/5
Why are the coordinates scaled?
from boundary-first-flattening.
Never mind it worked... I probably wasn't supposed to use the MeshIO
class... by using the following
#include <Bff.h>
#include <MeshIO.h>
#include <iostream>
int main(int argc, char** argv) {
Mesh test_mesh;
if(!test_mesh.read("./test_mesh.obj"))
std::cout << "Reading problems!" << std::endl;
BFF flattening_module(test_mesh);
EigenDenseMatrix boundaryData(flattening_module.data->bN);
std::cout << "flattening mesh" << std::endl;
flattening_module.flatten(boundaryData,true);
std::cout << "mesh flattened, now storing into a file" << std::endl;
test_mesh.write("./output_test_mesh.obj",false,true);
return 0;
}
I got the following output:
v 0.707107 -0.707107 0
v 0.707107 0.707107 0
v -0.707107 0.707107 0
v -0.707107 -0.707107 0
vt 0.853553 0.853553
vt 0.146447 0.853553
vt 0.853553 0.146447
vt 0.146447 0.853553
vt 0.146447 0.146447
vt 0.853553 0.146447
f 1/3 2/1 3/2
f 1/6 3/4 4/5
Which is the same as the one provided by your tool (with the rescaling enabled). But again, is there a reason why the coordinates are scaled?
from boundary-first-flattening.
The mesh class "normalizes" the model, which it probably shouldn't do. I would comment out this line:
from boundary-first-flattening.
Is this final normalization a mistake then?
from boundary-first-flattening.
Yes, it won't be there in the next version.
from boundary-first-flattening.
Related Issues (20)
- seeking surface model with holes HOT 3
- Port to wasm for web
- Mesh has isolated vertex HOT 1
- Include GLFW as Dependency HOT 2
- Concepts in the project HOT 1
- Compile with emscripten question HOT 2
- UV Overlapping problem? HOT 2
- AdjacencyTable uses a slow data structure HOT 1
- `std::vector<bool>` has unfortuante and unexpected implementation HOT 1
- Half edge mesh operations cannot be inlined HOT 1
- Mesh has non manifold vertices HOT 2
- Mac Command Line error - Access Denied HOT 2
- non-manifold edges warning when holes/multiple components HOT 1
- README needs an update for the C++ interface HOT 2
- Asymmetric result after flattening HOT 7
- Vector subscript is out of range exception. PolygonSoup.cpp. HOT 4
- About flattening to a rectangle with specified aspect ratio HOT 3
- How to output area distortion from an app HOT 2
- feat: Export error/quality measures
- Parallel unwrapping
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from boundary-first-flattening.