Function
fixed_axis_cost
(
problem,
m1: gp_Dir,
T1_0,
R1_0,
T1,
R1,
val: Tuple[float, float, float],
scale: float = 1,
)
Source from the content-addressed store, hash-verified
| 508 | |
| 509 | |
| 510 | def fixed_axis_cost( |
| 511 | problem, |
| 512 | m1: gp_Dir, |
| 513 | T1_0, |
| 514 | R1_0, |
| 515 | T1, |
| 516 | R1, |
| 517 | val: Tuple[float, float, float], |
| 518 | scale: float = 1, |
| 519 | ): |
| 520 | |
| 521 | m1_dm = ca.DM((m1.X(), m1.Y(), m1.Z())) |
| 522 | m_val = ca.DM(val) / ca.norm_2(ca.DM(val)) |
| 523 | |
| 524 | dummy = Rotate(m1_dm, R1_0 + R1) - m_val |
| 525 | |
| 526 | return ca.sumsqr(dummy) |
| 527 | |
| 528 | |
| 529 | def fixed_rotation_cost( |
Callers
nothing calls this directly
Tested by
no test coverage detected