Salt and Onion
YaBB Newbies
Offline
Posts: 49
dxf export inaccuracy
Jun 30th , 2008, 10:30pm
running processing 135 on winxp macbook pro Hi everyone, I've been doing some quick bas relief construction using processing to automate it using photography and noticed massive inaccuracies in the way processing generates DXF file coordinates. first off notes!: processing's origin point, (0,0) is at upper left. however in Autocad, it's lower left. when creating shapes using beginShape(), use noStroke() and fill(). This way it will only generate planes and makes importing into 3D Studio Max or other 3D programs much much faster! ok, here is some results of tests: anytime when z coordinate = 0 in processing using beginShape() and vertex(), the actual output comes to some weird negative inaccurate number i.e: coordinates 0,0,0 after dxf export gives -149.85,-199.85,-346.41016 weird right? it looks like the canvas size determines the shift in Z and X and Y the X and Y are shifted so that 0,0 really equals -width/2 and -height/2 so true center of the object on processing screen is really center of the applet window. but still, it doesn't give you a perfect number. if your applet window is 600 by 600, and you draw at 0,0 the coordinate exported should be at -300,-300 but many times it's off by 0.15 and you get -299.85,-299.85 weird! but what about z?!?!?! an applet window that is 600 by 600, a z coordinate of 0 is exported as -519.61523. so z is effected by the applet height. the more you reduce height, the closer z becomes to 0. but still, -519.61523 at 600 is still a very weird number. the imprecision of the dxf export causes many problems afterward. note: this does not happen if no Z is set in vertex i hope this makes sense