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(); }