How to get cylinder surface radius

Options

I can get the face by the following codes. But in the face, no radius property.

face_id = 35
face = self.analysis.GeoData.GeoEntityById(face_id)

So how to get the cylinder surface radius in ACT ?

Best Answer

  • Mike.Thompson
    Mike.Thompson Member, Employee Posts: 300
    First Anniversary First Comment 5 Likes Ansys Employee
    Answer ✓
    Options

    A direct Radius property on cylinders and circles was implemented in V23.2. Before this there is some undocumented ways.

Answers

  • 1990chs
    1990chs Member Posts: 43
    First Comment Name Dropper
    edited January 9
    Options

    It seems can be calculated by egde length

    import units
    faceR = units.ConvertUnit(face.Edges[0].Length /(2*math.pi), 'm','mm')
    

    But using this way, the calculated radius may be not precise due to float precision.
    So is there the direction API to get the cylinder surface radius ?