Giter Club home page Giter Club logo

vcglib's People

Contributors

alemuntoni avatar brettle avatar christian-rauch avatar cignoni avatar davegargan avatar davidboening avatar dibenedetto avatar gabryon99 avatar ganovelli avatar gianpaolopalma avatar giorgiomarcias avatar github-actions[bot] avatar granzuglia avatar iasonmanolas avatar jmespadero avatar johnmaf avatar korialis avatar lucagrementieri avatar maggio-a avatar malomo avatar matteodelle avatar maxcorsini avatar mcallieri avatar nicopietroni avatar norbertwenzel avatar pfasano99 avatar ponchio avatar potenziani avatar yurand2000 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vcglib's Issues

Quadric Edge Collapse Decimation crashes with !math::IsNAN(ndiff).

I have a textured mesh with 4958437 vn 9912299 fn (1.2GB OBJ file) that somehow crashes TriEdgeCollapseQuadricTex. Any idea how to debug this?

Starting Script of 1 actionsfilter: Simplification: Quadric Edge Collapse Decimation (with texture)
meshlabserver: ../../../../vcglib/vcg/complex/algorithms/local_optimization/tri_edge_collapse_quadric_tex.h:358: vcg::tri::TriEdgeCollapseQuadricTex<TriMeshType, VertexPair, MYTYPE, HelperType>::ScalarType vcg::tri::TriEdgeCollapseQuadricTex<TriMeshType, VertexPair, MYTYPE, HelperType>::ComputeTexPriority(const double*, vcg::Quadric5&, vcg::BaseParameterClass*) [with TriMeshType = CMeshO; VertexPair = vcg::tri::BasicVertexPair; MYTYPE = vcg::tri::MyTriEdgeCollapseQTex; HelperType = vcg::tri::QuadricTexHelper; vcg::tri::TriEdgeCollapseQuadricTex<TriMeshType, VertexPair, MYTYPE, HelperType>::ScalarType = float]: Assertion `!math::IsNAN(ndiff)' failed.

UBSAN: undefined behaviour in vcg/complex/allocate.h

Hi,
I am the author of the R-package Rvcg based on vcglib. I get the following ubsan messages

vcglib/vcg/complex/allocate.h:984:32: runtime error: addition of unsigned offset to 0x7f7f83c53800 overflowed to 0x7f7f83c53798
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior vcglib/vcg/complex/allocate.h:984:32 in 
vcglib/vcg/complex/allocate.h:1012:35: runtime error: addition of unsigned offset to 0x7f7f83c53800 overflowed to 0x7f7f83c53798
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior vcglib/vcg/complex/allocate.h:1012:35 in 

I cannot submit a new package version until this is fixed (I can patch my version of the code without bothering upstream. Any help would be highly appreciated.

VCG_USE_EIGEN compiling error

I am using vcglib for a research project relating to 3D reconstruction. I hope you can help me out with a bug in vcg lib.

Everything is good until I tried to enable the flag "VCG_USE_EIGEN" because it seems more convenient, for example, to multiply a scalar with vcg::Point3f just by typing vcg::Point3f p = 0.3 * vcg::Point3f(1,2,3), which can't be done with deprecated_point3.h

It seems the include code in eigen.h still import
"#include "../../eigenlib/Eigen/Array" even it's removed in eigen 3.xx.

I am compiling vcglib in Windows 10, branch devel.

Assertion failed: j>=0 && j<this->VN(), file C:\vcglib-1.0.1\vcg/simplex/face/component_polygon.h, line 70

I compiled it in debug and release without any errors with the following environment:

Windows 10 32 bit MSVC 2015 V14 compiler

When I execute my program

C:\Users\me\Documents\projectCGALII\build\Debug>cgal_vtk_test.exe pig.stl

and i get the following error:

Assertion failed: j>=0 && jVN(), file C:\vcglib-1.0.1\vcg/simplex/face/component_polygon.h, line 70

See the attached files please(ignore cgal strings). What's wrong?

https://drive.google.com/open?id=1fEqZft_OhHxTsAvio58_TWOtvrYbGCOA

-----------------------------------------------------------------Code----------------------------------------------------------

int  nonManifoldEdge(const char* filename)
{
    int loadmask;
    vcg::tri::io::ImporterSTL<PMesh>::OpenBinary(pm, filename, loadmask);
    //vcg::tri::UpdateTopology<PMesh>::FaceFace(pm);
    //vcg::tri::Clean<PMesh>::RemoveNonManifoldFace(pm);
    //vcg::tri::UpdateTopology<PMesh>::FaceFace(pm);
    //assert(vcg::tri::Clean<PMesh>::CountNonManifoldEdgeFF(pm));
    return vcg::tri::Clean<PMesh>::CountNonManifoldEdgeFF(pm);
}

int main(int argc, char* argv[])
{
    std::cout << "Count non manifold Edge: " << nonManifoldEdge(argv[1]) << std::endl;
    return 0;
}

Assertion `0' failed when run the trimesh_clustering sample.

