CadQuery:草图倒角最小示例

此代码对草图矩形的顶边进行倒角,然后拉伸

chamfer_in_sketch.py
import cadquery as cq

obj = (cq.Workplane("YZ")
    .sketch()
    .rect(1,4)
    # Select vertices to chamfer
    .vertices(">Y") # Top of local Y coordinate system (which is Z axis)
    .chamfer(0.2)
    .finalize()
    .extrude(0.1)
)
obj

CadQuery 3D model of extruded sketch rectangle with chamfered top vertices


Check out similar posts by category: CadQuery, Python