|
[Sponsors] |
How to find center of model using ANSA Scripting? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 2, 2017, 06:05 |
How to find center of model using ANSA Scripting?
|
#1 |
New Member
Renuka
Join Date: Aug 2017
Posts: 15
Rep Power: 9 |
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 |
|
September 16, 2017, 16:37 |
Get COG of each ansa Part
|
#2 | |
New Member
Join Date: Sep 2017
Posts: 5
Rep Power: 9 |
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() |
||
September 16, 2017, 16:41 |
|
#3 | |
New Member
Renuka
Join Date: Aug 2017
Posts: 15
Rep Power: 9 |
Quote:
|
||
September 16, 2017, 16:46 |
Glad To Help
|
#4 |
New Member
Join Date: Sep 2017
Posts: 5
Rep Power: 9 |
I am interested in your "How to rotate plane 360 degree" post.
Post if any solution comes up.. |
|
September 16, 2017, 17:02 |
|
#5 | |
New Member
Renuka
Join Date: Aug 2017
Posts: 15
Rep Power: 9 |
Quote:
Here in for loop give angel value in range 1 to 360 |
||
October 2, 2017, 07:14 |
|
#6 |
New Member
Tam Nguyen
Join Date: Sep 2017
Posts: 4
Rep Power: 9 |
one third of the topics in this forum get no responses. mine, too
your topic will be useful to me some day |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
trying to find the center of pressure of stratosail | Jayakanth | FLUENT | 3 | January 2, 2015 07:37 |
about Subgrid-scale model | impecca | OpenFOAM Running, Solving & CFD | 4 | December 20, 2013 11:36 |
Water subcooled boiling | Attesz | CFX | 7 | January 5, 2013 04:32 |
Please help a newbie find the drag on a 3d model | David Amer | Main CFD Forum | 1 | March 6, 2002 04:33 |
I wish to find the proper model to validate the temperature field. | G.H.Lee | Main CFD Forum | 1 | May 6, 1999 03:05 |