fix: remove planar half-space correction for on-plane distance=0 constraints #38
@@ -283,11 +283,18 @@ def _planar_half_space(
|
||||
# Use the normal dot product as the primary indicator when the point
|
||||
# is already on the plane (distance ≈ 0).
|
||||
if abs(d_val) < 1e-10:
|
||||
# Point is on the plane — track normal direction instead
|
||||
# Point is on the plane — track normal direction only.
|
||||
# No correction: when combined with rotational joints (Cylindrical,
|
||||
# Revolute), the body's marker normal rotates legitimately and
|
||||
# reflecting through the plane would fight the rotation.
|
||||
def indicator(e: dict[str, float]) -> float:
|
||||
return dot_expr.eval(e)
|
||||
|
||||
ref_sign = normal_ref_sign
|
||||
return HalfSpace(
|
||||
constraint_index=constraint_idx,
|
||||
reference_sign=normal_ref_sign,
|
||||
indicator_fn=indicator,
|
||||
)
|
||||
else:
|
||||
# Point is off-plane — track which side
|
||||
def indicator(e: dict[str, float]) -> float:
|
||||
|
||||
Reference in New Issue
Block a user