<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[SoliForum - 3D Printing Community — The unit vector in the .stl file]]></title>
	<link rel="self" href="https://www.soliforum.com/feed/atom/topic/1817/" />
	<updated>2013-03-23T04:12:36Z</updated>
	<generator>PunBB</generator>
	<id>https://www.soliforum.com/topic/1817/the-unit-vector-in-the-stl-file/</id>
		<entry>
			<title type="html"><![CDATA[The unit vector in the .stl file]]></title>
			<link rel="alternate" href="https://www.soliforum.com/post/17389/#p17389" />
			<content type="html"><![CDATA[<p>Hello,</p><p>I am writing the code to convert a mesh of square surfaces to a .stl file. I am using 2 triangles per square and have been successful in generating .stl files.</p><p>The problem is that each facet in my .stl file looks like this:</p><div class="codebox"><pre><code>    facet normal 
        outer loop
            vertex 0.0390000008 0.0280000009 0.0500000007
            vertex 0.0399999991 0.0280000009 0.0500000007
            vertex 0.0390000008 0.0280000009 0.0489999987
        endloop 
    endfacet </code></pre></div><p>There is no unit normal specified, with the outer surface just selected using the right hand rule.</p><p>What is this unit normal exactly supposed to be?<br />Is it a vector with origin at the triangle&#039;s centroid, of magnitude 1, that points in the direction of the positive normal to the plane of the triangle?<br />Also, since it&#039;s a floating point number, does any parser just select the normal that is closest to what is described by this vector?</p><p>I have imported models to Solidworks and Blender and have not had issues with not specifying the normal vector.</p>]]></content>
			<author>
				<name><![CDATA[daniel-s]]></name>
				<uri>https://www.soliforum.com/user/467/</uri>
			</author>
			<updated>2013-03-23T04:12:36Z</updated>
			<id>https://www.soliforum.com/post/17389/#p17389</id>
		</entry>
</feed>
