How the new move/rotate should behave #438
Replies: 5 comments 4 replies
-
I will just present the way I see it for now for the old method signature:def move(self, displacement, start=-1, increment=False): -> self new method signature:def move(self, displacement, start=None, repeats=None): -> self
Regarding absolute positioning of a single index I don't really see the use of the src.position[i] = [x,y,z] @OrtnerMichael What do you think |
Beta Was this translation helpful? Give feedback.
-
I think we need very clean clear pure short self-consistent statements what the kwargs do. I propose something like: Start Statement Repeat Statement: Absolute Statement The This repeat statement is in contradiction to 1d.
We should get But what happens we we do
Do we get Is the 1d behavior necessary ? It could be achieved with THIS POST IS STILL WIP |
Beta Was this translation helpful? Give feedback.
-
Lets go through with examples and fill them with what should be expected and always start with: still WIP of course
import magpylib as magpy
s = magpy.Sensor(position=[(0,0,0),(0,0,1),(0,0,2)])
s.move((0,0,10), start=None, repeat=None)
print(s.position)
# [(0,0,10),(0,0,11),(0,0,12)]
import magpylib as magpy
s = magpy.Sensor(position=[(0,0,0),(0,0,1),(0,0,2)])
s.move((0,0,10), start=1, repeat=None)
print(s.position)
# [(0,0,0),(0,0,11),(0,0,12)]
import magpylib as magpy
s = magpy.Sensor(position=[(0,0,0),(0,0,1),(0,0,2)])
s.move((0,0,10), start=None, repeat=2)
print(s.position)
# [(0,0,0),(0,0,1),(0,0,2),(0,0,12),(0,0,22)]
import magpylib as magpy
s = magpy.Sensor(position=[(0,0,0),(0,0,1),(0,0,2)])
s.move((0,0,10), start=1, repeat=2)
print(s.position)
# [(0,0,0),(0,0,11),(0,0,22)]
import magpylib as magpy
s = magpy.Sensor(position=[(0,0,0),(0,0,1),(0,0,2)])
s.move([(0,0,10),(0,0,100)], start=None, repeat=None)
print(s.position)
# [(0,0,0),(0,0,1),(0,0,2),(0,0,12),(0,0,102)]
import magpylib as magpy
s = magpy.Sensor(position=[(0,0,0),(0,0,1),(0,0,2)])
s.move([(0,0,10),(0,0,100)], start=1, repeat=None)
print(s.position)
# [(0,0,0),(0,0,11),(0,0,102)]
import magpylib as magpy
s = magpy.Sensor(position=[(0,0,0),(0,0,1),(0,0,2)])
s.move([(0,0,10),(0,0,100)], start=None, repeat=2)
print(s.position)
# [(0,0,0),(0,0,1),(0,0,2),(0,0,12),(0,0,102),(0,0,12),(0,0,102)]
import magpylib as magpy
s = magpy.Sensor(position=[(0,0,0),(0,0,1),(0,0,2)])
s.move([(0,0,10),(0,0,100)], start=1, repeat=2)
print(s.position)
# [(0,0,0),(0,0,11),(0,0,102),(0,0,12),(0,0,102)] |
Beta Was this translation helpful? Give feedback.
-
Revised proposalInput Statement Start Statement Absolute Statement Case 1.1
Usefulness: 3/3
Case 1.2
Usefulness 2/3
Case 1.3
Usefulness: 0/3 Case 1.4
Usefulness 1/3
Case 1.5
Usefulness: 3/3
Case 1.6
Usefulness 1/3
Case 1.7
Usefulness: 0/3 (same as case 1.3) Case 1.8
Usefulness 1/3
Case 2.1
Usefulness: 3/3
Case 2.2
Usefulness 3/3
Case 2.3
Usefulness: 1/3
Case 2.4
Usefulness 3/3
Case 2.5
Usefulness: 3/3
Case 2.6
Usefulness 3/3 (same as case 2.5)
Case 2.7
Usefulness: 2/3
Case 2.8
Usefulness 3/3
what do you think @Alexboiboi ? |
Beta Was this translation helpful? Give feedback.
-
Conclusion 1: Take
This all goes to issue XXX |
Beta Was this translation helpful? Give feedback.
-
Goals
#433
WIP
Beta Was this translation helpful? Give feedback.
All reactions