private void CalculatePointsPlane(OrientedBox orientedBox, DecorPaintStrokeSurface decorPaintSurface)
 {
     _pointsPlane = decorPaintSurface.Plane;
     if (AllShortcutCombos.Instance.PlaceGuideBehindSurfacePlane.IsActive())
     {
         _pointsPlane = _pointsPlane.AdjustSoBoxSitsBehind(orientedBox);
     }
     else
     {
         _pointsPlane = _pointsPlane.AdjustSoBoxSitsInFront(orientedBox);
     }
 }
        public void FromOrientedBoxAndDecorStrokeSurface(OrientedBox orientedBox, DecorPaintStrokeSurface decorPaintStrokeSurface)
        {
            if (!decorPaintStrokeSurface.IsValid)
            {
                return;
            }

            Vector3 surfacePlaneNormal = decorPaintStrokeSurface.Plane.normal;

            if (AllShortcutCombos.Instance.PlaceGuideBehindSurfacePlane.IsActive())
            {
                surfacePlaneNormal *= -1.0f;
            }

            BoxFace        boxFaceMostAlignedWithSurface            = orientedBox.GetBoxFaceWhichFacesNormal(surfacePlaneNormal);
            List <Vector3> cornerPointsOfFaceMostAlignedWithSurface = orientedBox.GetBoxFaceCornerPoints(boxFaceMostAlignedWithSurface);

            CalculatePointsPlane(orientedBox, decorPaintStrokeSurface);

            StoreObjectPivotPoints(_pointsPlane.ProjectAllPoints(cornerPointsOfFaceMostAlignedWithSurface));
            StoreUnprojectedPivotPoints(cornerPointsOfFaceMostAlignedWithSurface);
            CalculateArea();
        }