Hi
i am going to recreate the mug below in grasshopper,my best try went with a loft between shapes and somehow using predefined curve for top layer which is not parametric also my loft lead to unwanted result.(attached file)
how can i make this mug fully parametric?
any help appreciated.
thanks in advance.
edit:
the original mug link: madexbinary - Etsy France
mug_01.3dm (24.9 KB)
mug_01.gh (7.2 KB)


2 Likes
Hello
it is a nice design.
it could be good to give references of the work you want to copy. Just to say
1 Like
thanks,iâve updated the post.
Here a way to do a parametric mug. There are many solution but this one will give some basic way to have some smooth shapes.
I first took a main curve that is revolved to make the cup. As already said there are many others ways.
The second curve is the handle that is piped.
The curves are internalised in Greasshopper, bake then in rhino so you could move control points and change the shapes.
These 2 volumes are sliced. Then offseted positive then negative in order to smooth the link.
Play with a low number of slices, then augment it to make a render in Dendro.
You need Clipper, but you could try with Rhino Offset (not it works here)
Dendro is not mandatory just if you want to make some renders.
parametric mug.gh (18.8 KB)
A version without the faceted render due to the Brep to mesh standard settings.
I also added a heal Mesh component (from Nautilus) but if you have last Dendro version you must not need it.
Different values of smoothing
parametric mug.gh (22.2 KB)
8 Likes
For the reference example you could almost get away with Sweep2.
The number of CVs of the base circle would need to match the top asymmetric dumbbell curve.
This got complicated in a hurry.
cup_pinched_2023Mar5a.gh (26.9 KB)
Four curves lofted, top two are copies:
5 Likes
This is such a great shape - so I had to tweak Josephâs solution for 3D printing. (Thanks -again - Joseph, for figuring out the tricky stuff.) I was surprised to see that the Loft component uses 15 untrimmed surfaces to make itâs open Brep, so I had to do a little extra work to get a final design with reasonable thickness for printing. Because my scale is millimeters I scaled the final shape up by a factor of 30. The results in an Open and a Closed Brep, which in turn causes Rhino to create an STL file with 571 open edges. These are usually mismatches with the STL fileâs triangular mesh vertices.

