Compare commits
1 Commits
64b1e24467
...
e0468cd3c1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e0468cd3c1 |
@@ -538,6 +538,16 @@ def _build_constraint(
|
||||
|
||||
if kind == kcsolve.BaseJointKind.DistancePointPoint:
|
||||
distance = c_params[0] if c_params else 0.0
|
||||
if distance == 0.0:
|
||||
# Distance=0 is point coincidence. Use CoincidentConstraint
|
||||
# (3 linear residuals) instead of the squared form which has
|
||||
# a degenerate Jacobian when the constraint is satisfied.
|
||||
return CoincidentConstraint(
|
||||
body_i,
|
||||
marker_i_pos,
|
||||
body_j,
|
||||
marker_j_pos,
|
||||
)
|
||||
return DistancePointPointConstraint(
|
||||
body_i,
|
||||
marker_i_pos,
|
||||
|
||||
Reference in New Issue
Block a user