Please login with a confirmed email address before reporting spam
     
    
 
                                                Posted:
                            
                                9 years ago                            
                            
                                18 mai 2016, 01:04 UTC−4                            
                        
                        
                                                    P.S
I read the API manual and only find the following code and limited explanation:
model.view(<vtag>).camera().set(<pname>, <pvalue>) sets the given camera property to the given value.
However, no more information is given for <pname> parameter. Which parameter should be given to configure the Zoom Angle, Position, Target,Up Vector, Center of Rotation, View Offset?
Any suggestion is appreciated.
Thanks,
Bob
                                                
                                                
                            P.S
I read the API manual and only find the following code and limited explanation:
model.view().camera().set(, ) sets the given camera property to the given value.
However, no more information is given for  parameter. Which parameter should be given to configure the Zoom Angle, Position, Target,Up Vector, Center of Rotation, View Offset?
Any suggestion is appreciated.
Thanks,
Bob
                        
                                                
                                                                                                            
                                             
                                            
                            
                                                                                        
                                Magnus Ringh
                                                                                                                                                    COMSOL Employee
                                                         
                            
                                                                                                                                                
                         
                                                
    
        Please login with a confirmed email address before reporting spam
     
    
 
                                                Posted:
                            
                                9 years ago                            
                            
                                18 mai 2016, 05:05 UTC−4                            
                        
                        
                                                    Hi,
The properties for controlling the camera are documented in the COMSOL Multiphysics Programming Reference Manual (such as 'target', 'position', and 'up' vectors), at least in later versions of COMSOL Multiphysics.
Another way of getting the properties and syntax is to make camera adjustments in the COMSOL Desktop and then save the model as a Model File for Java. That file will contain the camera API calls that correspond to the changes you made to the camera settings.
Best regards,
Magnus Ringh, COMSOL                                                
                                                
                            Hi,
The properties for controlling the camera are documented in the COMSOL Multiphysics Programming Reference Manual (such as 'target', 'position', and 'up' vectors), at least in later versions of COMSOL Multiphysics.
Another way of getting the properties and syntax is to make camera adjustments in the COMSOL Desktop and then save the model as a Model File for Java. That file will contain the camera API calls that correspond to the changes you made to the camera settings.
Best regards,
Magnus Ringh, COMSOL                        
                                                
                                                                                                            
                                             
                        
                        
                                                
    
        Please login with a confirmed email address before reporting spam
     
    
 
                                                Posted:
                            
                                9 years ago                            
                            
                                18 mai 2016, 09:38 UTC−4                            
                        
                        
                                                    Hi Magnus,
Thanks for your response and solution provided. But camera setting is not included in the exported java file. With the attributes you mentioned, I finally worked it out after adding more attributes (projection, orthoscale, zoomanglefull, rotationpoint and etc). 
However, I encounter another issue: I cannot export the images from the models that are not opened in the client side though they are already loaded in the server side. The following code won't work unless the model has been opened using the client:
model.result().export("img1").run();
(Dataset exportation has no such issue)
Any suggestions to get around this issue?
Thanks,
Bob                                                
                                                
                            Hi Magnus,
Thanks for your response and solution provided. But camera setting is not included in the exported java file. With the attributes you mentioned, I finally worked it out after adding more attributes (projection, orthoscale, zoomanglefull, rotationpoint and etc). 
However, I encounter another issue: I cannot export the images from the models that are not opened in the client side though they are already loaded in the server side. The following code won't work unless the model has been opened using the client:
model.result().export("img1").run();
(Dataset exportation has no such issue)
Any suggestions to get around this issue?
Thanks,
Bob