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

Method _getLin

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

Source from the content-addressed store, hash-verified

232 return center.toPnt()
233
234 def _getLin(self, arg: Shape) -> gp_Lin:
235
236 if isinstance(arg, (Edge, Wire)):
237 center = arg.Center()
238 tangent = arg.tangentAt()
239 else:
240 raise ValueError(f"Cannot construct a plane for {arg}.")
241
242 return gp_Lin(center.toPnt(), tangent.toDir())
243
244 def toPODs(self) -> Tuple[Constraint, ...]:
245 """

Callers 1

toPODsMethod · 0.95

Calls 4

toPntMethod · 0.80
toDirMethod · 0.80
CenterMethod · 0.45
tangentAtMethod · 0.45

Tested by

no test coverage detected