MCPcopy
hub / github.com/CadQuery/cadquery / arcCenter

Method arcCenter

cadquery/occ_impl/shapes.py:2582–2597  ·  view source on GitHub ↗

Center of an underlying circle or ellipse geometry.

(self)

Source from the content-addressed store, hash-verified

2580 return rv
2581
2582 def arcCenter(self) -> Vector:
2583 """
2584 Center of an underlying circle or ellipse geometry.
2585 """
2586
2587 g = self.geomType()
2588 a = self._geomAdaptor()
2589
2590 if g == "CIRCLE":
2591 rv = Vector(a.Circle().Position().Location())
2592 elif g == "ELLIPSE":
2593 rv = Vector(a.Ellipse().Position().Location())
2594 else:
2595 raise ValueError(f"{g} has no arc center")
2596
2597 return rv
2598
2599 def trim(self, u0: Real, u1: Real) -> Edge:
2600 """

Callers 2

convert_and_validateFunction · 0.80
solveMethod · 0.80

Calls 3

_geomAdaptorMethod · 0.95
VectorClass · 0.85
geomTypeMethod · 0.45

Tested by

no test coverage detected