Arch Add/zh-cn: Difference between revisions

From FreeCAD Documentation
(Created page with "* 将{{incode|objectsList}}中的对象添加至{{incode|host}}对象。 ** {{incode|objectsList}}可以是单个对象或一组对象。")
(Created page with "示例:")
Line 38: Line 38:
** {{incode|objectsList}}可以是单个对象或一组对象。
** {{incode|objectsList}}可以是单个对象或一组对象。


示例:
Example:
{{Code|code=
{{Code|code=
import FreeCAD, Arch, Draft, Part
import FreeCAD, Arch, Draft, Part

Revision as of 10:10, 17 June 2019

Arch Add

Menu location
Arch → Add
Workbenches
Arch
Default shortcut
None
Introduced in version
-
See also
Arch Remove

描述

借助本建筑添加工具您将能够实现以下4种操作:

建筑移除工具与本工具功能相反。

将立方体添加至墙体,从而融为一体。

如何使用

  1. 先选择待添加的对象。再选择主建筑对象。
  2. Add按钮。

脚本

参阅: Arch APIFreeCAD Scripting Basics.

借助下列函数即可在Python控制台中使用添加工具:

addComponents(objectsList, host)
  • objectsList中的对象添加至host对象。
    • objectsList可以是单个对象或一组对象。

示例:

import FreeCAD, Arch, Draft, Part

p1 = FreeCAD.Vector(0, 0, 0)
p2 = FreeCAD.Vector(2000, 2000, 0)

Line = Draft.makeWire([p1, p2])
Wall = Arch.makeWall(Line, width=150, height=2000)

p3 = FreeCAD.Vector(0, 2000, 0)
p4 = FreeCAD.Vector(3000, 0, 0)

Line2 = Draft.makeWire([p3, p4])
Wall2 = Arch.makeWall(Line2, width=150, height=2000)
FreeCAD.ActiveDocument.recompute()

Arch.addComponents(Wall2, Wall)
FreeCAD.ActiveDocument.recompute()