FAQ
Cover
\
Build
\
Source
\
Bugs
\
Reference
\
Libraries
\
Tools
The bugs database has moved
here
.
Bug 737 : Duplicate 3d faces in beginRaw() export
Last modified: 2008-08-15 18:36
P
roject:
processing
trash
Version:
unspecified
Co
m
ponent:
android
book
core
libraries
pde
reference
tools
web
Status:
RESOLVED
Resolution:
FIXED -
Pr
i
ority:
P3
Severity:
normal
Platform
All
O
S:
All
Windows
Mac OS
Linux
Other
Reporter:
watz
Assigned To:
fry
Attachment
Type
Created
Size
Actions
Description
: Opened: 2008-02-23 08:00
It looks lik beginRaw() incorrectly exports the result of the last
beginShape()/endShape() command twice, resulting in duplicate 3D faces that
can cause problems for some 3D software. The code below should produce 12
3D faces (3 sets of 2 quads == 12 triangles), but in fact produces 16
because the last two quads are exported twice.
[code]void setup() {
size(400,400,P3D);
noLoop();
}
void draw() {
beginRaw(DXF,"test.dxf");
noStroke();
for(int i=0; i<3; i++) {
beginShape(QUAD_STRIP);
vertex(0,i*100,0);
vertex(0,(i+1)*100,0);
vertex(100,i*100,0);
vertex(100,(i+1)*100,0);
vertex(200,i*100,0);
vertex(200,(i+1)*100,0);
endShape();
}
endRaw();
}
[/code]
Additional Comment
#1 From fry 2008-03-04 07:59
how odd.. looked into it a bit and it's not something obvious.. will have
to look further.
Additional Comment
#2 From watz 2008-03-04 08:06
great, thanks. it can be particularly problematic when producing graphics
for laser cutting, since duplicate polys get lasered twice.
Additional Comment
#3 From fry 2008-03-04 10:06
yep, understood.
Additional Comment
#4 From fry 2008-08-15 18:36
Found and fixed for 0146. Turns out P3D (and therefore OpenGL and the rest)
was duplicating a lot of geometry; so this could even mean a bit of a
speedup depending on the situation.