Netfabb fixes these errors in just a few seconds and returns an error free STL file that slices with no problems. The end result is 91.22 mm high with an estimated print time of 3 hrs 10 min.
cup_pinched_2023Mar5a-bb1.gh (30.8 KB)
2 Likes
Using Offset Surface on all the faces makes a mess! There is a much better way to get thickness using Offset Curve and lofting again for the outer shell. I added a better bottom method too (orange group) and joined all the parts (white group) to get a nice âClosed Brepâ.
cup_pinched_2023Mar5b.gh (36.3 KB)
I see that you have adopted the habit of renaming components instead of renaming their outputs. This makes it harder to understand code when you come back to it - I know, I tried it too years ago.
1 Like
Ah yes - I see you have identified yet another quirk I missed - the seams! Those nasty little beasts are quite elusive indeed. And I did forget about the component renames - those help me but I agree I should fix them when I post something here. Iâll try to remember that in the future.
1 Like
If they work for you, keep at it, no reason to modify code to post here. I think renaming components is a bad idea. You can get the same effect by renaming outputs and inputs.
I dealt with curve seams in the first version I posted. What caused you trouble was trying to get thickness by using Offset Surface on the faces, right here: (a leaky cup!)
Way better to offset the curves and loft a second time to get the offset brep (outer surface).
By the way, the bottom you used leaves a big gap because the inner surface is not a cylinder. And the top is closed instead of just the gap between inner and outer surfaces. 
Please do me a favor and try this experiment?
- Set your Rhino units to inches.
- Bake my version âbâ cup without any changes.
- Change the Rhino units to millimeters and answer the scale dialog box âYesâ:
You will get this: (3 inches tall = 76.2 mm)
- Go through your normal process of creating an STL file for printing. How are the results?
I would expect a clean model from a âClosedBrepâ, eh? Isnât that what 3D printing is all about?
Would you believe I just finished eliminating the scaling function by simply adjusting the values of the various sliders. I figured there was a way to do it with some Rhino functions, but I donât use Rhino at all, so I wasnât eager to go mucking around trying to figure out how to do it. Iâm sure what you suggested will work though - Iâll give it a try tomorrow sometime.
I did finally figure out how you did the seam adjustment - it makes perfect sense once you understand whatâs going on. And your point about offsetting the curves is well taken - doing that is much cleaner than trying to offset the surface. I should have stopped when I saw the surface offset made things more complicated.
I learned a long time ago that Netfabb can fix the problems associated with trying to slice anything other than exported closed Breps, so I used that method when I wasnât able to get everything in closed Brep form. Many of my designs are based on lofted surfaces so your method of properly aligning the curves will serve me well.
I really appreciate all the answers here.
I am learning many things from these solutions.
As a side ,the form will be printed in clay and gcode will be in one spiral vase mode, then in my case no thickness needed.
I will update this post with outcome.
- this was clever and perfect use of nurbs curves feature Mr Delrieu.
the Dendro and Nautilus are big lesson and iâm so grateful.
i donât know what i am missing with curve to volume
and volume to curve
as seen in the image the result is pipe
- it seems there is only one solution tick available since i choose this one as answer too Mr Oster.
same as the double circle at top i have add another circle at bottom to make more control on the bottom fillet.
may i ask if you can let me know how to control the distance of too tantan because in such way i can control the lowest distance of top dumbbell.by now i can increase this smooth lvl only by taking the handle circle far away.
here,my new challenge and i will be glad if can guide me the way to do this:
when picking a cup with right hand then there is mostly two finger do the job in a cross, thumb finger horizontally and index finger vertically. current shape(orginal one) is proper for index finger but for the thumb finger it seems much better to make the horizontal deform instead.
this cup is symmetrical and i need to be able to deform both sides differently.
unable to realize which one of these will reach me there:
-make a mirror and define different deform and weld at end.
-or add point or line attractor
or any other ways
thanks in advance.
You just have to augment the number of slices which are in a panel.
But Dendro is here just for rendering. Because is you want to 3d prjnt in clay you ll just have to connect the curves and before make sure there is just one curve per slice. I did a tool in Nautilus for that. But it could be better in your case with a nice spiral.
1 Like
Yes, that method works A-OK. (I had to stumble around a bit to find Rhinoâs Scale option.) I reckon knowing how to do this will help sometime in the future. Thanks.
The dialog box I showed in the image happens automagically when you change the units. In Rhino, âView | Display Options⊠| Unitsâ.
Birk, you know way more than I do about 3D printing. Youâve been doing it for years. As I recall, every post youâve made on this forum is related to it. So it surprises me that you donât seem to pay much attention to getting a âClosed Brepâ in Grasshopper, relying on other tools to fix your broken geometry?
P.S. In particular, some issues are likely not fixed by software tools outside of Rhino/GH?
Like using a cylinder for the bottom of this cup/vase that doesnât have vertical sides. This leaves a major gap inside around the bottom between the vertical cylinder and the sloped inner surface.

The reason for my (peculiar?) behavior is my objective is to get a viable 3D print. If it takes me less time to make an incorrect STL file that Netfabb can fix compared to figuring out how to get everything as a closed Brep, thatâs what I do. Keep in mind that since I publish all my designs (STL files) for free my focus is on the STL file, not the actual geometry.
The good news is that the postings here have taught me a lot about how GH & Rhino work (lots of that is actually pretty obscure for someone who is totally self taught), so Iâm getting much better at making âgoodâ geometry.
Thanks for pointing out the use of an extra circle to make a curved bottom. I added that to my GH file along with Fillet Edge to smooth the inside bottom/side edge and a Sweep2 to make the top lip a semi-circle. And yes, it is a closed Brep
.
Iâm looking forward to seeing how your clay print turns out. Are you going to use a round or square nozzle?
PS: I named my GH file Pitcher-Mug because, depending on size, this shape could be either one. In the case of a pitcher Iâve thought about adding a handle - but I think that might destroy the overall look of the piece.
1 Like
âI suppose it is tempting, if the only tool you have is a hammer, to treat everything as if it were a nail.â
â Abraham Maslow, 1966 (and others before him)
By the way, I too am âtotally self taughtâ.