FreeCAD|建模常用命令

本文介绍了如何在FreeCAD中通过Python接口进行几何建模,包括创建点、线段、圆弧、Shape以及各种基本形状,如长方体、圆等,并展示了如何处理Face、Wire和Edge,最后介绍了文件导出功能。
摘要由CSDN通过智能技术生成

import FreeCAD as App

import Part

1、创建点

V1 = App.Vector(0, 10, 0)

2、创建线段

L1 = Part.LineSegment(V1, V2)

3、创建圆弧

C1 = Part.Arc(V1, VC1, V4)

4、创建Shape

S1 = Part.Shape([C1, L1, C2, L2])

5、创建基本形状

makeBox(l, w, h, [p, d])

makeCircle(radius)

makeCone(radius1, radius2, height)

makeCylinder(radius, height)

makeLine((x1, y1, z1), (x2, y2, z2))

makePlane(length, width)

makePolygon(list)

makeSphere(radius)

makeTorus(radius1, radius2)

6、Face

face = Part.Face(wire3)

7、Wire

wire2 = Part.Wire([edge3, edge4])

wire3 = Part.Wire([wire1, wire2])

8、Edge

edge = Part.makeLine((0, 0, 0), (10, 0, 0))

edge = line.toShape()

9、保存文件

exportBrep()

exportIges()

exportStep()

exportStl()

  • 12
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值