Gio_S
Guest
even if it is not mandatory ( placing everything to 0), that the stl contains the normal carrier to each face, in my cad parser I have implemented it. the place because I have done enough effort, and it would seem correct, making compute vectors from other programs I never had differences, but you can never say.
So, on one side maybe it can be useful to some crazy, maybe instead someone finds mistakes.
ps. the cad admits faces at 4 vertices, the slate wants 3. apart from that, I have the routine that if it is necessary "spezza" in two the 3dface, as well as other "=zero" area controls. in the following list I already take the only three points a,b,c data for "goods".
So, on one side maybe it can be useful to some crazy, maybe instead someone finds mistakes.
ps. the cad admits faces at 4 vertices, the slate wants 3. apart from that, I have the routine that if it is necessary "spezza" in two the 3dface, as well as other "=zero" area controls. in the following list I already take the only three points a,b,c data for "goods".
Code:
(setq xv (- (*-by ay) (-cz az)) (* (-bz az) (-cy ay) )))
(setq yv (- (*-bz az) (-cx ax)) (* (-bx ax) (-cz az))))
(setq zv (- (*-bx ax) (-cy ay) (*-by ay) (-cx ax) ()))
(setq nodivby0 (+ (* xv xv) (* yv yv) (* zv zv)) )
(if (= nodivby0 0) (setq nodivby0 0.00001))
(setq raddiv (sqrt nodivby0))
(setq xn (/ xv Radiv) )
(setq yn)
(setq zn (/ zv Radiv) )