本文整理汇总了Python中ArchWall.makeWall方法的典型用法代码示例。如果您正苦于以下问题:Python ArchWall.makeWall方法的具体用法?Python ArchWall.makeWall怎么用?Python ArchWall.makeWall使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ArchWall
的用法示例。
在下文中一共展示了ArchWall.makeWall方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: removeShape
# 需要导入模块: import ArchWall [as 别名]
# 或者: from ArchWall import makeWall [as 别名]
def removeShape(objs, mark=True):
"""takes an arch object (wall or structure) built on a cubic shape, and removes
the inner shape, keeping its length, width and height as parameters."""
import DraftGeomUtils
if not isinstance(objs, list):
objs = [objs]
for obj in objs:
if DraftGeomUtils.isCubic(obj.Shape):
dims = DraftGeomUtils.getCubicDimensions(obj.Shape)
if dims:
name = obj.Name
tp = Draft.getType(obj)
print tp
if tp == "Structure":
FreeCAD.ActiveDocument.removeObject(name)
import ArchStructure
str = ArchStructure.makeStructure(length=dims[1], width=dims[2], height=dims[3], name=name)
str.Placement = dims[0]
elif tp == "Wall":
FreeCAD.ActiveDocument.removeObject(name)
import ArchWall
length = dims[1]
width = dims[2]
v1 = Vector(length / 2, 0, 0)
v2 = v1.negative()
v1 = dims[0].multVec(v1)
v2 = dims[0].multVec(v2)
line = Draft.makeLine(v1, v2)
wal = ArchWall.makeWall(line, width=width, height=dims[3], name=name)
else:
if mark:
obj.ViewObject.ShapeColor = (1.0, 0.0, 0.0, 1.0)