Dear List,<div><br></div><div>When I save a primitive as a .obj file in fluxus, then load this and try to use (recalc-normals ) on the result I only get angular results. This seems regardless of the setting of either the parameter to (recalc-normals ) on the resulting primitive or the original amount of smoothing on the saved one. I believe this to be a bug. I'll post versions of my code for reference below.</div>
<div><br></div><div>Yours,</div><div>Kas.</div><div><br></div><div>;----------------------in.scm-----------------------------------------------------------</div><div>;saves a range of shapes from "pebble" to "brick", crude version</div>
<div><div>(clear)</div><div><br></div><div>(define (build-stone size amount)</div><div>    (letrec ((clamp (ë (x y) ((if (positive? x)+ -) x (* y (- 1  (magnitude x)))) )))</div><div>            (let ((stone (build-icosphere 2)))</div>
<div>                (with-primitive stone</div><div>                    (pdata-map!</div><div>                        (ë (position)</div><div>                            (let (  (ult (biggest position))</div><div>                                    (px (vector-ref position 0))</div>
<div>                                    (py (vector-ref position 1))</div><div>                                    (pz (vector-ref position 2)))</div><div>                                (vector</div><div>                                    (if (eq? ult 0) (clamp px amount) (clamp px (min amount (magnitude px))))</div>
<div>                                    (if (eq? ult 1) (clamp py amount) (clamp py (min amount (magnitude py))))</div><div>                                    (if (eq? ult 2) (clamp pz amount) (clamp pz (min amount (magnitude pz)))))))</div>
<div>                        "p")</div><div>                    (scale size)</div><div>                    (colour .5)</div><div>                    (recalc-normals 1)</div><div>                    (hint-normalise))</div>
<div>                stone)))</div><div><br></div><div>(for ((x (in-range 0 10)))</div><div>        (with-primitive (build-stone (vector 1 1 1) (* x .1))</div><div>            (save-primitive (string-append "brick" (number->string x) ".obj"))))</div>
<div>        </div></div><div><br></div><div><br></div><div>;---------------------------------------out.scm--------------------------------</div><div><div>(clear)</div><div><br></div><div>(define test (load-primitive "/bricks/brick2.obj"))</div>
<div><br></div><div>(with-primitive test</div><div>    (colour .5)</div><div>    (recalc-normals 1))</div></div>