How to get cylinder surface radius

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: 347
    25 Answers 100 Comments Second Anniversary 25 Likes
    ✭✭✭✭
    Answer ✓

    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: 44
    10 Comments Name Dropper
    **
    edited January 9

    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 ?