CadQuery 最小草图拉伸示例
以下示例在 XY 平面创建草图,在草图中创建 2x2mm 矩形并拉伸到 0.1mm 高度。
minimal_sketch_extrude.py
import cadquery as cq
# Create workplane (2d coordinate system for us to create the sketch in)
wp = cq.Workplane("XY")
# Create sketch, create rect, close sketch and extrude the resulting face
result = wp.sketch().rect(2, 2).finalize().extrude(0.1)
result # This line is just to show the result in cq-editor or jupyter
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow