Hey there,
I want to rotate the link in such a manner the one end should move and other will remain fixed with respect to its co-ordinates but i am unable to achieve this.
Can anyone help me with this.
Solved! Go to Solution.
Hi @Ushin ,
as already described in the article you can not change the default axis (on the default coordinate system) in pvz file and models. This could be done only in the CAD system.
1.) So for example in Creo Parametric I could create an auxiliary sub assembly where I could insert my component/ part or subassembly and move his positon so that the desired axis is coincident with the default csys of the auxiliary subassembly. So far, I know this is the only way to move the rotation axis!
in this case we need to assembly the component /part or subassembly in the auxiliary subassembly :
And then move the component – the position of the desired rotation axis should be coincident with the sub assembly default coordinate system. Afterwords you can use as model the subassembly in studio. It should have now the desired rotaiton axis!
2.) if you have your model in pvz format - in this case we can NOT change it.
In this case we can use a mathematical relation / calculation instruction to rotate about the desired axis:
In this case to rotate the door component about the hinge axis we need some calculation like this below:
...
$scope.simple_door_slider_change = function (angle, door_length) {
var angle1=angle;
var l_door=door_length;
var angle1_rad=angle1*Math.PI/180.0;
$scope.view.wdg['modelItem-door-asm']['rx'] = angle1 ;
$scope.view.wdg['modelItem-door-asm']['y'] = 0.0 - l_door*Math.sin(angle1_rad);
$scope.view.wdg['modelItem-door-asm']['z'] = 0.0 - l_door*(1.0-Math.cos(angle1_rad));
$scope.app.params['door_angle']= angle1;
};
...
Here the particular mathematical instruction depends on the current geometry , but it will always consist of a combination of translation and rotation and could be done by relation which is similar to the code above.
Hi @Ushin ,
this is in generally possible but it depends on the structure of your assembly or the coordinate system of the particular component /s or part/s (if it is a part only) which should be rotated.
In the Topic/article "Mechanism Concept in Vuforia Studio- How to make rotation more easy" the background are described more deeply.
You can try to use the described techniques there but if you have difficulties to achieve the correct rotation you want you can provide an pvz file and a picture , how it should be rotated so, I could try to suggest what method could be used
Hey,
I saw the very same article that you linked in the reply but i wasn't able to change the default axis.
So can you help me with it.
Can you lemme know the proper steps to do the same.
Hi @Ushin ,
as already described in the article you can not change the default axis (on the default coordinate system) in pvz file and models. This could be done only in the CAD system.
1.) So for example in Creo Parametric I could create an auxiliary sub assembly where I could insert my component/ part or subassembly and move his positon so that the desired axis is coincident with the default csys of the auxiliary subassembly. So far, I know this is the only way to move the rotation axis!
in this case we need to assembly the component /part or subassembly in the auxiliary subassembly :
And then move the component – the position of the desired rotation axis should be coincident with the sub assembly default coordinate system. Afterwords you can use as model the subassembly in studio. It should have now the desired rotaiton axis!
2.) if you have your model in pvz format - in this case we can NOT change it.
In this case we can use a mathematical relation / calculation instruction to rotate about the desired axis:
In this case to rotate the door component about the hinge axis we need some calculation like this below:
...
$scope.simple_door_slider_change = function (angle, door_length) {
var angle1=angle;
var l_door=door_length;
var angle1_rad=angle1*Math.PI/180.0;
$scope.view.wdg['modelItem-door-asm']['rx'] = angle1 ;
$scope.view.wdg['modelItem-door-asm']['y'] = 0.0 - l_door*Math.sin(angle1_rad);
$scope.view.wdg['modelItem-door-asm']['z'] = 0.0 - l_door*(1.0-Math.cos(angle1_rad));
$scope.app.params['door_angle']= angle1;
};
...
Here the particular mathematical instruction depends on the current geometry , but it will always consist of a combination of translation and rotation and could be done by relation which is similar to the code above.