gumyr / build123d

A python CAD programming library
Apache License 2.0
382 stars 72 forks source link

Thicken normal incorrect #623

Open MatthiasJ1 opened 1 month ago

MatthiasJ1 commented 1 month ago
l1 = JernArc((0,0), (-1,0), 1, 180).edge().reversed()
l2 = JernArc((0,0), (1,0), 2, -90)
s = RadiusArc((0,0), (0,-1), 1)
f = sweep((l1^0)*s, l1) + sweep((l2^0)*s, l2) # Workaround for #622
1
p = thicken(f, 0.4)
2
gumyr commented 1 month ago

There is a normal_override parameter of thicken to help cope with these situations:

p = thicken(f, 0.4, normal_override=(0, 1, 0))

image

When thicken was developed controlling the normal was found to be difficult so this override was added as the best solution at the time.

MatthiasJ1 commented 1 month ago

Shouldn't it just thicken in the face normal?