I run command./trimesh_clustering ./Zeus.obj.ply out.ply, but I get this,

Input mesh vn:152059 fn:304114
Clustering to 95472 cells
Grid of 51 x 26 x 72 cells
with cells size of 0.48 x 0.49 x 0.48 units
trimesh_clustering: vcglib/vcg/simplex/vertex/component.h:75: vcg::vertex::EmptyCore::ColorType& vcg::vertex::EmptyCore::C() [with TT = MyUsedTypes; vcg::vertex::EmptyCore::ColorType = vcg::Color4]: Assertion `0' failed.
Aborted

Zeus.obj.ply file is like this,

ply
format ascii 1.0
comment VCGLIB generated
element vertex 152059
property float x
property float y
property float z
property int flags
property uchar red
property uchar green
property uchar blue
property uchar alpha
element face 304114
property list uchar int vertex_indices
end_header
-6.17266 0.227923 17.2279 0 192 192 192 255
-6.21338 0.633413 26.6069 0 192 192 192 255
2.48586 -2.95844 27.9508 0 192 192 192 255
1.00704 -3.94445 24.3854 0 192 192 192 255

Bug of export_ply.h

vcg::tri::io::ExporterPLY::Save function in /vcglib/wrap/io_trimesh/export_ply.h doesn't work correctly when ply has mesh and texture and is ascii format. Output ply file has broken texture.

Now line 562 is
for(int k=0;kVN()*2;++k)
I guess it should be
for (int k=0;kVN();++k)

A potential bug in edge_collapse.h

Here in the edge_collapse.h of master branch. Why is it V(0)<V(0) instead of V(0)<V(1) ? V(0)<V(0) would always be evaluated to false, and std::swap would never be executed. Plus the two input arguments of std:swap are problematic.

platonic.h, build from coord and index vector doesn't work right

The problem occurs the function,

template <class MeshType, class InCoordType, class InFaceIndexType >
void BuildMeshFromCoordVectorIndexVector(MeshType & in, const std::vector<InCoordType> & v, const std::vector<InFaceIndexType> & f)

which is line 698-699 of complex/algorithms/create/platonic.h.

Basically the offending code is in lines 721-733

for(size_t i=0;i<f.size();++i)
  {
    const InFaceIndexType &ff= f[i];
    assert( ff[0]>=0 );
    assert( ff[1]>=0 );
    assert( ff[2]>=0 );
    assert( ff[0]<in.vn );
    assert( ff[1]<in.vn );
    assert( ff[2]<in.vn );
    in.face[i].V(0) = &in.vert[ ff[0] ];
    in.face[i].V(1) = &in.vert[ ff[0] ];
    in.face[i].V(2) = &in.vert[ ff[0] ];
}

Specifically the vertex assignments should read

in.face[i].V(0) = &in.vert[ ff[0] ];
in.face[i].V(1) = &in.vert[ ff[1] ];
in.face[i].V(2) = &in.vert[ ff[2] ];

Also the assert statements may be grouped more efficiently as,

assert( ff[0]>=0 && ff[0] < in.vn );

for each face.

Additionally the code in lines 715-719 appears to be of no use since the

std::vector<VertexPointer> index(in.vn);

does not appear to have a purpose.

Doesn't compile on Linux

Hi,

I am trying to make the samples compile on Linux but it is being very hard to fix the large amount of error...
I am using gcc 4.8 and QtCreator 5.7.1

Bug in Tridecimator and its no texture colors/material problem

Hi,

I tested tridecimator with different models but with every model, I lost all texture colors/material information after the simplification. I tried each and every option available in tridecimator but all in vain. There is also one bug i.e irrespective of which model file I give as input(e.g obj, stl etc), it always output in .ply format. I spotted the bug in tridecimator.cpp file but don't know how to fix it. It is the second last line of this file and it is "vcg::tri::io::ExporterPLY::Save(mesh,argv[2]);" with the header file #include <wrap/io_trimesh/export_ply.h>.

The texture color/material information is really important for me. Any help in this regards would be much appreciated. Thanks

Regards,
Waseem Khan

Build fails on arm64, armhf, ppc64el & s390x in Debian/Ubuntu

In 2020.02+git200217-1 uploaded to debian unstable and synced to Ubuntu 20.04, builds fail on arm64, armhf, ppc64el & s390x with multiple errors of the form:

/<<BUILDDIR>>/meshlab-2020.02+git200217/vcglib/vcg/complex/algorithms/create/mc_lookup_table.h:454:5: error: narrowing conversion of ‘-6’ from ‘int’ to ‘char’ [-Wnarrowing]

lines referred to from 323 to 2556, so most of that header.

https://buildd.debian.org/status/package.php?p=meshlab&suite=sid

https://launchpad.net/ubuntu/+source/meshlab/2020.02+git200217-1

Perhaps a sprinkling of signed char is required.

Compile vcglib meet "C2589" error

When I complie vcglib in my application, compiler noticed "C2589", error C2589: “(”:“::” illegal right mark.
ScalarType origQual= std::numeric_limits<double>::max();

copy mesh in vcg lib error

I want copy one mesh to another mesh. So I find a function in append.h. But when I use it, I find the following description. But I find it will lose some information when copying.
image
It only copy the attributes in both meshes. But I don't understand the attributes mean. How to copy all of the MeshRight? so I can get the MeshLeft the same with MeshRight.

GCC problems

I Have problems in GCC 4.9.3:
/usr/local/vcg/wrap/io_trimesh/import_obj.h:280:41: error: ‘Allocator’ is not a member of ‘vcg::tri’

How to fix this?
I can't fix this yet.

How to speed up mesh decimation

I'm trying to simplify 120k triangle mesh to 9k with code in tridecimator.cpp sample.
Approximately at 70k triangles it runs very slow, so it will take maybe some hours to obtain result.
Have compiled with Intel c++ 17.0 & O3 & openMP support & ocf types. Windows 10.
Meshlab returns result approximately in 10 seconds.
Whats wrong?

vcglib/apps/pivoting/glarea.cpp included an unexisting file.

In glarea.cpp, there is a line:

#include <vcg/space/normal_extrapolation.h>

However, this normal_extrapolation.h does not exist in the project (it seems to be in an older version of this project). I wonder whether this file is not needed anymore or wrongly be deleted?

Vcg import/export error

Hi,
I am newbie to the VCG library. I downloaded the library file from github. I tried to run an example code, but i m getting errors as shown below.

Error 9 error LNK2019: unresolved external symbol "public: unsigned int __thiscall vcg::ply::PropDescriptor::memtypesize(void)const " (?memtypesize@PropDescriptor@ply@vcg@@QBEIXZ) referenced in function "public: static int __cdecl vcg::tri::io::ImporterPLY::Open(class MyMesh &,char const *,class vcg::tri::io::PlyInfo &)" (?Open@?$ImporterPLY@VMyMesh@@@io@tri@vcg@@SAHAAVMyMesh@@PBDAAVPlyInfo@234@@z) c:\Users\CoitorHP\documents\visual studio 2013\Projects\VcgLibTest\VcgLibTest\Source.obj VcgLibTest
Error 10 error LNK2019: unresolved external symbol "public: char const * __thiscall vcg::ply::PropDescriptor::stotypename(void)const " (?stotypename@PropDescriptor@ply@vcg@@QBEPBDXZ) referenced in function "public: static int __cdecl vcg::tri::io::ExporterPLY::Save(class MyMesh &,char const ,bool,class vcg::tri::io::PlyInfo &,bool (__cdecl)(int,char const *))" (?Save@?$ExporterPLY@VMyMesh@@@io@tri@vcg@@SAHAAVMyMesh@@PBD_NAAVPlyInfo@234@P6A_NH1@Z@Z) c:\Users\CoitorHP\documents\visual studio 2013\Projects\VcgLibTest\VcgLibTest\Source.obj VcgLibTest
Error 11 error LNK2019: unresolved external symbol "private: void __thiscall vcg::ply::PlyFile::compile(class vcg::ply::PlyElement *)" (?compile@PlyFile@ply@vcg@@AAEXPAVPlyElement@23@@z) referenced in function "public: void __thiscall vcg::ply::PlyFile::SetCurElement(int)" (?SetCurElement@PlyFile@ply@vcg@@qaexh@Z) c:\Users\CoitorHP\documents\visual studio 2013\Projects\VcgLibTest\VcgLibTest\Source.obj VcgLibTest

Please help me to solve this issue. I heard no lib file is needed to run the vcg, but i dont know why i am getting this linker error. Thanks in advance.

How to use vcglib to reduce the size of a model(<100,000 triangles)?

Hi,

I don't know, how can I use this vcglib? My main goal is to reduce the size of a model(<100,000 triangles).
I am using Microsoft Windows 7 with Visual Studio 2017. The only way that I figured out is to compile and build the "vcglib-master\vcglib-master\apps\test\tetramesh" or "vcglib-master\vcglib-master\apps\test\trackball" in visual Studio 2017 to generate .exe file to serve my purpose. I tried this one(vcglib-master\vcglib-master\apps\test\tetramesh) but during proces of building this project, I got an error:

vcglib-master\vcglib-master\apps\test\tetramesh\test\test.cpp(1): fatal error C1083: Cannot open include file: 'simplex\vertex\with\a.h': No such file or directory

Any idea where I can find this missing file and other files? The other project is not compatible(I don't know why). As I am new to this, any help would be much appreciated.
Thanks.

Best,
Waseem Khan

How to use vcglib

Compile vcglib meet "C2019"error 严重性 代码 说明 项目 文件 行 禁止显示状态
错误 LNK2019 无法解析的外部符号 "public: unsigned __int64 __cdecl vcg::ply::PropDescriptor::memtypesize(void)const " (?memtypesize@PropDescriptor@ply@vcg@@QEBA_KXZ),该符号在函数 "public: static int __cdecl vcg::tri::io::ImporterPLY::Open(class MyMesh &,char const *,class vcg::tri::io::PlyInfo &)" (?Open@?$ImporterPLY@VMyMesh@@@io@tri@vcg@@SAHAEAVMyMesh@@PEBDAEAVPlyInfo@234@@z) 中被引用 ConsoleApplication4 C:\Users\SuLi\source\repos\ConsoleApplication4\ConsoleApplication4\ConsoleApplication4.obj 1
What should I do?
and also what should I do if I want to use vcglib in clion?
I 'm a green hand in this,thank you for your help!

Striping headers breaks linux compatibility.

f2bbdb7
This commit strips some headers witch in results in error when building meshlab on linux system.
Error message:

../../../vcglib/vcg/container/simple_temporary_data.h:52:64: error: ‘memcpy’ was not declared in this scope
         if(datasize!=0) memcpy(newdataLoc,data,sizeof(datasize));
                                                                ^
../../../vcglib/vcg/container/simple_temporary_data.h: In member function ‘void vcg::VectorNBW<bool>::resize(const int&)’
../../../vcglib/vcg/container/simple_temporary_data.h:64:57: error: ‘memset’ was not declared in this scope
         memset(&data[oldDatasize],0,datasize-oldDatasize);

Build errors in sample, polygonmesh_quadsimpl

For the sample, under apps/sample/polygonmesh_quadsimpl,
there were build errors, part of them as the following,

polygonmesh_quadsimpl.cpp:70:9: error: ‘EdgePlane’ is not a member of ‘vcg::face’
face::EdgePlane
^
polygonmesh_quadsimpl.cpp:70:9: error: ‘EdgePlane’ is not a member of ‘vcg::face’

The vcg::tri::Index function makes only sense when sequencial containers are used

The vcg::tri::Index function makes only sense when sequential containers are used but not only sequential containers can be used for the Mesh struct. Furthermore in the case where sequential containers are used this function could still produce wrong results if for example the vertex index (2nd argument) was acquired as a copy and not as a reference from the mesh.

size_t Index(MeshType &m, const typename MeshType::VertexType &v) {return &v-&*m.vert.begin();}

Some bugs and suggestions?

Hi, My Env:
OS: Ubuntu 16.04.1
GCC: 5.4.0

Bugs found so far:

.../vcglib/apps/sample/trimesh_voronoisampling/trimesh_voronoisampling.cpp:123: error: ‘FixVertexVector’ is not a member of ‘vcg::tri::VoronoiProcessing’
tri::VoronoiProcessing<MyMesh, tri::EuclideanDistance >::FixVertexVector(baseMesh,fixedSeedVec);
^


2. ```
.../vcglib/vcg/simplex/vertex/base.h:24: error: #error "This file should not be included alone. It is automatically included by complex.h"
 #error "This file should not be included alone. It is automatically included by complex.h"
  ^

