How can I get the centroid of a surface in Spaceclaim?
Erik Kostson
Member, Employee Posts: 233
✭✭✭✭
How can I get the centroid of a surface and show it in a dialogue box?
0
Best Answer
-
Below is a script that does that
import clr clr.AddReference('System.Windows.Forms') from System.Windows.Forms import Application, Button, Form, TextBox, Label, MessageBox selected_items = Selection.GetActive().Items for selected_item in selected_items: if isinstance(selected_item, DesignFace): sel_i = Selection.Create(selected_item) t=MeasureHelper.GetCentroid(sel_i) MessageBox.Show(str(t))
0