-
Notifications
You must be signed in to change notification settings - Fork 7
Feature/rotationmutator #67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd quite like to see a test with some hardcoded numbers in. It would be an easier way in to see what this thing is doing when you see a set of input numbers and a set of output numbers.
UAxes = Union[AAxes, Sequence[str], str] | ||
with Anno("Centre of rotation"): | ||
ACoR = Array[float] | ||
UCoR = Union[ACoR, list] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UCoR = Union[ACoR, list] | |
UCoR = Union[ACoR, Sequence[float]] |
# type: (UAxes, ARotationAngle, UCoR) -> None | ||
self.angle = ARotationAngle(angle) | ||
self.axes = AAxes(axes) | ||
self.centreOfRotation = ACoR(centreOfRotation) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to check that this is 2D as well
i_up = pos[i] | ||
j_low = pos[j] | ||
j_up = pos[j] | ||
if j in point.lower: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
j should always be in point.lower
|
||
float_error_tolerance = 1e-12 | ||
|
||
class RandomOffsetMutatorTest(ScanPointGeneratorTest): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
class RandomOffsetMutatorTest(ScanPointGeneratorTest): | |
class RotationMutatorTest(ScanPointGeneratorTest): |
Added rotation mutator, which takes a pair of axes which define a plane, a centre of rotation and a rotation amount and rotates the generated points about the specified point by the specified angle in this plane.