 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
ok, thanks to all
my trouble was about the format of vertex only on ####.#### that can to
degenerate triangle losing last decimals ...
if the #debug cannot try them out, I have to control the triangle again after
the formatting procedure of my parser
no proble... this is my parser working
sketch-up , cad, pov STL ..
Post a reply to this message
Attachments:
Download 'screenshot 2026-04-06 163214.png' (546 KB)
Preview of image 'screenshot 2026-04-06 163214.png'

|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"GioSeregni" <gms### [at] hotmail com> wrote:
> ok, thanks to all
> my trouble was about the format of vertex only on ####.####
Is there a way to filter out those triangles from the start?
Are they even necessary / visible?
You can probably test just the fractional portion of your double/float by using
modulo.
#if (mod(Number, 1) < threshold) then ignore triangle #else keep it #end
- BE
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Bald Eagle" <cre### [at] netscape net> wrote:
> "GioSeregni" <gms### [at] hotmail com> wrote:
> > ok, thanks to all
> > my trouble was about the format of vertex only on ####.####
>
> Is there a way to filter out those triangles from the start?
> Are they even necessary / visible?
>
> You can probably test just the fractional portion of your double/float by using
> modulo.
>
> #if (mod(Number, 1) < threshold) then ignore triangle #else keep it #end
>
> - BE
Unfortunately, it's more complicated. If the mod exists beyond a certain decimal
point, the parser must first clean up the vertex by the small part of float,
then check if a twin face exists.
I'll have to create a twin face search loop after writing the mesh with
formatting that trims small decimal points... that is, a loop nested within
another loop... a lot of runtime.
povray forgives a duplicate face, but the other formats I use do not (for an STL
this is a serious mistake)
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Nothing, I think the most efficient solution is to ignore float comparisons,
much less divisions.
But create the pov file as a temporary one, and reprocess it by comparing
vertices with string functions. If a triangle has two equal vertices, it should
be removed.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |