POV-Ray : Newsgroups : povray.unofficial.patches : SuperPatch / triangle mesh Server Time
2 Nov 2024 17:21:57 EDT (-0400)
  SuperPatch / triangle mesh (Message 1 to 5 of 5)  
From: edna dornblazer
Subject: SuperPatch / triangle mesh
Date: 30 Jun 1999 19:42:03
Message: <377AAB06.3A55@geocities.com>
in SuperPatch version of parse.c, in the function
Parse_Mesh(), there is the line
	number_of_vertices=0;

then in parsing of 'plain' (non-smooth) triangles,
nothing is done to number_of_vertices. 
Looking down at the smooth_triangle mesh code,
number_of_vertices is set for smooth_triangles 
by calling
	Mesh_Hash_Vertex(&number_of_vertices, 
			&max_vertices, 
			&Vertices, P1);
but Mesh_Hash_Vertex(&number_of_vertices,...) is
not called for plain triangles.

But then later there is:
	Object->Data->Vertices =
          (SNGL_VECT
*)POV_MALLOC(number_of_vertices*sizeof(SNGL_VECT), 	    "triangle mesh
data");

and POV-Ray stops for trying to malloc zero bytes.

Now, what I did, and it is working, is just stick in some
	Mesh_Hash_Vertex(&number_of_vertices, 
			&max_vertices, 
			&Vertices, P1);
for plain triangles.

Comments / condemnations ??


Post a reply to this message

From: Ron Parker
Subject: Re: SuperPatch / triangle mesh
Date: 30 Jun 1999 20:59:46
Message: <377bbd32.201831516@news.povray.org>
On Wed, 30 Jun 1999 19:40:55 -0400, edna dornblazer
<hac### [at] geocitiescom> wrote:

>Now, what I did, and it is working, is just stick in some
>	Mesh_Hash_Vertex(&number_of_vertices, 
>			&max_vertices, 
>			&Vertices, P1);
>for plain triangles.
>
>Comments / condemnations ??

Um... Nathan?  Any comments?  I was just going to look at that, to
tell you the truth, but I hadn't gotten around to it.


Post a reply to this message

From: Nathan Kopp
Subject: Re: SuperPatch / triangle mesh
Date: 30 Jun 1999 23:53:12
Message: <377AE532.8D6AC393@Kopp.com>
Parse_Mesh() in UVPov does have Mesh_Hash_Vertex() calls for both smooth 
and flat triangles.  Must have gotten deleted during the merge. After the
call to Init_Mesh_Triangle() for both smooth & flat triangles, you should
have:

        Triangles[number_of_triangles].P1 =
Mesh_Hash_Vertex(&number_of_vertices, &max_vertices, &Vertices, P1);
        Triangles[number_of_triangles].P2 =
Mesh_Hash_Vertex(&number_of_vertices, &max_vertices, &Vertices, P2);
        Triangles[number_of_triangles].P3 =
Mesh_Hash_Vertex(&number_of_vertices, &max_vertices, &Vertices, P3);

(One humble request, Ron: could you use spaces instead of tabs to indent?
My tab sizes must be different than yours and the code indentation looks
very messy on my system.  No big deal, but if you happen to have time, I'd
appreciate it.)

-Nathan



Ron Parker wrote:
> 
> On Wed, 30 Jun 1999 19:40:55 -0400, edna dornblazer
> <hac### [at] geocitiescom> wrote:
> 
> >Now, what I did, and it is working, is just stick in some
> >       Mesh_Hash_Vertex(&number_of_vertices,
> >                       &max_vertices,
> >                       &Vertices, P1);
> >for plain triangles.
> >
> >Comments / condemnations ??
> 
> Um... Nathan?  Any comments?  I was just going to look at that, to
> tell you the truth, but I hadn't gotten around to it.


Post a reply to this message

From: Mick Hazelgrove
Subject: Re: SuperPatch / triangle mesh
Date: 1 Jul 1999 02:38:35
Message: <377b0ceb@news.povray.org>
I've been having similar problems with a wide range of triangle meshes, from
a variety of programs and pov code.

Poser and organica files seem to be immune.

Mick

edna dornblazer <hac### [at] geocitiescom> wrote in message
news:377### [at] geocitiescom...
> in SuperPatch version of parse.c, in the function
> Parse_Mesh(), there is the line
> number_of_vertices=0;
>
> then in parsing of 'plain' (non-smooth) triangles,
> nothing is done to number_of_vertices.
> Looking down at the smooth_triangle mesh code,
> number_of_vertices is set for smooth_triangles
> by calling
> Mesh_Hash_Vertex(&number_of_vertices,
> &max_vertices,
> &Vertices, P1);
> but Mesh_Hash_Vertex(&number_of_vertices,...) is
> not called for plain triangles.
>
> But then later there is:
> Object->Data->Vertices =
>           (SNGL_VECT
> *)POV_MALLOC(number_of_vertices*sizeof(SNGL_VECT),     "triangle mesh
> data");
>
> and POV-Ray stops for trying to malloc zero bytes.
>
> Now, what I did, and it is working, is just stick in some
> Mesh_Hash_Vertex(&number_of_vertices,
> &max_vertices,
> &Vertices, P1);
> for plain triangles.
>
> Comments / condemnations ??


Post a reply to this message

From: Gail Shaw
Subject: Re: SuperPatch / triangle mesh
Date: 6 Jul 1999 02:36:34
Message: <3781a3f2@news.povray.org>
Mick Hazelgrove wrote in message <377b0ceb@news.povray.org>...
>I've been having similar problems with a wide range of triangle meshes,
from
>a variety of programs and pov code.
>
>Poser and organica files seem to be immune.
>


I seem to have this problem with an XWing model I'm currently using, as well
as Gilles's maketree macro (the leaves)

Is there a fixed version out/ coming out soon. I don't have the source (or a
compiler)

Gail
*******************************************************************
* gsh### [at] monotixcoza              * ERROR: COFFEE.COM not found  *
* http://www.rucus.ru.ac.za/~gail/ * Insert cup and press any key *
*******************************************************************
   My Software never has bugs, It just develops random features
*******************************************************************


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.