Using spline or equation for cone radius

Using spline or equation for cone radius

klaberte
Participant Participant
726 Views
3 Replies
Message 1 of 4

Using spline or equation for cone radius

klaberte
Participant
Participant

I would like to create 3D cylinder 75mm tall, where the radius is determined by Order 2 polynomial, i.e.

 

r = A*h^2+B*h+C, 

h is the height of the cylinder

r is the radius at height h

 

I can create a cylinder with a linear equation, i.e. A=0, but would really like to replicate the non-linear curvature of the cylinder.  I am pretty comfortable (thanks mostly due to consulting this forum, thank you!) with meshmixer, and also have experience with tinkercad.  

 

Any known solutions to this endeavor?

 

 

0 Likes
Accepted solutions (1)
727 Views
3 Replies
Replies (3)
Message 2 of 4

hfcandrew
Advisor
Advisor

Meshmixer does not support this. This feel more like an OpenSCAD kind of thing.

0 Likes
Message 3 of 4

klaberte
Participant
Participant
Accepted solution

I've spent some time looking for solutions, and have one, which I'll show below, in case someone else finds this in a search.

 

@hfcandrew is likely right, as I haven't found any way to accomplish this within meshmixer itself.  Instead, I used a combination of Inkscape and Tinkercad. Here are the steps I took.

 

  1. With whatever software you have, plot your function at whatever resolution you want. (I used Google Sheets, formatted my <X,Y=f(X)> into adjacent columns, and Insert->Chart to plot my equation.)
  2. Export or download the created graph as a png.
  3. Import your graph.png into Inkscape (a free application, lots of info on YouTube, etc.) [I recommend spending some time scaling the figure so that it is the same size and lines up with the Inkscape coordinate system.]
  4. Once your graph.png is displayed in Inkscape and properly sized, type 'b' to start the creation of a Bezier curve (aka the Pen Tool).  Then trace your Bezier right on top of the your imported graph.png, making sure to close the path into a watertight 2d graph.  You can use + and - to zoom in and out as you create your trace. (consult YouTube for more details on how to use the pen tool, aka drawing Bezier curves)
  5. [Optional] If you want to improve your trace, press n to start the Node Tool. Then click your trace, and all of your original points made while tracing become visible.  You can grab and move each point in the trace path.  (See YouTube for more details on the Node Tool.)
  6. The right side of your Inkscape window should have a couple of tabs, one being "Layers and Objects".  In there, you should be able to find and select your Bezier trace (maybe called a "path").  In addition, you should find your imported image graph.png.  Both objects can be selected, or hidden, in this Layers and Objects tab.
  7. Hide your graph.png, leaving only the trace you created.
  8. Save to .svg
  9. Created a new project in Tinkercad, naming it appropriately.
  10. On the right side of the Tinkercad window, you should see some basic shapes.  While those are fine starting points in many cases, we are looking for a particular shape generator, called SVG Revolver.  In my case, I found it by using the search tool above the basic shapes and searching for SVG Revolver. It looks like green donut with a chunk of it missing.
  11. Drag and Drop the SVG Revolver on your working plane. 
  12. It should open up a SVG Revolver menu for manipulating your shape, which includes a place to specify your svg.  I use the "Or choose one" button therein, but you could also drag and drop your svg file into the Picture area of the SVG Revolver menu.
  13. Wait patiently as Tinkercad performs its math to create your mesh using the specified SVG profile.  In my case, it took 30-60 seconds before anything happened.
  14. Right above where you specified the Picture/SVG, there is a slider to specify "Revolver Angle". You will likely want to increase that to 360, but you can modify as needed.  Note that there will be a non-zero radius "Inside Diameter".  I usually set that to 1mm, and then later fill it in with a cylinder.
  15. The size of your Revolved mesh is likely incorrect, which you will need to manually fix using Tinkercad's shape-manipulating tools, but it should have the smooth curved feature that brought you here in the first place.
  16. Make all the adjustments to fix your mesh, filling the inside diameter, resizing, plane cutting etc..  I usually do this right in Tinkercad. 
  17. Export your Revolved Mesh to an stl file using the "Export" button in the top right of Tinkercad. (Alternatively, you can export your original mesh created by SVG Revolver as an stl, and use Meshmixer, or other 3D CAD software, to fix and adjust.)
  18. Done

I'm hoping to make a video showing all the steps.  If I do, I will add it to this thread.

Message 4 of 4

danyatallah
Contributor
Contributor

you can creat 2 discs and then connect those 2 discs together

0 Likes