CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Mesh Generation & Pre-Processing Software > ANSA

How to rotate plane(360 degree) using ANSA scripting.

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By acurley31

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 6, 2017, 05:16
Default How to rotate plane(360 degree) using ANSA scripting.
  #1
New Member
 
Renuka
Join Date: Aug 2017
Posts: 15
Rep Power: 9
Renu123 is on a distinguished road
Hello,
I wants multiple slices of single model to get that I am thinking to rotate a plane. code:
import ansa
from ansa import base


def main():
# Create a Cutting Plane
pl1 = base.CreateEntity(ansa.constants.NASTRAN, "CUTTING PLANE",
('Clip', "NO", 'oX', 2000, 'oY', -500, 'oZ', 500,
'xX', 1, 'xY', 0, 'xZ', 0,
'zX', 0, 'zY', 0, 'zZ', 1))


# Create a Model Cut
md_cut = base.CreateEntity(ansa.constants.NASTRAN, "MODEL CUT")


# Put Cutting plane in Model Cut (ModelCutRemovePlane works the same way...)
base.ModelCutAddPlane(md_cut, pl1)


How I rotate above plane?(I am not sure if I rotate model also it will work)


Thank you
Renu123 is offline   Reply With Quote

Old   March 14, 2018, 19:26
Default
  #2
New Member
 
Join Date: Sep 2016
Posts: 9
Rep Power: 10
acurley31 is on a distinguished road
Try looking into the GeoRotate function in the scripting library. You should just have to pass the entity (python object) and the rotation definition (i.e. the rotation vector and the angle).

Alex
vangelis likes this.
acurley31 is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to find center of model using ANSA Scripting? Renu123 ANSA 5 October 2, 2017 07:14
Ansa Python Scripting Renu123 ANSA 1 September 16, 2017 13:45
Ansa Python Scripting Renu123 ANSA 2 August 29, 2017 04:46


All times are GMT -4. The time now is 16:54.