walkmap/docs/codox/walkmap.stl.html

5 lines
11 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html PUBLIC ""
"">
<html><head><meta charset="UTF-8" /><title>walkmap.stl documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Walkmap</span> <span class="project-version">0.1.0-SNAPSHOT</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="dali-performance.html"><div class="inner"><span>Dali performance</span></div></a></li><li class="depth-1 "><a href="intro.html"><div class="inner"><span>Introduction to walkmap</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>walkmap</span></div></div></li><li class="depth-2 branch"><a href="walkmap.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="walkmap.edge.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>edge</span></div></a></li><li class="depth-2 branch"><a href="walkmap.geometry.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>geometry</span></div></a></li><li class="depth-2 branch"><a href="walkmap.ocean.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>ocean</span></div></a></li><li class="depth-2 branch"><a href="walkmap.path.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>path</span></div></a></li><li class="depth-2 branch"><a href="walkmap.polygon.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>polygon</span></div></a></li><li class="depth-2 branch current"><a href="walkmap.stl.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>stl</span></div></a></li><li class="depth-2 branch"><a href="walkmap.superstructure.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>superstructure</span></div></a></li><li class="depth-2 branch"><a href="walkmap.svg.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>svg</span></div></a></li><li class="depth-2 branch"><a href="walkmap.tag.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>tag</span></div></a></li><li class="depth-2 branch"><a href="walkmap.utils.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-2"><a href="walkmap.vertex.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>vertex</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="walkmap.stl.html#var-binary-stl"><div class="inner"><span>binary-stl</span></div></a></li><li class="depth-1"><a href="walkmap.stl.html#var-binary-stl-to-ascii"><div class="inner"><span>binary-stl-to-ascii</span></div></a></li><li class="depth-1"><a href="walkmap.stl.html#var-canonicalise"><div class="inner"><span>canonicalise</span></div></a></li><li class="depth-1"><a href="walkmap.stl.html#var-centre"><div class="inner"><span>centre</span></div></a></li><li class="depth-1"><a href="walkmap.stl.html#var-decode-binary-stl"><div class="inner"><span>decode-binary-stl</span></div></a></li><li class="depth-1"><a href="walkmap.stl.html#var-facet"><div class="inner"><span>facet</span></div></a></li><li class="depth-1"><a href="walkmap.stl.html#var-stl-.3Eascii"><div class="inner"><span>stl-&gt;ascii</span></div></a></li><li class="depth-1"><a href="walkmap.stl.html#var-stl.3F"><div class="inner"><span>stl?</span></div></a></li><li class="depth-1"><a href="walkmap.stl.html#var-vect"><div class="inner"><span>vect</span></div></a></li><li class="depth-1"><a href="walkmap.stl.html#var-write-ascii-stl"><div class="inner"><span>write-ascii-stl</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">walkmap.stl</h1><div class="doc"><div class="markdown"><p>Utility functions dealing with stereolithography (STL) files. Not a stable API yet!</p></div></div><div class="public anchor" id="var-binary-stl"><h3>binary-stl</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A codec for binary STL files</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/walkmap/blob/master/src/walkmap/stl.clj#L49">view source</a></div></div><div class="public anchor" id="var-binary-stl-to-ascii"><h3>binary-stl-to-ascii</h3><div class="usage"><code>(binary-stl-to-ascii in-filename)</code><code>(binary-stl-to-ascii in-filename out-filename)</code></div><div class="doc"><div class="markdown"><p>Convert the binary STL file indicated by <code>in-filename</code>, and write it to <code>out-filename</code>, if specified; otherwise, to a file with the same basename as <code>in-filename</code> but the extension <code>.ascii.stl</code>.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/walkmap/blob/master/src/walkmap/stl.clj#L173">view source</a></div></div><div class="public anchor" id="var-canonicalise"><h3>canonicalise</h3><div class="usage"><code>(canonicalise o)</code><code>(canonicalise o map-kind)</code></div><div class="doc"><div class="markdown"><p>Objects read in from STL wont have all the keys/values we need them to have. <code>o</code> may be a map (representing a facet or a vertex), or a sequence of such maps; if it isnt recognised it is at present just returned unchanged. <code>map-kind</code>, if passed, must be a keyword indicating the value represented by the <code>z</code> axis (defaults to <code>:height</code>). It is an error, and an exception will be thrown, if <code>map-kind</code> is not a keyword.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/walkmap/blob/master/src/walkmap/stl.clj#L75">view source</a></div></div><div class="public anchor" id="var-centre"><h3>centre</h3><div class="usage"><code>(centre facet)</code></div><div class="doc"><div class="markdown"><p>Return a canonicalised <code>facet</code> (i.e. a triangular polygon) with an added key <code>:centre</code> whose value represents the centre of this facet in 3 dimensions. This only works for triangles, so is here not in <code>walkmap.polygon</code>. It is an error (although no exception is currently thrown) if the object past is not a triangular polygon.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/walkmap/blob/master/src/walkmap/stl.clj#L56">view source</a></div></div><div class="public anchor" id="var-decode-binary-stl"><h3>decode-binary-stl</h3><div class="usage"><code>(decode-binary-stl filename)</code><code>(decode-binary-stl filename map-kind)</code></div><div class="doc"><div class="markdown"><p>Parse a binary STL file from this <code>filename</code> and return an STL structure representing its contents. <code>map-kind</code>, if passed, must be a keyword indicating the value represented by the <code>z</code> axis (defaults to <code>:height</code>). It is an error, and an exception will be thrown, if <code>map-kind</code> is not a keyword.</p>
<p><strong>NOTE</strong> that weve no way of verifying that the input file is binary STL data, if it is not this will run but will return garbage.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/walkmap/blob/master/src/walkmap/stl.clj#L108">view source</a></div></div><div class="public anchor" id="var-facet"><h3>facet</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A codec for a facet (triangle) within a binary STL file.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/walkmap/blob/master/src/walkmap/stl.clj#L42">view source</a></div></div><div class="public anchor" id="var-stl-.3Eascii"><h3>stl-&gt;ascii</h3><div class="usage"><code>(stl-&gt;ascii stl)</code><code>(stl-&gt;ascii stl solidname)</code></div><div class="doc"><div class="markdown"><p>Return as a string an ASCII rendering of the <code>stl</code> structure.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/walkmap/blob/master/src/walkmap/stl.clj#L140">view source</a></div></div><div class="public anchor" id="var-stl.3F"><h3>stl?</h3><div class="usage"><code>(stl? o)</code><code>(stl? o verify-count?)</code></div><div class="doc"><div class="markdown"><p>True if <code>o</code> is recogniseable as an STL structure. An STL structure must have a key <code>:facets</code>, whose value must be a sequence of polygons; and may have a key <code>:header</code> whose value should be a string, and/or a key <code>:count</code>, whose value should be a positive integer.</p>
<p>If <code>verify-count?</code> is passed and is not <code>false</code>, verify that the value of the <code>:count</code> header is equal to the number of facets.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/walkmap/blob/master/src/walkmap/stl.clj#L15">view source</a></div></div><div class="public anchor" id="var-vect"><h3>vect</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A codec for vectors within a binary STL file.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/walkmap/blob/master/src/walkmap/stl.clj#L35">view source</a></div></div><div class="public anchor" id="var-write-ascii-stl"><h3>write-ascii-stl</h3><div class="usage"><code>(write-ascii-stl filename stl)</code><code>(write-ascii-stl filename stl solidname)</code></div><div class="doc"><div class="markdown"><p>Write an <code>stl</code> structure as read by <code>decode-binary-stl</code> to this <code>filename</code> as ASCII encoded STL.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/walkmap/blob/master/src/walkmap/stl.clj#L159">view source</a></div></div></div></body></html>