/usr/local/include/vcg/simplex/vertex/base.h:24: error: #error "This file should not be included alone. It is automatically included by complex.h"
#error "This file should not be included alone. It is automatically included by complex.h"
^


4. ```
.../vcglib/apps/quadrangulator/quadrangulator.cpp:142: error: ‘MIQ_parametrization’ was not declared in this scope
     if (! MIQ_parametrization<CMesh>::IsValid(trimesh) )
           ^

Suggestions:

  • Do Not use "using namespace std;", instead, use "std::"? Other namespace the same...

  • Give a more specific example for how to use the complex.h ? I did get a lot of ERROR messages as the above mentioned bug 3.

Thank you very much
Cheers
Pei

compilation erros for vcglib/wrap/nanoply/nanoply_vcg/nanoply_vcg.pro on linux

Could not compile neither nanoply_vcg/nanoply_vcg.pro or nanoply_demo/nanoply_demo.pro under linux using both gcc and clang. Haven't checked visualc++ compiler yet. Multiple errors such as:

vcglib/wrap/nanoply/include/nanoply.hpp:2479: error: expected primary-expression before ‘char’
2479 | DescriptorHelper<ContainerType, VectorSize, ScalarType>::ReadBinary(

Documentation for overridden members of AdvancingFront class

Hi there! I'm trying to use the AdvancingFront class for a mesh generation task, but I am having a very hard time understanding what my implementation of the Seed and Place virtual methods are meant to do, and the comments in the source code aren't really helping me.

Would it be possible to get more documentation into that file, or at the very least a simple explanation of what each of those methods is meant to do? Thank you so much!

Supporting OpenStream interface also in other mesh importers

The OFFImporter, starting from ac56acd, has a method OpenStream in its public interface allowing to import mesh starting from std::istream. This is quite useful when having a previously allocated blob containing the mesh of interest and there is not need to open a file.

Is there any plan to use the same kind of interface in the other importers?

io_trimesh/stl_reader.h binary check will not work on windows systems

On windows systems the FILE operations do not read the same in binary/ascii mode.
The bug will appear in both Master and Devel

A minimal example using the same values from stl_reader:

    const char * filename = R"###(test.stl)###";
    FILE *fp = fopen(filename, "r");

    fseek(fp, 0, SEEK_END);
    long file_size = ftell(fp);
    unsigned int facenum;
    std::cout << "File size: " << file_size << std::endl;

    fseek(fp, 80, SEEK_SET);
    std::cout << "Current Position: " << ftell(fp) << std::endl;

    fread(&facenum, sizeof(unsigned int), 1, fp);
    std::cout << "Position after reading '4' bytes: " << ftell(fp) << std::endl;
    std::cout << "Number of faces: " << facenum << std::endl;

    int expected_file_size=80 + 4 + (sizeof(short)+48 )*facenum ;
    std::cout << "Expected file size is: " << expected_file_size << std::endl;

And the corresponding output;

File size: 23279484
Current Position: 80
Position after reading '4' bytes: 4176
Number of faces: 183842228
Expected file size is: 602176892

Due to this the condition for filesize == expected_file_size fails and if(abs(file_size-expected_file_size) > file_size/20 ) will result in a Non-Binary result and vcg will return a malformed file error.

Now if we change the fopen mode to 'rb' we get the following output:

File size: 23279484
Current Position: 80
Position after reading '4' bytes: 84
Number of faces: 465588
Expected file size is: 23279484

Stack Overflow issue about ftell

trimesh_curvature sample crashes

Hi,

The curvature sample crashes with:
Assertion failed: (0), function Kh, file ../../../vcg/simplex/vertex/component.h, line 140.
When called from vcg::tri::UpdateCurvature<MyMesh>::MeanAndGaussian(m); in the sample code.

(There was a reference to this in an old thread in sourceforge, but a solution wasn't posted).

I'm compiling this without QMake, using instead c++ -g -O0 -std=c++11 -Wall -isystem../../../ trimesh_curvature.cpp -o trimesh_curvature, which compiles without any issue.

Cheers,
J

Crash when importing collada dae files

The program crashes when importing dae files. I use ml_mesh_type.h in meshlab, and then I import dae file like this:

QFile filePos(file);
if(!filePos.exists())
{
return;
}
QFileInfo fileInfo(filePos);
CMeshO m;
vcg::tri::io::InfoDAE info;
if (!vcg::tri::io::ImporterDAE::LoadMask(file.toStdString().c_str(), info))
{
return;
}
qDebug() << "ConverDAE2OBJ: mask loaded";
vcg::tri::io::ImporterDAE::Open(m, file.toStdString().c_str(), info);

The program crashes in import_dae.h at: tri::Append<OpenMeshType,ColladaMesh>::Mesh(m,newMesh);.

exporterU3D

Can anyone help me to code the exporteru3d with the vcglib?? here is my code so far
vcg::tri::io::ExporterU3D<MyMesh>::Save(m, "U3dTesting.u3d", "C:/Program Files/VCG/MeshLab/plugins/U3D_W32/IDTFConverter.exe",vcg::tri::io::u3dparametersclasses::Movie15Parameters,vcg::tri::io::ExporterU3D<MyMesh>::GetExportMaskCapability());
im not understand the u3dparametersclasses, can someone explain for me?

Can not open mesh file

Hi,

I am having trouble to load mesh file using vcglib. I tried trimesh_base under "/vcg/apps/sample/trimesh_base" to load my mesh file (tried both obj and ply formats), but it doesn't work. The error message is "Invalid file: OFF file should have in the first line the OFF keyword as a first token". The mesh file can be open in meshlab, so I assume the mesh file is correct.

I also tried "vcg::tri::io::ImporterPLY::Open", which doesn't compile for me. The compile error is: " undefined reference to `vcg::ply::PlyFile::AddToRead(char const*, char const*, int, int, unsigned long, int, int, int, int, unsigned long)' ".

