MCPcopy Index your code
hub / github.com/CadQuery/cadquery / fixed_point_cost

Function fixed_point_cost

cadquery/occ_impl/solver.py:492–507  ·  view source on GitHub ↗
(
    problem,
    m1: gp_Pnt,
    T1_0,
    R1_0,
    T1,
    R1,
    val: Tuple[float, float, float],
    scale: float = 1,
)

Source from the content-addressed store, hash-verified

490
491
492def fixed_point_cost(
493 problem,
494 m1: gp_Pnt,
495 T1_0,
496 R1_0,
497 T1,
498 R1,
499 val: Tuple[float, float, float],
500 scale: float = 1,
501):
502
503 m1_dm = ca.DM((m1.X(), m1.Y(), m1.Z()))
504
505 dummy = (Transform(m1_dm, T1_0 + T1, R1_0 + R1) - ca.DM(val)) / scale
506
507 return ca.sumsqr(dummy)
508
509
510def fixed_axis_cost(

Callers

nothing calls this directly

Calls 1

TransformFunction · 0.85

Tested by

no test coverage detected