Beginner's problems designing a fake fingernail

57 views
Skip to first unread message

Phil Kregor

unread,
Oct 14, 2025, 6:03:11 PMOct 14
to CadQuery

I am new to 3D and am a classical guitarist with bad fingernails, so I have to use fake nails.  The fake nails that I buy require a lot of trimming, so I want to design a nail that fits my fingers without modification.

I design the nails in 2 ways.  Method 1 uses a 3-point arc to shape the nail and the code is as follows:

import cadquery as cq
result = (cq.Workplane().moveTo(0,8).lineTo(10,8).threePointArc((18,0),(10,-8)).lineTo(0,-8))
result = result.close()
result = result.extrude(0.7) #Nail thickness

which produces the following result:

It looks like a fingernail, but doesn’t curve around the finger.  It’s too flat.

Method 2 uses 2 circles and the code is as follows:

import cadquery as cq

result =(cq.Workplane().circle(4).circle(3).extrude(8).moveTo(4,0).rect(8,8).cutBlind(12))

which produces the following result:

It looks like a fingernail, but I don’t know how to trim the top so that it has the curve of the nail at the end of the finger.

If either of the above ways is close, any comments on how to complete the fingernail would be appreciated.  If I’m totally off base, please suggest another approach.


Thanks 

Jeremy Wright

unread,
Oct 15, 2025, 9:11:56 AMOct 15
to Phil Kregor, CadQuery
Your images do not show up for me, but I can guess what you're looking for based on the shape of a fingernail. You might want to look into the Free Function API, specifically this from the Free Function API: https://cadquery.readthedocs.io/en/latest/free-func.html#mapping-onto-parametric-space

That API is still experimental, but notice in the example how the cylinder is used to construct curved shapes. I am thinking that the cylinder would work well as an analogue to a finger and the constructed shapes would be your pick.



--
cadquery home: https://github.com/CadQuery/cadquery
post issues at https://github.com/CadQuery/cadquery/issues
run it at home at : https://github.com/CadQuery/CQ-editor
---
You received this message because you are subscribed to the Google Groups "CadQuery" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cadquery+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/cadquery/d91c140e-8eae-45d0-b766-3a64d489a267n%40googlegroups.com.

Phil Kregor

unread,
Nov 7, 2025, 4:24:41 PM (2 days ago) Nov 7
to CadQuery
Jeremy, Thanks for your help.  I have made a lot of progress on this.   Now, however, I need to put a letter on each fingernail to tell which finger 
the nail goes on ("M", "I". "R". etc).  I can't get the letter to appear in the correct position and with the correct proportions. 
I combined two Cadquery free API examples to make this small program serve as an example of my problem:
 
from math import pi
from cadquery.func import cylinder, edgeOn, compound, wire, extrude, text, faceOn, fuse
from cadquery import exporters
from cadquery.vis import show

base = cylinder(16, 18).faces("%CYLINDER") # construct the base surface
nail = base.trim((0,0), (pi,0), (pi/2, 9)) # polyline trim
nailf = faceOn(nail, text("M", 1))
fusednail=fuse(nailf,nail)
show(fusednail)
#Give it a little thickness
fusednailex = extrude(fusednail,(0,2,0))
show(fusednailex)
exporters.export(fusednailex, 'fusednailex.stl')

fusednail looks like this:

fusednail.jpg
and fusednailex looks like this:
fusednailex.jpg

Lots of problems and questions here:
1.  How do I get the "M" to appear in the center of the nail?  I tried the valign and halign parameters of text, but they don't help.
 I've also tried defining a new workplane on the face of the nail and putting text there and that seems to work, but I can't fuse 
or join or union the 2 together like I can above,
2.  How do I get the "M" to have correct proportions?  It's now way too wide and way to short.
3.  After I fuse the "M" to the nail, I extrude them as one object.  Will the "M" have any thickness of its own and will it even show up
when I print the nail?  Do I need to change its color (not sure how to do that).

Thanks

Adam Urbanczyk

unread,
Nov 9, 2025, 4:24:25 AM (22 hours ago) Nov 9
to CadQuery
I'd use a different approach for text:

from math import pi
from cadquery.func import *

from cadquery import exporters
from cadquery.vis import show

base = cylinder(16, 18).faces("%CYLINDER") # construct the base surface
nail = base.trim((0,0), (pi,0), (pi/2, 9)) # polyline trim
spine = edgeOn(base, [(pi/2, 2), (pi/2 + 0.5, 2)])


txt = text("M", 4, spine)
fusednail = clean(offset(nail, 0.1, both=True)) + offset(txt, 0.15)

show(fusednail)

Jeremy Wright

unread,
Nov 9, 2025, 1:11:49 PM (13 hours ago) Nov 9
to Adam Urbanczyk, CadQuery
FYI - Adam just fixed a bug with single letters that would probably apply to what you're doing. 


You'll need to pull the latest changes from git master to get the fix.

Jeremy

Phil Kregor

unread,
Nov 9, 2025, 3:13:03 PM (11 hours ago) Nov 9
to CadQuery
Thanks to both of you for your answers.  It's working fine now.
Reply all
Reply to author
Forward
0 new messages