|
[Sponsors] |
How to find center of model using ANSA Scripting? |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
New Member
Renuka
Join Date: Aug 2017
Posts: 15
Rep Power: 8 ![]() |
Hello all,
I have .ansa files and wants to find center of each model. Could anyone tell me wether ANSA software has the function to find center of model that will return center(I want x,y,z coordinates values of center) of model,if does where can I find the function. If not any suggestion how I do that. Thank you ![]() |
|
![]() |
![]() |
![]() |
![]() |
#2 | |
New Member
Join Date: Sep 2017
Posts: 5
Rep Power: 8 ![]() |
Quote:
Code:
import ansa from ansa import * def main(): selected_files = utils.SelectOpenFileIn('/home/user/', 1) #for selecting multiple files for each_file in selected_files: ansa.base.Open(each_file) # for opening the file ansa_parts = ansa.base.CollectEntities(constants.NASTRAN, None, "ANSAPART", recursive=True, ) for each_part in ansa_parts: cog = ansa.base.GetEntityCardValues(constants.NASTRAN, each_part, ('COG x','COG y','COG z')) print(" COG is",[cog['COG x'],cog['COG y'],cog['COG z']]) main() |
||
![]() |
![]() |
![]() |
![]() |
#3 | |
New Member
Renuka
Join Date: Aug 2017
Posts: 15
Rep Power: 8 ![]() |
Quote:
|
||
![]() |
![]() |
![]() |
![]() |
#4 |
New Member
Join Date: Sep 2017
Posts: 5
Rep Power: 8 ![]() |
||
![]() |
![]() |
![]() |
![]() |
#5 | |
New Member
Renuka
Join Date: Aug 2017
Posts: 15
Rep Power: 8 ![]() |
Quote:
Here in for loop give angel value in range 1 to 360 |
||
![]() |
![]() |
![]() |
![]() |
#6 |
New Member
Tam Nguyen
Join Date: Sep 2017
Posts: 4
Rep Power: 7 ![]() |
one third of the topics in this forum get no responses. mine, too
![]() your topic will be useful to me some day ![]() |
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
trying to find the center of pressure of stratosail | Jayakanth | FLUENT | 3 | January 2, 2015 06:37 |
about Subgrid-scale model | impecca | OpenFOAM Running, Solving & CFD | 4 | December 20, 2013 10:36 |
Water subcooled boiling | Attesz | CFX | 7 | January 5, 2013 03:32 |
Please help a newbie find the drag on a 3d model | David Amer | Main CFD Forum | 1 | March 6, 2002 03:33 |
I wish to find the proper model to validate the temperature field. | G.H.Lee | Main CFD Forum | 1 | May 6, 1999 02:05 |