i'm still struggling with how to add and delete faces... I no longer get the
previous assertion error, but am now getting a segfault whenever I do:
vcg::tri::Allocator<CMeshO>::Addvertices(m,2);
vcg::tri::Allocator<CMeshO>::AddFaces(m,1);
when I comment out those two lines, I don't get any crashes...
what am I doing wrong?
thanks,
imran
On Sat, Aug 16, 2008 at 11:07 AM, skunkwerk <sku...@gm...> wrote:
> i managed to track down the error once the compiler gave me the correct
> line...
>
> now i'm getting this assertion failure though:
> meshlab: ../../../../vcglib/vcg/complex/trimesh/allocate.h:513: static void
> vcg::tri::Allocator<AllocateMeshType>::CompactFaceVector(AllocateMeshType&)
> [with AllocateMeshType = CMeshO]: Assertion `(int)pos==m.fn' failed.
>
> this is how i'm adding/deleting faces:
> vcg::tri::Allocator<CMeshO>::AddFaces(m,1);
> vcg::tri::Allocator<CMeshO>::DeleteFace(m,fp);//delete old face, leave
> vertices
> vcg::tri::Allocator<CMeshO>::CompactFaceVector(m);//compact faces to remove
> those marked as deleted
>
> am i doing something wrong?
>
> thanks,
> imran
>
>
> On Thu, Aug 14, 2008 at 4:58 PM, skunkwerk <sku...@gm...> wrote:
>
>> thanks Paolo,
>> i had to write 200 lines of code to get the face splitting working -
>> and it almost compiles, except for these 3 errors:
>>
>> colladaio.cpp:264: instantiated from here
>> /usr/include/c++/4.3/bits/vector.tcc:293: error: array must be initialized
>> with a brace-enclosed initializer
>> /usr/include/c++/4.3/bits/vector.tcc:299: error: invalid array assignment
>> /usr/include/c++/4.3/bits/stl_construct.h:88: error: request for member
>> '~float [2]' in '* pointer', which is of non-class type 'float [2]'*
>>
>> *but i have no idea where in the code these errors are coming from, as
>> those are all stl things... any suggestions on how to trace this? i'm using
>> gcc
>>
>> OR if someone could tell me how to use the existing code in meshlab,
>> that'd be great too
>>
>> imran
>>
>>
>> On Thu, Aug 14, 2008 at 1:04 AM, Paolo Cignoni <pao...@is...
>> > wrote:
>>
>>> no, at the end.
>>> read this page (and referrred subpages too)
>>>
>>> http://vcg.sourceforge.net/index.php/Tutorial
>>>
>>> p,
>>>
>>> skunkwerk wrote:
>>>
>>> quick question: i was reading 'creating elements' on this wiki page:
>>> http://meshlab.sourceforge.net/wiki/index.php/Accessing_the_mesh
>>>
>>> when you call Allocator<CMeshO>::AddVertices or AddFaces, are
>>> vertices/faces added to the front of the vector?
>>> because the next line that describes specifying the vertex coordinates,
>>> etc. uses a pointer to the front of the vector
>>>
>>> thanks,
>>> imran
>>>
>>> ------------------------------
>>>
>>> -------------------------------------------------------------------------
>>> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
>>> Build the coolest Linux based applications with Moblin SDK & win great prizes
>>> Grand prize is a trip for two to an Open Source event anywhere in the worldhttp://moblin-contest.org/redirect.php?banner_id=100&url=/
>>>
>>> ------------------------------
>>>
>>> _______________________________________________
>>> Meshlab-devel mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/meshlab-devel
>>>
>>>
>>>
>>> --
>>> Paolo Cignoni -- Senior Researcher
>>> Visual Computing Laboratory - ISTI - CNR http://vcg.isti.cnr.it/~cignoni <http://vcg.isti.cnr.it/%7Ecignoni>
>>>
>>> ISTI - CNR
>>> Via Moruzzi 1,
>>> 56124 Pisa
>>> ITALY
>>>
>>>
>>> -------------------------------------------------------------------------
>>> This SF.Net email is sponsored by the Moblin Your Move Developer's
>>> challenge
>>> Build the coolest Linux based applications with Moblin SDK & win great
>>> prizes
>>> Grand prize is a trip for two to an Open Source event anywhere in the
>>> world
>>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>>> _______________________________________________
>>> Meshlab-devel mailing list
>>> Mes...@li...
>>> https://lists.sourceforge.net/lists/listinfo/meshlab-devel
>>>
>>>
>>
>
|