Calculate the radius. Note that when applied to a Wire, the radius is simply the radius of the first edge. :return: radius :raises ValueError: if kernel can not reduce the shape to a circular edge
(self: Mixin1DProtocol)
| 2319 | return GCPnts_AbscissaPoint.Length_s(self._geomAdaptor()) |
| 2320 | |
| 2321 | def radius(self: Mixin1DProtocol) -> float: |
| 2322 | """ |
| 2323 | Calculate the radius. |
| 2324 | |
| 2325 | Note that when applied to a Wire, the radius is simply the radius of the first edge. |
| 2326 | |
| 2327 | :return: radius |
| 2328 | :raises ValueError: if kernel can not reduce the shape to a circular edge |
| 2329 | """ |
| 2330 | geom = self._geomAdaptor() |
| 2331 | try: |
| 2332 | circ = geom.Circle() |
| 2333 | except (Standard_NoSuchObject, Standard_Failure) as e: |
| 2334 | raise ValueError("Shape could not be reduced to a circle") from e |
| 2335 | return circ.Radius() |
| 2336 | |
| 2337 | def IsClosed(self: Mixin1DProtocol) -> bool: |
| 2338 |