swModel.Extension.SelectByID2("前视基准面", "PLANE", 0, 0, 0, False, 0, Nothing, 0) # 先选择要插入草图的位置,此处选择的是前视基准面swSketch.InsertSketch("True") # 进入草图绘制swSketch.CreateLine(0, 0, 0, -0.01, 0, 0) # 插入(0,0,0)到(-0.01,0,0)的线段,单位是m
swSketch.CreateCircle(0,0,0,0.02,0,0) # 中心点和圆上一点创建圆swSketch.CreateCircleByRadius(0,0,0,0.01) # 创建圆通过圆心和半径swSketch.CreateArc(0,0,0,-0.01,0,0,0.01,0,0,-1) # 圆弧中心、起点、终点创建圆弧swSketch.Create3PointArc(-0.01,0,0,0.01,0,0,0,0.01,0) # 创建三点圆弧swSketch.Create3PointCornerRectangle(0,0,0,0,0.01,0,0.02,0.01,0) # 三个顶点创建矩形swSketch.CreateCornerRectangle(0,0,0,0.01,0.02,0) # 通过两个对角点创建矩形