def updateTransform(self): if self.rotation == (0, 0, 0) and self.scale == (0, 0, 0): self.transformedDim = None else: selectionDim = SelectionTransform(self.sourceDim, self.selection) self.transformedDim = DimensionTransform(selectionDim, self.rotateAnchor, *self.rotation)
def updateTransform(self): if self.rotation == (0, 0, 0) and self.scale == (0, 0, 0): self.transformedDim = None self.transformOffset = Vector(0, 0, 0) else: selectionDim = SelectionTransform(self.sourceDim, self.selection) self.transformedDim = DimensionTransform(selectionDim, self.rotateAnchor, *self.rotation) self.transformOffset = self.transformedDim.bounds.origin - self.selection.origin self.updateImportPos()
def test_selection_transform(schematic_world): pytest.skip() selection = BoundingBox((10, 10, 10), (100, 100, 100)) sch_dim = schematic_world.getDimension() sch_dim_transformed = SelectionTransform(sch_dim, selection) try: from mcedit2.worldview.schematic_worldview import displaySchematic except ImportError: log.warn("mcedit2 not available, not displaying result") else: displaySchematic(sch_dim_transformed)