<p>The overall goal is to create a print of the liberty bell.  No clapper is needed.  The support beam is not needed.  I am just looking to mimic the outside shape of the bell.  After an application of Google-fu I found this image.  It has been cleaned up and cropped a bit.</p>

<p><a href="https://i.stack.imgur.com/HTg2W.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HTg2W.png" alt="enter image description here"></a></p>

<p>In OpenScad the surface function was applied to the png to generate a height model.   I subtracted out a few cubes, and eventually got it down to a layer of about .1 height.</p>

<p>My Evil (pun intended) plan is to get it down to a 2d model.  Then by shifting a copy of model from itself, and subtracting the two.  That should leave just the curve.  Then rotate_extrude the curve to generate the actual bell at the desired thickness.</p>

<p>I see the problem coming. If the model is layered down to zero height it will vanish. Leaving me nothing to rotate.</p>

<p>So on to the question.</p>

<p><strong>Is there any tool or technique to turn the image into a 2d openscad object or failing that is there another way to approach the problem?</strong></p>

<p><a href="https://i.stack.imgur.com/0joh6.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0joh6.jpg" alt=""></a> </p>

<p>The direction that fred pointed me at is viable. I didn't use the actual image shown here, but a manually generated one from OpenScad.  As a proof of concept the technique works well.</p>

[{'answer_id': 3864, 'author': 'fred_dot_u', 'author_id': 854, 'author_profile': 'https://3dprinting.stackexchange.com/users/854', 'pm_score': 3, 'selected': True, 'text': '<p>As you are already familiar with OpenSCAD, consider to use the <a href="https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/3D_to_2D_Projection" rel="nofollow noreferrer">projection() function</a> to accomplish your goal.</p>\n\n<p>If you allow for an interpretation that one can cast a shadow of the part on a surface below, it becomes a 2D representation of the part. This is effectively how projection works in OpenSCAD.</p>\n\n<p>Note that the part image below is centered in x, y, z and the cut/projection action takes place at the z = 0 plane:</p>\n\n<p><a href="https://i.stack.imgur.com/7USA0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7USA0.png" alt="sample model image"></a></p>\n\n<p>When the function is applied to this model, the result is a non-contiguous 2d image:</p>\n\n<p><a href="https://i.stack.imgur.com/COw50.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/COw50.png" alt="projected cut image"></a></p>\n\n<p>When the cut parameter is ignored or set to false, the image which results is effectively an orthogonal shadow of the entire object, rather than a selected slice:</p>\n\n<p><a href="https://i.stack.imgur.com/ffOe7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ffOe7.png" alt="flat shadow image"></a></p>\n\n<p>It gets better, of course. In OpenSCAD, the translate, rotate and scale functions apply. One can tip a model over, resize it, spin it around, combine with the cut parameter and get any combination of 2d image from the original model:</p>\n\n<p><a href="https://i.stack.imgur.com/cU1sN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cU1sN.png" alt="rotated model image"></a></p>\n\n<p><a href="https://i.stack.imgur.com/HlXSF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HlXSF.png" alt="shadow rotated model"></a></p>\n\n<p>It\'s important to note that OpenSCAD does provide non-zero thickness to these projections when rendered, or maybe when previewed. I always get those two swapped around. As your objective is a 2D result, you may be able to select from PNG (save as image) or Export as DXF or SVG.</p>\n\n<p>Re-reading your post, I also missed part of a more useful answer. Once you have the profile you desire, you can use the <a href="https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/2D_to_3D_Extrusion" rel="nofollow noreferrer">rotate_extrude function</a> on the profile you generate. Despite the non-zero thickness, it uses the zero-thickness aspect to create the model from that function.</p>\n\n<p>That aspect of the answer is left as an exercise for the reader, as the options are many and results can be complex.</p>\n'}, {'answer_id': 3865, 'author': 'kintel', 'author_id': 6785, 'author_profile': 'https://3dprinting.stackexchange.com/users/6785', 'pm_score': 2, 'selected': False, 'text': '<p>Two options:</p>\n\n<ol>\n<li>Use <code>TRACE2SCAD</code> (<a href="http://aggregate.org/MAKE/TRACE2SCAD" rel="nofollow noreferrer">http://aggregate.org/MAKE/TRACE2SCAD</a>)</li>\n<li>For the more adventurous: Dig up the old pull-request for the suggested <code>trace()</code> module: <a href="https://github.com/openscad/openscad/pull/1110" rel="nofollow noreferrer">https://github.com/openscad/openscad/pull/1110</a></li>\n</ol>\n'}, {'answer_id': 3879, 'author': 'LifeInTheTrees', 'author_id': 6803, 'author_profile': 'https://3dprinting.stackexchange.com/users/6803', 'pm_score': 0, 'selected': False, 'text': '<p>You could have done that with OpenSCAD, there are instructions for extruding. </p>\n\n<p>Personally, I\'d just do a 1 altitude copy with \n<a href="http://www.thingiverse.com/thing:1981938" rel="nofollow noreferrer">Image 2 STL 2 Heightmap Mesh Converter Generator</a>, then rotate in OpenSCAD. It\'s called <code>rotate_extrude()</code> and is used for seashells.</p>\n\n<p>In MeshLab you can use <em>Laplacian Smooth</em> to depixelate/antialias it.</p>\n'}]
['https://3dprinting.stackexchange.com/questions/3863', 'https://3dprinting.stackexchange.com', 'https://3dprinting.stackexchange.com/users/1397/']