#!/usr/bin/env python3
import cadquery as cq
head_height = 120 # distance from top to bottom
head_width2 = 50 # half the width
head_depth = 50 # front of forehead to base
obj = cq.Workplane("XY")
#obj = obj.ellipse(head_height/2, head_width2)
obj = obj.polygon(180, head_width2)
obj = obj.revolve(90, (0,0,0), (1,0,0))
# Box to subtract the negative half
neg = cq.Workplane("XY").box(head_height, head_width2, head_depth*2)
neg = neg.translate([0, -head_width2 / 2, 0])
obj = obj.cut(neg)
if "show_object" in locals():
show_object(obj)
obj = obj.ellipseArc(head_height/2, head_width2,
0, 180, makeWire=True)
obj = obj.revolve(90, (0, 0, 0), (1, 0, 0))
obj = obj.translate((head_height/2, 0, 0))
--
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 on the web visit https://groups.google.com/d/msgid/cadquery/CAEcGQ%2BNxk2e5OTHSZRcj%3D1jTZxmffy-ApqOKiy%2Bwwv3C8NoWrw%40mail.gmail.com.
import cadquery as cq
head_height = 120
head_width2 = 50
head_depth = 50
obj = cq.Workplane("XY")
obj = obj.ellipseArc(head_height/2, head_width2, 0, 180, makeWire=True)
obj = obj.revolve(90, (0, 0, 0), (1, 0, 0))
obj = obj.translate((head_height/2, 0, 0))
if not obj.findSolid().isValid():
print("object isn't valid")
show_object(obj)

To view this discussion on the web visit https://groups.google.com/d/msgid/cadquery/CAEcGQ%2BNZvwDDRsxY2RF-zQLtcu6uWyb9cYYKW9%2BgKO0NEwBmZg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cadquery/a9dde5bd-0dea-425d-8517-95606be6003bn%40googlegroups.com.