本文整理汇总了Python中cura.Arranging.Arrange.Arrange.checkShape方法的典型用法代码示例。如果您正苦于以下问题:Python Arrange.checkShape方法的具体用法?Python Arrange.checkShape怎么用?Python Arrange.checkShape使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cura.Arranging.Arrange.Arrange
的用法示例。
在下文中一共展示了Arrange.checkShape方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_checkShape_place
# 需要导入模块: from cura.Arranging.Arrange import Arrange [as 别名]
# 或者: from cura.Arranging.Arrange.Arrange import checkShape [as 别名]
def test_checkShape_place():
ar = Arrange(30, 30, 15, 15)
ar.centerFirst()
shape_arr = gimmeShapeArray()
points = ar.checkShape(3, 6, shape_arr)
ar.place(3, 6, shape_arr)
points2 = ar.checkShape(3, 6, shape_arr)
assert points2 is None
示例2: test_checkShape
# 需要导入模块: from cura.Arranging.Arrange import Arrange [as 别名]
# 或者: from cura.Arranging.Arrange.Arrange import checkShape [as 别名]
def test_checkShape():
ar = Arrange(30, 30, 15, 15)
ar.centerFirst()
shape_arr = gimmeShapeArray()
points = ar.checkShape(0, 0, shape_arr)
points2 = ar.checkShape(5, 0, shape_arr)
points3 = ar.checkShape(0, 5, shape_arr)
assert points2 > points
assert points3 > points
示例3: test_checkShape_rectangular
# 需要导入模块: from cura.Arranging.Arrange import Arrange [as 别名]
# 或者: from cura.Arranging.Arrange.Arrange import checkShape [as 别名]
def test_checkShape_rectangular():
ar = Arrange(20, 30, 10, 15)
ar.centerFirst()
print(ar._priority)
shape_arr = gimmeShapeArray()
points = ar.checkShape(0, 0, shape_arr)
points2 = ar.checkShape(5, 0, shape_arr)
points3 = ar.checkShape(0, 5, shape_arr)
assert points2 > points
assert points3 > points