MLightCAD
    Preparing search index...
    • Constrains a point to the nearest polar and/or orthogonal tracking angle.

      Behavior summary:

      • Neither ORTHOMODE nor polar tracking (bit 2): returns point unchanged.
      • ORTHOMODE only: delegates to constrainToOrtho.
      • Polar tracking (and optionally ortho): keeps distance from reference, snaps direction to the nearest allowed display angle from POLARANG / POLARADDANG / orthogonal set, then maps back to WCS using ANGBASE and ANGDIR.

      Parameters

      • point: AcGeVector2dLike

        Current cursor position in WCS (typically after OSNAP).

      • reference: AcGeVector2dLike

        Tracking base point (last point or prompt base point).

      • Optionaldatabase: AcDbDatabase

        Optional database; defaults to the working database.

      Returns AcGeVector2dLike

      Constrained WCS point on the nearest tracking ray, or point when tracking does not apply or distance to reference is negligible.