|
[Sponsors] |
How to write the script to measure perimeter in Spaceclaim? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 2, 2022, 08:50 |
How to write the script to measure perimeter in Spaceclaim?
|
#1 |
New Member
Wu Yi-Lin
Join Date: Sep 2022
Posts: 2
Rep Power: 0 |
Hi, guys
I'm facing a difficulty: In Spaceclaim, I created 424 faces in Sketch Mode in STL file because I want to measure the cross-sectional area and the perimeter of each face. And I wanted to write a script to make it measure automatically. However, there was an error message which is " 'Body' object has no attribute 'Perimeter' " when I tried to run the code to measure perimeter. Here is my code below: selection=FaceSelection.FilterByVisible(FaceSelect ion.SelectAll()) perimeter =list (face.Shape.Perimeter for face in selection.Items) print(perimeter) Can someone help me? Thank you in advance, Joean. |
|
October 2, 2022, 18:31 |
|
#2 | |
New Member
Austin
Join Date: Sep 2020
Posts: 3
Rep Power: 6 |
Quote:
|
||
October 4, 2022, 04:02 |
|
#3 | |
New Member
Wu Yi-Lin
Join Date: Sep 2022
Posts: 2
Rep Power: 0 |
Quote:
Thank you for your reply. That's a good idea that selects each edge of each face, and I will try later. I've figured out another way to solve this problem. Here is the modified code: selection = FaceSelection.Create([GetRootPart().Bodies[0].Faces[0], GetRootPart().Bodies[1].Faces[0], GetRootPart().Bodies[2].Faces[0], GetRootPart().Bodies[3].Faces[0], ... GetRootPart().Bodies[423].Faces[0]]) perimeter =list(face.Shape.Perimeter for face in selection.Items) print(perimeter) Joean |
||
Tags |
script error, spaceclaim |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
mesh file for flow over a circular cylinder | Ardalan | Main CFD Forum | 7 | December 15, 2020 14:06 |
[Helyx OS] Helyx-OS (GUI for SnappyHexMesh | elvis | OpenFOAM Community Contributions | 210 | January 30, 2017 19:57 |
[DesignModeler] How to write the script in the ansys design modeler? | deddy1973 | ANSYS Meshing & Geometry | 3 | October 4, 2013 06:08 |
how I can write the file script to submite via HPC cluster at my UNI | happy | CFX | 2 | October 17, 2011 03:18 |
pmovlink script | Arnab | Siemens | 4 | August 1, 2004 23:50 |