cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

CAD model import settings in Vuforia Studio (Up-vector Selection while importing the CAD Model)

Sandy_Gunner
13-Aquamarine

CAD model import settings in Vuforia Studio (Up-vector Selection while importing the CAD Model)

Hello Community Member,

We are having trouble because of having two different Up-Vector for the CAD system (Plus Z-axis) and Vuforia AR (Plus Y-axis). To adjust the imported model into Vuforia Studio we are rotating the imported model by -90 degree in X-axis. Sometime forgetting to do this result in the incorrect CAD model display in the AR experiences. To omit this kind of error, we want to propose a solution of selecting the Up-Vector while importing the CAD model inside the Vuforia Studio. If this functionality is implemented we can adjust the up vector of the CAD model inside the Vuforia studio irrespective of the Up vector of different CAD system. Please see the attachment herein for the reference.
Please feel free to share if you have similar trouble and how you are managing till now.

Thank you in advance.

4 REPLIES 4
AlexK
14-Alexandrite
(To:Sandy_Gunner)

Hi Sandy

 

When I rotate the model in Studio and use a button with a JS function to rotate the model in View, one axis is lost.

If anyone is interested I will make a recording of the bug.

 

Maybe your solution will solve this too?

 

Best wishes

 

Alex

Hi @Sandy_Gunner  and @AlexK ,

regarding to the original issue - possibly you can use as already mentioned by @AlexK   - a javascript to convert the setting - what you meant (your native cad system setting) (for top, front, right) when setting values of x-y and z respectively rx,ry,rz  to be changed /adapted to the   current setting according to the Thingview, so that you can then  have the desired appearance of the model .  So means the CAD axis values and rotations  need to be interchanged ( axis and direction /sign)  on such way  that  Vuforia Studio will interpret  the coordinates as intended . So far, I know this issue is not an specific only for the setting of Vuforia Studio/ view  but the behaviour  is coming /inherited  from the three.js.

@AlexK   according to the issue .... one axis is lost. What means that? Possibly if you could provide a simple example /project where I could reproduce it. So I could  check if this is a bug or another problem ... Thanks! BR

Hi @RolandRaytchev and @AlexK ,

@AlexK Rotation and translation of the model can be done with JavaScript after binding the imported model to the model widget only but our enhancement request is having the ability to set up the up-vector while importing.

@RolandRaytchev 

As of now, We are using Siemens NX CAD for the modelling application where the Up vector is Z-Vector. After exporting the CAD model and importing it into Vuforia Studio, we have to rotate by -90 rx direction for the realistic appearance (to have a model tracking experiences) and sometime forgetting to rotate it leads to inability of having model tracking experience in the work site . Moreover, most of the modelling software has z-axis as up vector and other AR software has the ability to select the Up-vector while importing. Rotating the model in modelling software before exporting is time consuming too. So, we recommend PTC to add this functionality of selecting up-vector while importing the CAD model into the Vuforia Studio.

 

Thank You

Hi @AlexK ,

I am not aware that there is such issue (what you mentioned with ...one axis was lost..)  if this issue is still reproducible then ,could you please report this issue here or better as PTC TechSupport case so we can try to reproduce it and respectively report this to R&D team for fix. (required is information how to reproduce the problem)

Hi @Sandy_Gunner ,

regarding to the issue  you reported- I reported it as enhancement request  to PTC R&D and PM team as Jira Ticket VTS-1913. As soon as I receive feedback from R&D team - I will provide this here to this post.

Regarding to the problem with the rotation:

- ok the simplest way will be when you have widget and rotated them via the properties - this most trivial case. 

- but when you do not have widget definition to copoments and still you want to rotate them and also when the rotation axis is not regarding to the standard coodinate system then this could more difficult and required some addtional tools or javascript

- because the rotation of model component is defined in the PVS file format which is a part of the Vuforia Studio model format pvz and contains the assembly/subassembly definition (position ,rotation etc) we culd use some PTC tools e.g. Creo View Toolkit. PVZ format is used by Creo View (PTC visualization tool) With Creo view toolkit we can perform some opertation on the PVZ file e.g. chaging the component postion in the PVS file. From the x,y,z,rx,ry,rz we need to caluclate the transformation matrx /euler so to perform the tranformation regarding some specific coordinate system (component coordinate system, root coord or subassembly coord system )  Such changes will bone then permamently in the pvz data.

- the option to change an angle in javascript is only temporary  possible - means it reamins only in the session after change is done  and on next retrieval of the model / project is not more persistent, so you need to perform the change again - example on Vuforia Studio modelLoad event you can start a js script which will read some data (e.g. json data) and perform the changes (rotation of set of components) after retrieval.

In the past we discuss in the communty some opttions how to change a position of component regarding any space point e.g. post this example in the past# to this post https://community.ptc.com/t5/Vuforia-Studio/Possibility-to-change-set-the-spincenter-csys-of-models-and/m-p/796282#M10843 Here the link to download the project which demonstrate such spacial transformation.

- an . more advance option e.g. could be to define the required  component  tranformaitons through a point (vector) , rotation axis vector and angle value (right hand rule). Example in a json:

[ 
{"component":"model-1/60/61","rotation_angle":88,"start_point":[1.0,1.0,0.0],"rot_axis":[0.0,0.0,1.0]},  
{"component":"model-1/60/70","rotation_angle":88,"start_point":[1.0,1.0,0.0],"rot_axis":[0.0,0.0,1.0]},  
...
{"component":"model-1/60/76","rotation_angle":88,"start_point":[1.0,1.0,0.0],"rot_axis":[0.0,0.0,1.0]} 
]

So that on modelLoad your js script could load the json defintions of the rotations /and then execute them so that model apperance will  changed then according your requirement. When this is an interessting option for you , possibly we can consider this in further posts. Thanks

 

 

Top Tags