projects
/
convexer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e09d369
)
fixed some bugs with last version
author
hgn
<hgodden00@gmail.com>
Sun, 17 Apr 2022 10:10:56 +0000
(11:10 +0100)
committer
hgn
<hgodden00@gmail.com>
Sun, 17 Apr 2022 10:10:56 +0000
(11:10 +0100)
cxr/cxr.h
patch
|
blob
|
history
diff --git
a/cxr/cxr.h
b/cxr/cxr.h
index 9f11096925ab8b105784ec411a5ced306951b39b..dd7a8b83092dffc3612042b87aba4216abe6b54f 100644
(file)
--- a/
cxr/cxr.h
+++ b/
cxr/cxr.h
@@
-1335,10
+1335,10
@@
static void cxr_link_manifold(
int init_reverse = 0;
int unique_edge_count = 0;
int init_reverse = 0;
int unique_edge_count = 0;
- int discard_splits = 1;
/* Try remove splitting faces first */
{
/* Try remove splitting faces first */
{
+ int split_total = 0;
for( int j=0; j<solid->count; j++ )
{
cxr_polygon *poly = &mesh->polys[ solid_buffer[solid->start+j] ];
for( int j=0; j<solid->count; j++ )
{
cxr_polygon *poly = &mesh->polys[ solid_buffer[solid->start+j] ];
@@
-1359,19
+1359,16
@@
static void cxr_link_manifold(
}
if( interior_count < poly->loop_total-1 )
}
if( interior_count < poly->loop_total-1 )
+ {
+ split_total ++;
continue;
continue;
+ }
temp_solid[ temp_solid_len ++ ] = solid_buffer[solid->start+j];
}
temp_solid[ temp_solid_len ++ ] = solid_buffer[solid->start+j];
}
- if( temp_solid_len < 3 )
+ if( temp_solid_len < 3
|| (split_total & 0x2) /* unkown reasons */
)
{
{
- /* Revert back to normal */
- free( temp_solid );
-
- temp_solid = &solid_buffer[ solid->start ];
- temp_solid_len = solid->count;
- discard_splits = 0;
}
else
{
}
else
{
@@
-1382,8
+1379,7
@@
static void cxr_link_manifold(
solid->count = temp_solid_len;
}
solid->count = temp_solid_len;
}
- if( discard_splits )
- free( temp_solid );
+ free( temp_solid );
}
for( int j=0; j<solid->count; j++ )
}
for( int j=0; j<solid->count; j++ )