Rotating objects created by polarArray() #1795
-
I can't figure out how to rotate things created on the points of a polarArray(). Specifically something like: If anyone has any advice I'd appreciate it. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Is this what you are looking for - control of angle a1 as in this example?: import cadquery as cq
a1 = -90
shape1 = (
cq.Workplane().cylinder(10, 20, angle=180).rotate((0, 0, 0), (0, 0, 1), a1).val()
)
res = cq.Workplane("XY").polarArray(100, 0, 360, 6).eachpoint(shape1) You might also try with import cadquery as cq
a1 = -90
sk1 = cq.Sketch().parray(100, 0, 360, 6).arc((0, 0), 20, a1, 180).close().assemble()
res = cq.Workplane().placeSketch(sk1).extrude(10) Another way to create the half circle is with free function API: from cadquery.func import *
from math import pi
c1 = circle(20).trim(0, pi)
s1 = segment((-20, 0, 0), (20, 0, 0))
f1 = face(wire(c1, s1)) |
Beta Was this translation helpful? Give feedback.
Is this what you are looking for - control of angle a1 as in this example?:
You might also try with
Sketch
:Another way to create the half circle is with free function API: