The workbench Geometry coordinate datas unit
The workbench Geometry length unit is mm. But when I use ironPython API to get geometry Centroid, the result unit seems m and the mesh node.X seems also m.
So how to get the Centroid length unit and MeshData units ?
analysis = Model.Analyses[0] face = analysis.GeoData.GeoEntityById(44) faceCenter = face.Centroid # The Centroid unit seems m, but the workbench geometry model is mm modelMesh = analysis.MeshData node = modelMesh.NodeById(1) node.X # The node coordinate unit seems m
I am confused by the ironPython API results.
So is there any description about the units or how to get these units ?
Best Answers
-
-
This way should be fine. You can also use DPF mesh operator to get a similar info.
There is lastly the results file unit system specified in either the solution or solution information object in Mechanical.0
Answers
-
Thinks, if I want to get the rstfile mesh length unit. How to get it?
I find a way but I am not sure it is right or not.analysis = Model.Analyses[0] reader = analysis.GetResultsData() rstMesh = reader.CreateMeshData() # the rstMesh don't have unit information, try to use local unit. Loc = reader.GetResult('LOC') Loc.SelectComponents(['X']) LocUnit = Loc.GetComponentInfo('X').Unit # get the rstMesh node Node = rstMesh.NodeById(NodeId) Node.X # get Node X coordinate
0 -
@Mike.Thompson
What's " the results file unit system specified in either the solution or solution information object in Mechanical" ?0 -
I forget which object it is, but one of them has a property listing the unit system of the results file.
0 -
@Mike.Thompson said:
I forget which object it is, but one of them has a property listing the unit system of the results file.@Mike.Thompson
I found two API in solution.solution.ResultFileUnitSystem #>>ConsistentNMM solution.SolutionUnitSystem #>>ConsistentNMM
mm, kg, N, C, s, mV, mA
(nmm)0