<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>anderswallin.net &#187; drop-cutter</title>
	<atom:link href="http://www.anderswallin.net/tag/drop-cutter/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.anderswallin.net</link>
	<description></description>
	<lastBuildDate>Fri, 30 Jul 2010 09:39:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Drop-Cutter examples</title>
		<link>http://www.anderswallin.net/2010/04/drop-cutter-examples/</link>
		<comments>http://www.anderswallin.net/2010/04/drop-cutter-examples/#comments</comments>
		<pubDate>Wed, 21 Apr 2010 19:47:58 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[CAM]]></category>
		<category><![CDATA[drop-cutter]]></category>
		<category><![CDATA[opencamlib]]></category>
		<category><![CDATA[openmp]]></category>

		<guid isPermaLink="false">http://www.anderswallin.net/?p=3018</guid>
		<description><![CDATA[I&#8217;ve experimented with using OpenMP to calculate drop-cutter toolpaths on a quad-core machine. These now run reasonably fast. There are obvious lurking bugs with BallCutter and BullCutter still&#8230; Code is here: code.google.com/p/opencamlib/ (if you know C++, computational geometry, and cnc-machining, or are willing to learn, this project needs your help!) See also: styrofoam spider]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve experimented with using <a href="http://openmp.org/wp/">OpenMP</a> to calculate drop-cutter toolpaths on a quad-core machine. These now run reasonably fast. There are obvious lurking bugs with BallCutter and BullCutter still&#8230;</p>
<p><a href="http://www.anderswallin.net/wp-content/uploads/2010/04/demo.png"><img class="alignnone size-medium wp-image-3020" title="demo" src="http://www.anderswallin.net/wp-content/uploads/2010/04/demo-625x367.png" alt="" width="625" height="367" /></a></p>
<p><a href="http://www.anderswallin.net/wp-content/uploads/2010/04/carpet.png"><img class="alignnone size-medium wp-image-3021" title="carpet" src="http://www.anderswallin.net/wp-content/uploads/2010/04/carpet-625x347.png" alt="" width="625" height="347" /></a></p>
<p><a href="http://www.anderswallin.net/wp-content/uploads/2010/04/tux.png"><img class="alignnone size-medium wp-image-3022" title="tux" src="http://www.anderswallin.net/wp-content/uploads/2010/04/tux-625x353.png" alt="" width="625" height="353" /></a></p>
<p>Code is here: <a href="http://code.google.com/p/opencamlib/">code.google.com/p/opencamlib/</a> (if you know C++, computational geometry, and cnc-machining, or are willing to learn, this project needs your help!)</p>
<p>See also: <a href="http://sliptonic.com/?p=50">styrofoam spider</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.anderswallin.net/2010/04/drop-cutter-examples/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Toroidal drop-cutter</title>
		<link>http://www.anderswallin.net/2010/04/toroidal-drop-cutter/</link>
		<comments>http://www.anderswallin.net/2010/04/toroidal-drop-cutter/#comments</comments>
		<pubDate>Sun, 04 Apr 2010 22:13:35 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[CAM]]></category>
		<category><![CDATA[drop-cutter]]></category>
		<category><![CDATA[offset-ellipse]]></category>
		<category><![CDATA[opencamlib]]></category>
		<category><![CDATA[toroid]]></category>

		<guid isPermaLink="false">http://www.anderswallin.net/?p=2918</guid>
		<description><![CDATA[A one-triangle test of drop-cutter for toroidal tools (a.k.a. filleted-endmills, or bull-nose). The blue points are contacts with the facet, and the green points are contacts with the vertices. These are easy. The edges-contacts (red-points) are a bit more involved, and are done with the offset-ellipse solver presented earlier here(the initial geometry) and here(offset-ellipse construction) [...]]]></description>
			<content:encoded><![CDATA[<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="640" height="385" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/T0_lUYq2m-g&amp;hl=en_US&amp;fs=1&amp;rel=0" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="640" height="385" src="http://www.youtube.com/v/T0_lUYq2m-g&amp;hl=en_US&amp;fs=1&amp;rel=0" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>A one-triangle test of drop-cutter for toroidal tools (a.k.a. filleted-endmills, or bull-nose).</p>
<p>The blue points are contacts with the facet, and the green points are contacts with the vertices. These are easy.</p>
<p>The edges-contacts (red-points) are a bit more involved, and are done with the offset-ellipse solver presented earlier <a href="http://www.anderswallin.net/2010/03/offset-ellipse-2/">here</a>(the initial geometry) and <a href="http://www.anderswallin.net/2010/03/offset-ellipse-part-2/">here</a>(offset-ellipse construction) and <a href="http://www.anderswallin.net/2010/03/convergence/">here</a>(convergence of the solver) and <a href="http://www.anderswallin.net/2010/03/torus-line-intersection-animations/">here</a>(toroid-line intesection animation).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anderswallin.net/2010/04/toroidal-drop-cutter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Offset ellipse, part 2</title>
		<link>http://www.anderswallin.net/2010/03/offset-ellipse-part-2/</link>
		<comments>http://www.anderswallin.net/2010/03/offset-ellipse-part-2/#comments</comments>
		<pubDate>Sat, 27 Mar 2010 10:38:16 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[CAM]]></category>
		<category><![CDATA[drop-cutter]]></category>
		<category><![CDATA[offset-ellipse]]></category>
		<category><![CDATA[opencamlib]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[vtk]]></category>

		<guid isPermaLink="false">http://www.anderswallin.net/?p=2880</guid>
		<description><![CDATA[More on the offset-ellipse calculation, which is related to contacting toroidal cutters against edges(lines). An ellipse aligned with the x- and y-axes, with axes a and b can be given in parametric form as (a*cos(theta) , b*sin(theta) ). The ellipse is shown as the dotted oval, in four different colours. Now the sin() and cos() are [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.anderswallin.net/wp-content/uploads/2010/03/oe_screen.png"><img class="alignnone size-medium wp-image-2879" title="oe_screen" src="http://www.anderswallin.net/wp-content/uploads/2010/03/oe_screen-625x353.png" alt="" width="625" height="353" /></a></p>
<p>More on the offset-ellipse calculation, which is related to contacting toroidal cutters against edges(lines). An ellipse aligned with the x- and y-axes, with axes <strong>a</strong> and <strong>b</strong> can be given in parametric form as (a*cos(theta) , b*sin(theta) ). The ellipse is shown as the dotted oval, in four different colours.</p>
<p>Now the sin() and cos() are a bit expensive the calculate every time you are running this algorithm, so we replace them with parameters (s,t) which are both in [-1,1] and constrain them so s^2 + t^2 = 1, i.e. s = cos(theta) and t=sin(theta). Points on the ellipse are calculated as (a*s, b*t).</p>
<p>Now we need a way of moving around our ellipse to find the one point we are seeking. At point (s,t) on the ellipse, for example the point with the red sphere in the picture, the tangent(shown as a cyan line) to the ellipse will be given by (-a*t, b*s). Instead of worrying about different quadrants in the (s,t) plane, and how the signs of s and t vary, I thought it would be simplest always to take a step in the direction of the tangent. That seems to work quite well, we update s (or t) with a new value according to the tangent, and then t (or s) is calculated from s^2+t^2=1, keeping the sign of t (or s) the same as it was before.</p>
<p>Now for the <a href="http://en.wikipedia.org/wiki/Newton's_method">Newton-Rhapson</a> search we also need a measure of the error, which in this case is the difference in the y-coordinate of the offset-ellipse point (shown as the green small sphere, and obviously calculated as the ellipse-point plus the offset-radius times a normal vector) and where we want that point. Then we just run the algorithm, always stepping either in the positive or negative direction of the tangent along the ellipse, until we reach the required precision (or max number of iterations).</p>
<p>Here&#8217;s an animation which first shows moving around the ellipse, and then at the end a slowed-down Newton-Rhapson search which in reality converges to better than 8 decimal-places in just seven (7) iterations, but as the animation is slowed down it takes about 60-frames in the movie.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="640" height="385" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/rD1h8S0lG7g&amp;hl=en_US&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="640" height="385" src="http://www.youtube.com/v/rD1h8S0lG7g&amp;hl=en_US&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>I wonder if all this should be done in Python for the general case too, where the axes of the ellipse are not parallel to the x- and y-axes, before embarking on the c++ version?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anderswallin.net/2010/03/offset-ellipse-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Spherical drop-cutter</title>
		<link>http://www.anderswallin.net/2010/03/spherical-drop-cutter/</link>
		<comments>http://www.anderswallin.net/2010/03/spherical-drop-cutter/#comments</comments>
		<pubDate>Sun, 21 Mar 2010 18:55:42 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[CAM]]></category>
		<category><![CDATA[drop-cutter]]></category>
		<category><![CDATA[opencamlib]]></category>

		<guid isPermaLink="false">http://www.anderswallin.net/?p=2864</guid>
		<description><![CDATA[For spherical cutters (a.k.a. ball-nose), the vertex-test (green dots), and the facet-test (blue dots), are fairly trivial. The edge-test (red-dots) is slightly more involved. Here, unlike before, I tried doing it without too many calls to &#8220;expensive&#8221; functions like sin(), cos() and sqrt(). The final result of taking the maximum of all tests is shown [...]]]></description>
			<content:encoded><![CDATA[
<a href='http://www.anderswallin.net/2010/03/spherical-drop-cutter/ball_all00001/' title='ball_all00001'><img width="150" height="150" src="http://www.anderswallin.net/wp-content/uploads/2010/03/ball_all00001-150x150.png" class="attachment-thumbnail" alt="ball_all00001" title="ball_all00001" /></a>
<a href='http://www.anderswallin.net/2010/03/spherical-drop-cutter/ball_e00001/' title='ball_e00001'><img width="150" height="150" src="http://www.anderswallin.net/wp-content/uploads/2010/03/ball_e00001-150x150.png" class="attachment-thumbnail" alt="ball_e00001" title="ball_e00001" /></a>
<a href='http://www.anderswallin.net/2010/03/spherical-drop-cutter/ball_f00001/' title='ball_f00001'><img width="150" height="150" src="http://www.anderswallin.net/wp-content/uploads/2010/03/ball_f00001-150x150.png" class="attachment-thumbnail" alt="ball_f00001" title="ball_f00001" /></a>
<a href='http://www.anderswallin.net/2010/03/spherical-drop-cutter/ball_v00001/' title='ball_v00001'><img width="150" height="150" src="http://www.anderswallin.net/wp-content/uploads/2010/03/ball_v00001-150x150.png" class="attachment-thumbnail" alt="ball_v00001" title="ball_v00001" /></a>

<p>For spherical cutters (a.k.a. ball-nose), the vertex-test (green dots), and the facet-test (blue dots), are fairly trivial. The edge-test (red-dots) is slightly more involved. Here, <a href="http://www.anderswallin.net/2007/07/drop-cutter-33-edge-test/">unlike before</a>, I tried doing it without too many calls to &#8220;expensive&#8221; functions like sin(), cos() and sqrt(). The final result of taking the maximum of all tests is shown in the &#8220;all&#8221; image which shows cutter-locations colour-coded based on the type of cutter-contact.</p>
<p>The logical next step is the toroidal, or bull-nose cutter. Again the edge-test is the most difficult, and I never really understood where the geometry of the <a href="http://www.freesteel.co.uk/wpblog/2006/12/the-offset-ellipse/">offset-ellipse</a> shows up&#8230; anyone care to explain?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anderswallin.net/2010/03/spherical-drop-cutter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Drop-cutter Tux</title>
		<link>http://www.anderswallin.net/2010/03/drop-cutter-tux/</link>
		<comments>http://www.anderswallin.net/2010/03/drop-cutter-tux/#comments</comments>
		<pubDate>Thu, 18 Mar 2010 18:44:26 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[CAM]]></category>
		<category><![CDATA[drop-cutter]]></category>
		<category><![CDATA[kd-tree]]></category>
		<category><![CDATA[tux]]></category>

		<guid isPermaLink="false">http://www.anderswallin.net/?p=2861</guid>
		<description><![CDATA[After the kd-tree search is done, I&#8217;ve added an overlap-check which leaves only triangles with a bounding box intersecting the cutter&#8217;s bounding box for the drop-cutter algorithm. It&#8217;s seems like a band-aid kind of hack to get it working, I think if the tree-search would be bug free the overlap check would not be needed&#8230; [...]]]></description>
			<content:encoded><![CDATA[<p><object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/5eci8wSmeGM&#038;hl=en_US&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/5eci8wSmeGM&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object></p>
<p>After the kd-tree search is done, I&#8217;ve added an overlap-check which leaves only triangles with a bounding box intersecting the cutter&#8217;s bounding box for the drop-cutter algorithm. It&#8217;s seems like a band-aid kind of hack to get it working, I think if the tree-search would be bug free the overlap check would not be needed&#8230;</p>
<p>The HD-version of the video is much better, once youtube has finished processing.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anderswallin.net/2010/03/drop-cutter-tux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kd-tree visualization</title>
		<link>http://www.anderswallin.net/2010/03/kd-tree-visualization/</link>
		<comments>http://www.anderswallin.net/2010/03/kd-tree-visualization/#comments</comments>
		<pubDate>Wed, 17 Mar 2010 20:04:47 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[CAM]]></category>
		<category><![CDATA[drop-cutter]]></category>
		<category><![CDATA[kd-tree]]></category>
		<category><![CDATA[vtk]]></category>

		<guid isPermaLink="false">http://www.anderswallin.net/2010/03/kd-tree-visualization/</guid>
		<description><![CDATA[When vimeo has had time to process the video, this will show a visualization of the kd-tree search: http://vimeo.com/10241672 the code is probably still a bit buggy&#8230;]]></description>
			<content:encoded><![CDATA[<p>When vimeo has had time to process the video, this will show a visualization of the kd-tree search:</p>
<p><a href="http://vimeo.com/10241672">http://vimeo.com/10241672</a></p>
<p><object type="application/x-shockwave-flash" data="http://vimeo.com/moogaloop.swf" width="500" height="281"><param name="allowscriptaccess" value="always"/><param name="allowfullscreen" value="true"/><param name="movie" value="http://vimeo.com/moogaloop.swf"/><param name="flashvars" value="clip_id=10241672&#038;server=vimeo.com&#038;fullscreen=1&#038;show_title=1&#038;show_byline=1&#038;show_portrait=1&#038;color=00ADEF"/></object></p>
<p>the code is probably still a bit buggy&#8230;</p>
<p><object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/-0MPPY49Nwk&#038;hl=en_US&#038;fs=1&#038;hd=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/-0MPPY49Nwk&#038;hl=en_US&#038;fs=1&#038;hd=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.anderswallin.net/2010/03/kd-tree-visualization/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Youtube vs. Vimeo</title>
		<link>http://www.anderswallin.net/2010/03/youtube-vs-vimeo/</link>
		<comments>http://www.anderswallin.net/2010/03/youtube-vs-vimeo/#comments</comments>
		<pubDate>Tue, 16 Mar 2010 21:05:33 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[CAM]]></category>
		<category><![CDATA[drop-cutter]]></category>
		<category><![CDATA[kd-tree]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[vimeo]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://www.anderswallin.net/?p=2849</guid>
		<description><![CDATA[I&#8217;ve continued to translate into C++ the old cam-experiments I wrote in C#. The kd-tree search for which triangles lie under the cutter seems to work, and the best way to visualize what is going on is through a video. Trying Vimeo for a change, to see if it&#8217;s any better than youtube for these [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve continued to translate into C++ the old cam-experiments I wrote in C#. The <a href="http://en.wikipedia.org/wiki/Kd-tree">kd-tree</a> search for which triangles lie under the cutter seems to work, and the best way to visualize what is going on is through a video. Trying <a href="http://vimeo.com/">Vimeo</a> for a change, to see if it&#8217;s any better than youtube for these CAD/CAM-visualizations, since they <a href="http://vimeo.com/hd">advertise HD</a>.</p>
<p>There are 360 original frames captured from <a href="http://vtk.org/">VTK</a>, and the original was created with</p>
<blockquote><p>mogrify -format jpg -quality 97 *.png</p></blockquote>
<p>followed by (copy/pasted from some site google found for me&#8230;)</p>
<blockquote><p>mencoder mf://*.jpg -mf fps=25:type=jpg  -aspect 16:9 -of lavf -ovc lavc -lavcopts aglobal=1:vglobal=1:coder=0:vcodec=mpeg4:vbitrate=4500 -vf scale=1280:720 -ofps 30000/1001 -o OUTPUT3.mp4</p></blockquote>
<p>If anyone knows something better which produces nice results on youtube or vimeo, let me know.</p>
<p>The original is 1280&#215;720 pixels, so it&#8217;s better to jump out of the blog to watch the videos in native resolution.</p>
<p>Youtube: <a href="http://www.youtube.com/watch?v=k3uCpWYm174">http://www.youtube.com/watch?v=k3uCpWYm174</a></p>
<p><object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/k3uCpWYm174&#038;hl=en_US&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/k3uCpWYm174&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object></p>
<p>Vimeo: <a href="http://vimeo.com/10215501">http://vimeo.com/10215501</a></p>
<p><object width="620" height="349"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=10215501&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=10215501&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="620" height="349"></embed></object>
<p><a href="http://vimeo.com/10215501">Drop-cutter toolpath algorithm development, part1</a> from <a href="http://vimeo.com/user3393382">anders wallin</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<p>OK, so the video doesn&#8217;t really show what is going on with the kd-tree search at all <img src='http://www.anderswallin.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  . It only shows two toolpaths, one coloured in many colours which is calculated without the kd-tree, and another one (offset upwards for clarity) that is calculated, much faster, using the kd-tree.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anderswallin.net/2010/03/youtube-vs-vimeo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Drop-cutter again</title>
		<link>http://www.anderswallin.net/2010/03/drop-cutter-again/</link>
		<comments>http://www.anderswallin.net/2010/03/drop-cutter-again/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 17:39:37 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[CAM]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[drop-cutter]]></category>
		<category><![CDATA[stl]]></category>
		<category><![CDATA[vtk]]></category>

		<guid isPermaLink="false">http://www.anderswallin.net/?p=2823</guid>
		<description><![CDATA[This is about my third rewrite of this fairly simple cam-algorithm where the cutter is dropped from above until it touches a triangle. It&#8217;s now in C++ with Boost-python bindings and with visualization using vtk. The cutter-location points are calculated by bringing the cutter into contact with the vertices of the triangle (green cl-points), the [...]]]></description>
			<content:encoded><![CDATA[<p>This is about my third rewrite of this fairly simple cam-algorithm where the cutter is dropped from above until it touches a triangle. It&#8217;s now in C++ with Boost-python bindings and with visualization using <a href="http://vtk.org/">vtk</a>.</p>

<a href='http://www.anderswallin.net/2010/03/drop-cutter-again/1_none/' title='1_none'><img width="150" height="150" src="http://www.anderswallin.net/wp-content/uploads/2010/03/1_none-150x150.png" class="attachment-thumbnail" alt="1_none" title="1_none" /></a>
<a href='http://www.anderswallin.net/2010/03/drop-cutter-again/2_vertex/' title='2_vertex'><img width="150" height="150" src="http://www.anderswallin.net/wp-content/uploads/2010/03/2_vertex-150x150.png" class="attachment-thumbnail" alt="2_vertex" title="2_vertex" /></a>
<a href='http://www.anderswallin.net/2010/03/drop-cutter-again/3_edge/' title='3_edge'><img width="150" height="150" src="http://www.anderswallin.net/wp-content/uploads/2010/03/3_edge-150x150.png" class="attachment-thumbnail" alt="3_edge" title="3_edge" /></a>
<a href='http://www.anderswallin.net/2010/03/drop-cutter-again/4_facet/' title='4_facet'><img width="150" height="150" src="http://www.anderswallin.net/wp-content/uploads/2010/03/4_facet-150x150.png" class="attachment-thumbnail" alt="4_facet" title="4_facet" /></a>
<a href='http://www.anderswallin.net/2010/03/drop-cutter-again/5_all/' title='5_all'><img width="150" height="150" src="http://www.anderswallin.net/wp-content/uploads/2010/03/5_all-150x150.png" class="attachment-thumbnail" alt="5_all" title="5_all" /></a>
<a href='http://www.anderswallin.net/2010/03/drop-cutter-again/frame059/' title='frame059'><img width="150" height="150" src="http://www.anderswallin.net/wp-content/uploads/2010/03/frame059-150x150.jpg" class="attachment-thumbnail" alt="frame059" title="frame059" /></a>

<p>The cutter-location points are calculated by bringing the cutter into contact with the vertices of the triangle (green cl-points), the edges (red cl-points), and the facet (blue cl-points). Then the cl-point with the highest Z-value is selected as the final cutter location. At the white points we did not make contact with the triangle at all.</p>
<p>If you look closely enough, all surfaces in the world are made of triangles, even Tux:<br />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="640" height="385" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/MyR_FAOYIm8&amp;hl=en_US&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="640" height="385" src="http://www.youtube.com/v/MyR_FAOYIm8&amp;hl=en_US&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>Due to compression, the video might not show enough detail, so here&#8217;s a screenshot:<br />
<a href="http://www.anderswallin.net/wp-content/uploads/2010/03/frame059.jpg"><img class="alignnone size-medium wp-image-2830" title="frame059" src="http://www.anderswallin.net/wp-content/uploads/2010/03/frame059-625x351.jpg" alt="" width="625" height="351" /></a></p>
<p>I wonder if anyone is still interested in this stuff? Given enough time I would like to develop waterline-paths and an octree-based cutting simulator also. It would help if these algorithms were incorporated in a CAD-program, or someone would develop a GUI.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anderswallin.net/2010/03/drop-cutter-again/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>drop-cutter with kd-tree</title>
		<link>http://www.anderswallin.net/2008/03/drop-cutter-with-kd-tree/</link>
		<comments>http://www.anderswallin.net/2008/03/drop-cutter-with-kd-tree/#comments</comments>
		<pubDate>Thu, 20 Mar 2008 23:29:47 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[CAM]]></category>
		<category><![CDATA[drop-cutter]]></category>
		<category><![CDATA[kd-tree]]></category>

		<guid isPermaLink="false">http://www.anderswallin.net/2008/03/drop-cutter-with-kd-tree/</guid>
		<description><![CDATA[First test with drop-cutter aided by the kd-tree. The output toolpath looks very much like the one without kd-tree, which is good. Less great is that I expected a speed-up of the algorithm &#8211; but in fact when I use kd-tree the program slows down! Something to investigate over the next few days.]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.anderswallin.net/wp-content/2008_03dropcut/drop-cutter.png" /></p>
<p>First test with drop-cutter aided by the kd-tree. The output toolpath looks very much like the one without kd-tree, which is good. Less great is that I expected a speed-up of the algorithm &#8211; but in fact when I use kd-tree the program slows down! Something to investigate over the next few days.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anderswallin.net/2008/03/drop-cutter-with-kd-tree/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Timing build_kdtree()</title>
		<link>http://www.anderswallin.net/2008/03/timing-build_kdtree/</link>
		<comments>http://www.anderswallin.net/2008/03/timing-build_kdtree/#comments</comments>
		<pubDate>Tue, 18 Mar 2008 21:46:30 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[CAM]]></category>
		<category><![CDATA[drop-cutter]]></category>
		<category><![CDATA[kd-tree]]></category>

		<guid isPermaLink="false">http://www.anderswallin.net/2008/03/timing-build_kdtree/</guid>
		<description><![CDATA[Drop-cutter requires a fast way of searching for triangles under the tool. A kd-tree (4-dimensional in this case) is suggested by Yau et al. I&#8217;ve tried to implement one here (look in trunk/Project2). Just ran some timing tests using Stopwatch() on it, and indeed the build_kdtree() function which takes a pile of triangles as input [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.anderswallin.net/wp-content/2008_03kdtime/kdtime.png"><img src="http://www.anderswallin.net/wp-content/2008_03kdtime/kdtime.png" alt="" /></a></p>
<p><a href="http://www.anderswallin.net/2007/08/drop-cutter-in-c-v2/">Drop-cutter</a> requires a fast way of searching for triangles under the tool. A <a href="http://en.wikipedia.org/wiki/Kd-tree">kd-tree</a> (4-dimensional in this case) is suggested by <a href="http://dx.doi.org/10.1080/00207540410001671651">Yau et al.</a> I&#8217;ve tried to implement one <a href="http://code.google.com/p/monocam/source/browse">here</a> (look in trunk/Project2). Just ran some timing tests using <a href="http://cplus.about.com/od/howtodothingsinc/a/timing.htm">Stopwatch()</a> on it, and indeed the build_kdtree() function which takes a pile of triangles as input and generates a kd-tree seems to run in O(N*log(N)) time as it should.</p>
<p>I&#8217;ve never drawn this type of plot before, and I was surprised at how close N*log(N) is to N &#8211; in a loglog plot they are almost equal!</p>
<p>This is a recursive function. I wonder if there&#8217;s a good way of multi-threading recursive functions? My laptop is dual-core and a modern desktop PCs is likely a quad-core &#8211; so let&#8217;s try to write these things multi-threaded from the start.</p>
<p>Next up is a function for doing the orthogonal range-search for triangles that lie under the tool. That&#8217;s supposed to run in O(N^(1-1/D)+K) time, where D is the dimension of the tree and K is the number of reported triangles &#8211; so O(N^(3/4)+K) in this case. I&#8217;ll try to get that done during the weekend.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anderswallin.net/2008/03/timing-build_kdtree/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