Could anyone give me some suggestions to solve this? I couldn't find helpful information online. I appreciate the help in advance.

Collada import crash

Hi,

I have a problem with a particular file which crashes the collada importer. You can download it from my dropbox. My program code is also there. I was in the process of writing a little command line utility to give me the mass properties of a mesh.
https://www.dropbox.com/sh/6so4j8ek3tsxd2k/AAD1z8HK-sHmPHlvNM0R_d_wa?dl=0

----- Starting the processing of /home/michael/Dropbox/bugreports/vcglib/Foot.dae ------
File Contains 1 Scenes
Scene 0 contains 1 instance_visual_scene 
instance_visual_scene 0 refers Scene 
instance_visual_scene Scene has 1 children
Processing Visual Scene child 0 - of type 'node'
Starting processing <node> with id Foot
getTrans form node with tag node
** instance_geometry with url #Foot-mesh (intial mesh size 0 0 T = 0)
**** Loading a Geometry Mesh **** (initial mesh size 0 0)
****** LoadTriangularMesh (initial mesh size 3245 0)
******    material id '' -> ''
******   but we were not able to find the corresponding image node
********* WARNING face 60, (126 126 606) is a DEGENERATE FACE!
********* WARNING face 64, (134 134 646) is a DEGENERATE FACE!
********* WARNING face 66, (137 137 666) is a DEGENERATE FACE!
********* WARNING face 76, (131 131 766) is a DEGENERATE FACE!
********* WARNING face 80, (125 125 806) is a DEGENERATE FACE!
********* WARNING face 92, (152 152 926) is a DEGENERATE FACE!
********* WARNING face 97, (177 177 976) is a DEGENERATE FACE!
********* WARNING face 104, (189 189 1046) is a DEGENERATE FACE!
********* WARNING face 119, (201 201 1196) is a DEGENERATE FACE!
********* WARNING face 127, (239 239 1276) is a DEGENERATE FACE!
********* WARNING face 128, (243 243 1286) is a DEGENERATE FACE!
********* WARNING face 133, (258 258 1336) is a DEGENERATE FACE!
********* WARNING face 137, (267 267 1376) is a DEGENERATE FACE!
********* WARNING face 151, (287 287 1516) is a DEGENERATE FACE!
********* WARNING face 163, (288 288 1636) is a DEGENERATE FACE!
********* WARNING face 190, (336 336 1906) is a DEGENERATE FACE!
********* WARNING face 231, (415 415 2316) is a DEGENERATE FACE!
********* WARNING face 258, (466 466 2586) is a DEGENERATE FACE!
mass_properties: /opt/vcglib/wrap/io_trimesh/import_dae.h:418: static vcg::tri::io::UtilDAE::DAEError vcg::tri::io::ImporterDAE<OpenMeshType>::LoadTriangularMesh(QDomNodeList&, vcg::tri::io::ImporterDAE<OpenMeshType>::ColladaMesh&, std::size_t, vcg::tri::io::InfoDAE&, QMap<QString, QString>&) [with OpenMeshType = MyMesh; std::size_t = long unsigned int]: Assertion `indvt + offset < m.vert.size()' failed.
Aborted (core dumped)

Tried the master branch and the v.1.0.1 tag with identical results.

The mesh was exported from Blender. By the Robot Designer tool, if that matters. It manages to crash Meshlab from the ubuntu 16 repo, too. So, I guess the crash not caused by user error.

Cheers,
Michael

trimesh_QT_shared sample error

devel branch
in file \vcglib\apps\QT\trimesh_QT_shared\glarea.cpp line 224.
It seems setPerViewInfo func don't use three para.

TriEdgeCollapseQuadric is extremely slow

The latest VCG release has a bug in the TriEdgeCollapseQuadric simplification algorithm that causes the process to get extremely slow. The simplification finishes but instead of taking for example ~2min (normal time), it takes 15hours. This issue manifests both on windows and linux, and it appeared sometime after MeshLab version 1.3.3.

If needed, I have a mesh to reproduce the problem (but is around 450MB), but I think any big mesh will do it.

Build error on Linux in import_out.h and import_nvm.h

When building meshlab on Linux compiler complains about

no matching function for call to ‘vcg::tri::io::ImporterNVM<OpenMeshType>::ReadHeader(FILE*&)

in vcglib/wrap/io_trimesh/import_out.h:91 and /vcglib/wrap/io_trimesh/import_nvm.h:91
System: ArchLinux (gcc-7.3)
Quick solution, for me, was to remove ReadHeader(const char * filename,unsigned int &num_cams, unsigned int &num_points) fuction entirely or add tmp variable to handle proper invocation of ReadHeader(fp,num_cams,num_points)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.