Tagged: scripting, spaceclaim
March 9, 2021 at 12:30 pm
March 10, 2021 at 6:04 amSubashni RavichandranAnsys Employee
I'm not very clear with your query.
Do you wish to use scripting to align the bounding box of the component in a specific direction?
March 10, 2021 at 6:25 amGuillaume ANFOSSISubscriber
March 17, 2021 at 11:29 amSubashni RavichandranAnsys Employee
I found the below script and it may help you get the projected points using a bounding box.
for p in boundingBox.Corners:
# Create Box
result = BlockBody.Create(Point.Create(MM(-10), MM(-10), MM(0)), Point.Create(MM(10), MM(10), MM(20)), ExtrudeType.ForceAdd, Info1)
Please let me know if this helps. As I'm not very well versed with scripting I may need to consult the experts on this and get back to you.
March 17, 2021 at 1:33 pmGuillaume ANFOSSISubscriber
Thanks for this information, but it's not exactly what I'm looking for.
The goal is to get the maximum dimensions of a part that is not necessarily oriented correctly with respect to the world origin. (the creation of the box is not desired, just get the maximum dimensions)
With "boundingBox=body.Shape.GetBoundingBox(Matrix.Identity)" i get the bounding box oriented with respect to the world origin while I would like to orient this box with respect to a local origin (with as direction Z, the direction of the edge of maximum length🛈 This post originally contained file attachments which have been removed in compliance with the updated Ansys Learning Forum Terms & Conditions
March 18, 2021 at 10:42 amSubashni RavichandranAnsys Employee
Ok I understand now.
Let me check with my team if this can be done.
March 23, 2021 at 12:27 pm
- You must be logged in to reply to this topic.
Boost Ansys Fluent Simulations with AWS
Computational Fluid Dynamics (CFD) helps engineers design products in which the flow of fluid components is a significant challenge. These different use cases often require large complex models to solve on a traditional workstation. Click here to join this event to learn how to leverage Ansys Fluids on the cloud, thanks to Ansys Gateway powered by AWS.
Earth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.
© 2023 Copyright ANSYS, Inc. All rights reserved.