mcbastian / carve

Automatically exported from code.google.com/p/carve
Other
0 stars 0 forks source link

CSG fails on this input #25

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hi all ;o)

I'm making a "A_MINUS_B" with 2 operands (linked below).
With "-e" there is no output
Without "-e" there is an output but no "100% valid" (top face is not opened)

Both operand seem valid ...

operand 1
ply
format ascii 1.0
element vertex 24
property double x
property double y
property double z
element face 44
property list uchar uchar vertex_indices
end_header
18.000 14.000 2.700
0.000 14.000 2.700
0.000 2.000 2.700
17.500 2.000 2.700
17.500 -2.000 2.700
24.500 -2.000 2.700
24.500 2.000 2.700
42.000 2.000 2.700
42.000 14.000 2.700
24.000 14.000 2.700
24.000 16.000 2.700
18.000 16.000 2.700
18.000 14.000 3.000
0.000 14.000 3.000
0.000 2.000 3.000
17.500 2.000 3.000
17.500 -2.000 3.000
24.500 -2.000 3.000
24.500 2.000 3.000
42.000 2.000 3.000
42.000 14.000 3.000
24.000 14.000 3.000
24.000 16.000 3.000
18.000 16.000 3.000
3 4 0 5
3 0 9 5
3 5 9 6
3 9 8 6
3 6 8 7
3 0 11 10
3 0 10 9
3 0 4 3
3 0 3 2
3 0 2 1
3 12 13 14
3 12 14 15
3 12 15 16
3 12 16 17
3 12 17 18
3 12 18 19
3 12 19 20
3 12 20 21
3 12 21 22
3 12 22 23
3 0 1 13
3 0 13 12
3 1 2 14
3 1 14 13
3 2 3 15
3 2 15 14
3 3 4 16
3 3 16 15
3 4 5 17
3 4 17 16
3 5 6 18
3 5 18 17
3 6 7 19
3 6 19 18
3 7 8 20
3 7 20 19
3 8 9 21
3 8 21 20
3 9 10 22
3 9 22 21
3 10 11 23
3 10 23 22
3 11 0 12
3 11 12 23

operand 2
ply
format ascii 1.0
element vertex 16
property double x
property double y
property double z
element face 28
property list uchar uchar vertex_indices
end_header
23.700 11.700 2.700
23.700 15.700 2.700
18.300 15.700 2.700
18.300 11.700 2.700
19.800 11.700 2.700
19.800 14.200 2.700
22.200 14.200 2.700
22.200 11.700 2.700
23.700 11.700 3.000
23.700 15.700 3.000
18.300 15.700 3.000
18.300 11.700 3.000
19.800 11.700 3.000
19.800 14.200 3.000
22.200 14.200 3.000
22.200 11.700 3.000
3 5 4 3
3 5 3 2
3 5 2 1
3 5 1 6
3 7 6 1
3 7 1 0
3 15 8 14
3 8 9 14
3 14 9 13
3 9 10 13
3 13 10 12
3 10 11 12
3 0 1 9
3 0 9 8
3 1 2 10
3 1 10 9
3 2 3 11
3 2 11 10
3 3 4 12
3 3 12 11
3 4 5 13
3 4 13 12
3 5 6 14
3 5 14 13
3 6 7 15
3 6 15 14
3 7 0 8
3 7 8 15

Original issue reported on code.google.com by vilo...@gmail.com on 16 Sep 2011 at 7:00

GoogleCodeExporter commented 8 years ago
This definitely looks like a problem. I'll investigate and try and have a fix 
ready soon.

Original comment by tobias.s...@gmail.com on 19 Sep 2011 at 2:07

GoogleCodeExporter commented 8 years ago
The cause appears to be that on the top face set of the cross shape there is a 
triangle with zero area.

Specifically, this line in the first .ply file:

3 12 20 21

is a colinear triangle.

How was the input generated?

Original comment by tobias.s...@gmail.com on 20 Sep 2011 at 8:22

GoogleCodeExporter commented 8 years ago
Hi Tobias,

Indeed I didn't saw this triangle ...
The input comes from ArchiCAD, and very often its exports are not very clean.

Original comment by vilo...@gmail.com on 28 Sep 2011 at 6:46