The Sketch.circle() method is used in CADQuery to create a 2D circular sketch.
circle(radius, forConstruction=False)
radius (float): The radius of the circle to create.forConstruction (optional, bool): If set to True, the circle will be created as a construction feature, which will not be included in the final model.A Workplane object with the circle sketch added.
import cadquery as cq
# create a new 2D sketch
c = cq.Workplane("XY").circle(10)
# create a cylindrical object from the sketch
s = c.extrude(5)
# show the resulting object
show_object(s)
In this example, Sketch.circle() is used to create a circle with a radius of 10. This circle is then extruded into a cylinder with a height of 5 using the extrude() method. Finally, the resulting object is shown using the show_object() method.
Sketch.circle() method creates a circle centered at the origin of the current workplane.move() and rotate() methods.circle() multiple times, or by passing a list of radii to the circle() method.