-
Notifications
You must be signed in to change notification settings - Fork 163
modeler move() method #746
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
Conversation
pyaedt/modeler/Modeler.py
Outdated
---------- | ||
objid : str, int, or Object3d | ||
Name or ID of the object. | ||
vector : float |
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.
vector : float | |
vector : list |
``True`` when successful, ``False`` when failed. | ||
""" | ||
selections = self.convert_to_selections(objid) | ||
Xvec, Yvec, Zvec = self.primitives._pos_with_arg(vector) |
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.
Xvec, Yvec, Zvec = self.primitives._pos_with_arg(vector) | |
x_vec, y_vec, z_vec = self.primitives._pos_with_arg(vector) |
vArg2.append("TranslateVectorX:="), vArg2.append(Xvec) | ||
vArg2.append("TranslateVectorY:="), vArg2.append(Yvec) | ||
vArg2.append("TranslateVectorZ:="), vArg2.append(Zvec) |
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.
vArg2.append("TranslateVectorX:="), vArg2.append(Xvec) | |
vArg2.append("TranslateVectorY:="), vArg2.append(Yvec) | |
vArg2.append("TranslateVectorZ:="), vArg2.append(Zvec) | |
vArg2.append("TranslateVectorX:="), vArg2.append(x_vec) | |
vArg2.append("TranslateVectorY:="), vArg2.append(y_vec) | |
vArg2.append("TranslateVectorZ:="), vArg2.append(z_vec) |
position : int or float | ||
List of the ``[x, y, z]`` coordinates or the |
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.
position : int or float | |
List of the ``[x, y, z]`` coordinates or the | |
position : list | |
List of int or float of the ``[x, y, z]`` coordinates or the |
@@ -1784,6 +1784,34 @@ def mirror(self, objid, position, vector): | |||
|
|||
return True | |||
|
|||
@aedt_exception_handler | |||
def move(self, objid, vector): |
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.
def move(self, objid, vector): | |
def move(self, object_id, vector): |
pyaedt/modeler/Modeler.py
Outdated
|
||
Parameters | ||
---------- | ||
objid : str, int, or Object3d |
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.
objid : str, int, or Object3d | |
object_id : str, int, or Object3d |
pyaedt/modeler/Modeler.py
Outdated
bool | ||
``True`` when successful, ``False`` when failed. | ||
""" | ||
selections = self.convert_to_selections(objid) |
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.
selections = self.convert_to_selections(objid) | |
selections = self.convert_to_selections(object_id) |
@ring630 I just proposed some minor modifications about the variable's names to try to follow the 'snake_case' convention. |
@MaxJPRey Thanks for the view. The method move was already there but it is called translate. I will copy the content from translate and add a deprecation warning in translate method. |
@ring630, |
No description provided.