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

Method _getAxis

cadquery/occ_impl/solver.py:193–204  ·  view source on GitHub ↗
(self, arg: Shape)

Source from the content-addressed store, hash-verified

191 raise ValueError(f"Exception {e} occured in the parameter conversion")
192
193 def _getAxis(self, arg: Shape) -> gp_Dir:
194
195 if isinstance(arg, Face):
196 rv = arg.normalAt()
197 elif isinstance(arg, Edge) and arg.geomType() != "CIRCLE":
198 rv = arg.tangentAt()
199 elif isinstance(arg, Edge) and arg.geomType() == "CIRCLE":
200 rv = arg.normal()
201 else:
202 raise ValueError(f"Cannot construct Axis for {arg}")
203
204 return rv.toDir()
205
206 def _getPln(self, arg: Shape) -> gp_Pln:
207

Callers 1

toPODsMethod · 0.95

Calls 5

toDirMethod · 0.80
normalAtMethod · 0.45
geomTypeMethod · 0.45
tangentAtMethod · 0.45
normalMethod · 0.45

Tested by

no test coverage detected