valette / acvd Goto Github PK
View Code? Open in Web Editor NEWFast simplification of 3D surface meshes
Home Page: https://www.creatis.insa-lyon.fr/~valette/public/project/acvd/
License: Other
Fast simplification of 3D surface meshes
Home Page: https://www.creatis.insa-lyon.fr/~valette/public/project/acvd/
License: Other
In ACVDQ, the winding order from the triangles in the simplified mesh appears to be backwards.
When I create the solution with cmake it doesn't generate the vtkDiscreteRemeshing project, and when I compile I'm missing vtkDiscreteRemeshing.lib
Hello, I've come across a slew of compilation errors using the environment described above. Do you guys plan to support these? Example error below.
Thanks,
Omar
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:317:9: error: no member named 'signbit' in the global namespace using ::signbit;
Please patch this into xmlParser.cpp.
Have you guys kept your code up to date with the latest releases of VTK? I am getting errors when trying to compile. I noticed the code was released in 2008, so I assume that it hasn't been updated along with changing vtk classes. Let me know if I am correct in assuming this.
I am trying to build ACVD using latest VTK 9.0 library.
But when building against vtkSurfaceBase.h , the compiler aborts with errors:
vtkIdType n,*pts;
this->Polys->GetCell(this->Cells->GetCellLocation(face),n,pts);
The error message is:
“GetCellLocation” is not a member of vtkPolyData_detail::CellMap
How may I fix this?
Hello,
Just a small detail, but on the command line interface, the doc specify :
-d 0/1/2 : enables display (default : 0)
but the real default value is 1.
Should change the default value in DiscreteRemeshing/Examples/ACVD.cxx:60 and DiscreteRemeshing/Examples/ACVDQ.cxx:80, or change the doc in DiscreteRemeshing/Examples/ACVD.cxx:87 and DiscreteRemeshing/Examples/ACVDQ.cxx:103
I built ACVD on Windows 10 64 bit, VS2015, VTK 7.0.0.
Using .obj files as input does not correctly generate output ply files.
Here is the bunny model clustered with ACVD:
https://www.dropbox.com/s/x1wm0ltejrq61kw/bunnyClusters.jpg?dl=0
It does not match the bunny clustering quality on the ACVD page:
http://www.creatis.insa-lyon.fr/site/sites/default/files/resize/remote/89b80c070ee02e75a1627fe5e2a30065-224x226.gif
Command line options: bunny.obj 300 0
Are there options that options that I am missing?
Hi ACVD developers,
I am building ACVD using VTK 9 using MSVC (16.11.11) from Visual Studio 2019 for x64 architecture and the compilation failed due to the error "int to vtkIdType conversion" on line 119 in vtkVerticesProcessing.h.
It seems like easy fix. I just replace line 118 with
// int NumberOfEdges,*Edges,i;
vtkIdType NumberOfEdges,*Edges,i;
Then, the complication is succesful.
While trying to compile this project against the latest VTK (v7.1.0), I ran into a compile error with vtkstd
being used. It appears that this has been deprecated and should probably be changed to the regular std
namespace. Doing so in VolumeProcessing/vtkOOCMetaImageReader.cxx
made the build pass again.
Windows 10, x64 VS2015, Debug
Windows crashes when running ACVD with display on.
repro:
Run ACVD
close first window that pops up
close second window
What is the process for getting a remerged mesh with display enabled. I can't find any docs that describe the steps.
Setting the variable 'Display' to 0 runs without crashing.
Dear author,
Sometimes I found that the specified number of clusters is not equal to the number of vertices in the output mesh. Is it something that is inherent in this method or is it a bug?
Thank you!
Xingtong
Converting input to coarse quads would be very useful.
Hi,
I used ACVDQ
to remesh a simple cylinder stl but the output file has self-intersection tris (Tri4 and Tri11).
Tri4: 86 97 20
Tri11: 86 20 74
Here is the log and stl files are attached.
ACVDQ.exe RemeshInput_CAVD.stl 1000 0.0 -m 0 -v 0 -b 1 -o F:\PyGeoMesh\Results\ -of RemeshMesh_ACVD.ply
load : F:\PyGeoMesh\Results\RemeshInput_CAVD.stl
*****************************************************************************
Mesh with 1890 polygons, 947 points, 2835 edges
Bounding Box: [320.5, 279.8, 339.5]
[559.5, 519.504, 490.5]
The mesh is made only of 1890 triangles
0 non-manifold edges and 0 boundary edges
The mesh has 1 connected components
Valences entropy: 1.76791
0 disconnected vertices, 947 connected vertices
48.5744 percent of irregular vertices
Mesh geometry qualitity:
AngleMin=27.9745
AverageMinAngle=44.9631
Qmin=0.46611
Qav=0.806352
P30=0.15873
*****************************************************************************
Force Manifold=0
Setting output verbose : 0
Setting boundary fixing to : 1
OutputDirectory: F:\PyGeoMesh\Results\
Output file name: RemeshMesh_ACVD.ply
Setting Metric Constraint to 0
Unconstrained initialization done
Setting Metric Constraint to 1
*****************************************************************************
Mesh with 1996 polygons, 1000 points, 2994 edges
Bounding Box: [320.433, 279.8, 339.433]
[559.554, 519.597, 490.536]
The mesh is made only of 1996 triangles
0 non-manifold edges and 0 boundary edges
The mesh has 1 connected components
Valences entropy: 1.68123
0 disconnected vertices, 1000 connected vertices
49.9 percent of irregular vertices
Mesh geometry qualitity:
AngleMin=14.2918
AverageMinAngle=45.1805
Qmin=0.23902
Qav=0.809694
P30=0.835003
*****************************************************************************
The remesh took :0.425 seconds.
Thanks for sharing this nice code. I'm new to this tool. I found there are many tools here:
Can you add few simple tutorials/examples with data in Readme.md to show how to use your codes for each of them? I think hand model and fandisk in your paper are good cases.
I found this Python implementation of ACVD is a good example.
I think I was able to replace vtkSimpleCriticalSection.h
with mutex
it compiles but wondered if there is any regression test that we could make to check the code still works the same as before.
I just found a small bug while comping ACVDQ in windows.
// Line 246 @ ACVDQ.cxx
bool* fixed = new bool[mesh->GetNumberOfPoints()];
//bool fixed[ mesh->GetNumberOfPoints() ]; //Dynamic array should be used here
fixedVertices = vtkIdList::New();
int id, n = 0;
for ( int i = 0; i < mesh->GetNumberOfPoints(); i++ )
fixed[ i ] = false;
while( input >> id ) {
n++;
vtkIdType v1, v2, v3;
mesh->GetFaceVertices( id, v1, v2, v3 );
fixed[ v1 ] = fixed[ v2 ] = fixed[ v3 ] = true;
}
for ( int i = 0; i < mesh->GetNumberOfPoints(); i++ )
if ( fixed[ i ] ) fixedVertices->InsertNextId( i );
input.close();
cout << "Added " << n << " constraints on triangles" << endl;
delete[] fixed; //Free dynamic error
}
Can you check this issue and update your code?
Hello !
I use MacOS X Mojave 10.14.4 and Windows 10 up to date.
In my case, i need to use ACVD for deploy a complex deformable sphere.
I search in this github repository but i did not find anything...
Has anyone ever encountered any differences?
With the same input...
Windows ouput :
Mesh with 3040 polygons, 1522 points, 4560 edges
Bounding Box: [94.6748, 63.8625, -75.726]
[101.292, 70.7261, -66.4477]
The mesh is made only of 3040 triangles
0 non-manifold edges and 0 boundary edges
The mesh has 1 connected components
Valences entropy: 1.64355
0 disconnected vertices, 1522 connected vertices
46.6491 percent of irregular vertices
Mesh geometry qualitity:
AngleMin=24.1465
AverageMinAngle=46.4177
Qmin=0.437835
Qav=0.827767
P30=0.372807
Mac ouput :
Mesh with 3040 polygons, 1522 points, 4560 edges
Bounding Box: [94.6693, 63.8688, -75.7243]
[101.3, 70.7324, -66.4492]
The mesh is made only of 3040 triangles
0 non-manifold edges and 0 boundary edges
The mesh has 1 connected components
Valences entropy: 1.66243
0 disconnected vertices, 1522 connected vertices
47.7004 percent of irregular vertices
Mesh geometry qualitity:
AngleMin=19.2219
AverageMinAngle=46.4299
Qmin=0.312611
Qav=0.827966
P30=0.307018
Regards
I try to use ACVD to simplify a 500M obj,this is the command:
ACVD.exe 1.obj 70000 0
and this is the output message:
load : 1.obj
*****************************************************************************
Mesh with 6977920 polygons, 6977922 points, 13955840 edges
The mesh is made of 0 triangles, 6977920 quads and 0 other polygons
0 non-manifold edges and 0 boundary edges
The mesh has 1 connected components
Valences entropy: 0.0056823
0 disconnected vertices, 6.97792e+006 connected vertices
99.9996 percent of irregular vertices
*****************************************************************************
Input mesh: 6977922 vertices and 6977920 faces
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
I just built this today, and I needed to install a few extra dependencies that weren't listed in order to get it to work.
I'm using Arch Linux (5.7.10-arch1-1) and these extra packages were needed:
This comment helped a lot:
PointCloudLibrary/pcl#2616 (comment)
Thanks!
ACVD cow.obj 200 0
model is here
https://www.dropbox.com/s/mdm55swrd1245do/cow.obj?dl=0
ACVD cow.obj 200 0 -m 1
cause abnormal exit with "Not enough spare clusters! allocate more"
Hello,
I am trying to compile the latest version of ACVD with Visual Studio 2017. However, when I build the solution, I get a lot of the following:
fatal error LNK1181: cannot open input file 'vtkChartsCore.lib'
fatal error LNK1181: cannot open input file '..\..\bin\Release\vtkSurface.lib'
fatal error LNK1181: cannot open input file '..\..\bin\Release\vtkDiscreteRemeshing.lib'
What could be the cause?
Note: I am using VTK 7.1.1
Thanks!
In c++17, which is default standard for gcc 11, the random_shuffle function is deprecated : https://en.cppreference.com/w/cpp/algorithm/random_shuffle (this page also gives alternative implementation with random_device which is c++11 compliant)
Only one occurrence is found in the code :
ACVD/Common/vtkUniformClustering.h
Line 1195 in d3e1f6c
Note1 gcc still build it but MSVC does not.
Note2 'register' keyword is unused in c++17 and many warnings are thrown
Horse model here:
https://www.dropbox.com/s/je2eor0c1dwt4ec/horse.ply?dl=0
acvdq horse.ply 200 0 -m 1 -sc 1000
Even 'acvdq 500 0 -m 1 -sc 1000' has issues on the legs.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.