def fn(): context.application.model.file_open("test/input/core_objects.zml") context.application.main.toggle_selection(context.application.model.universe.children[3], on=True) parameters = Parameters() parameters.center = numpy.array([1.0, 0.2, -0.9], float) parameters.normal = numpy.array([2.0, 4.1, -1.0], float) ReflectionDialog = context.application.plugins.get_action("ReflectionDialog") assert ReflectionDialog.analyze_selection(parameters) ReflectionDialog(parameters)
def fn(): context.application.model.file_open("test/input/core_objects.zml") context.application.main.toggle_selection(context.application.model.universe.children[3], on=True) parameters = Parameters() parameters.center = Translation([2.0, 4.1, -1.0]) parameters.rotation = Rotation.from_properties(1.0, numpy.array([0.1, 1.4, 0.3]), False) RotateAboutAxisDialog = context.application.plugins.get_action("RotateAboutAxisDialog") assert RotateAboutAxisDialog.analyze_selection(parameters) RotateAboutAxisDialog(parameters)
def default_parameters(cls): result = Parameters() result.center = numpy.zeros(3, float) result.normal = numpy.zeros(3, float) return result
def default_parameters(cls): result = Parameters() result.center = Translation.identity() result.rotation = Rotation.identity() return result