Bladeren bron

Update UBL mesh boundaries to accomidate beds centered at 0, 0 (#8012)

Thomas Moore 7 jaren geleden
bovenliggende
commit
67cc29cd3c
31 gewijzigde bestanden met toevoegingen van 1860 en 248 verwijderingen
  1. 60
    8
      Marlin/Configuration_adv.h
  2. 60
    8
      Marlin/src/config/default/Configuration_adv.h
  3. 60
    8
      Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h
  4. 60
    8
      Marlin/src/config/examples/Anet/A6/Configuration_adv.h
  5. 60
    8
      Marlin/src/config/examples/Anet/A8/Configuration_adv.h
  6. 60
    8
      Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h
  7. 60
    8
      Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h
  8. 60
    8
      Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h
  9. 60
    8
      Marlin/src/config/examples/Cartesio/Configuration_adv.h
  10. 60
    8
      Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h
  11. 60
    8
      Marlin/src/config/examples/Felix/Configuration_adv.h
  12. 60
    8
      Marlin/src/config/examples/Folger Tech/i3-2020/Configuration_adv.h
  13. 60
    8
      Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h
  14. 60
    8
      Marlin/src/config/examples/Malyan/M150/Configuration_adv.h
  15. 60
    8
      Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h
  16. 60
    8
      Marlin/src/config/examples/RigidBot/Configuration_adv.h
  17. 60
    8
      Marlin/src/config/examples/SCARA/Configuration_adv.h
  18. 60
    8
      Marlin/src/config/examples/Sanguinololu/Configuration_adv.h
  19. 60
    8
      Marlin/src/config/examples/TinyBoy2/Configuration_adv.h
  20. 60
    8
      Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h
  21. 60
    8
      Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h
  22. 60
    8
      Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h
  23. 60
    8
      Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h
  24. 60
    8
      Marlin/src/config/examples/delta/generic/Configuration_adv.h
  25. 60
    8
      Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h
  26. 60
    8
      Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h
  27. 60
    8
      Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h
  28. 60
    8
      Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h
  29. 60
    8
      Marlin/src/config/examples/makibox/Configuration_adv.h
  30. 60
    8
      Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h
  31. 60
    8
      Marlin/src/config/examples/wt150/Configuration_adv.h

+ 60
- 8
Marlin/Configuration_adv.h Bestand weergeven

@@ -674,19 +674,71 @@
674 674
 
675 675
 // @section leveling
676 676
 
677
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
678
+  #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
679
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
680
+  #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
681
+#endif
682
+
677 683
 // Default mesh area is an area with an inset margin on the print area.
678 684
 // Below are the macros that are used to define the borders for the mesh area,
679 685
 // made available here for specialized needs, ie dual extruder setup.
680 686
 #if ENABLED(MESH_BED_LEVELING)
681
-  #define MESH_MIN_X MESH_INSET
682
-  #define MESH_MAX_X (X_BED_SIZE - (MESH_INSET))
683
-  #define MESH_MIN_Y MESH_INSET
684
-  #define MESH_MAX_Y (Y_BED_SIZE - (MESH_INSET))
687
+  #if ENABLED(DELTA)
688
+    // Probing points may be verified at compile time within the radius
689
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
690
+    // so that may be added to SanityCheck.h in the future.
691
+    #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
692
+    #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
693
+    #define MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
694
+    #define MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
695
+  #elif IS_SCARA
696
+    #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
697
+    #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
698
+    #define MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
699
+    #define MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
700
+  #else
701
+    // Boundaries for Cartesian probing based on set limits
702
+    #if ENABLED(BED_CENTER_AT_0_0)
703
+      #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2)
704
+      #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2)
705
+      #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
706
+      #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
707
+    #else
708
+      #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0))
709
+      #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0))
710
+      #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE))
711
+      #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE))
712
+    #endif
713
+  #endif
685 714
 #elif ENABLED(AUTO_BED_LEVELING_UBL)
686
-  #define UBL_MESH_MIN_X UBL_MESH_INSET
687
-  #define UBL_MESH_MAX_X (X_BED_SIZE - (UBL_MESH_INSET))
688
-  #define UBL_MESH_MIN_Y UBL_MESH_INSET
689
-  #define UBL_MESH_MAX_Y (Y_BED_SIZE - (UBL_MESH_INSET))
715
+  #if ENABLED(DELTA)
716
+    // Probing points may be verified at compile time within the radius
717
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
718
+    // so that may be added to SanityCheck.h in the future.
719
+    #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
720
+    #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
721
+    #define UBL_MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
722
+    #define UBL_MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
723
+  #elif IS_SCARA
724
+    #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
725
+    #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
726
+    #define UBL_MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
727
+    #define UBL_MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
728
+  #else
729
+    // Boundaries for Cartesian probing based on set limits
730
+    #if ENABLED(BED_CENTER_AT_0_0)
731
+      #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2)
732
+      #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2)
733
+      #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
734
+      #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
735
+    #else
736
+      #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0))
737
+      #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0))
738
+      #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE))
739
+      #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE))
740
+    #endif
741
+  #endif
690 742
 
691 743
   // If this is defined, the currently active mesh will be saved in the
692 744
   // current slot on M500.

+ 60
- 8
Marlin/src/config/default/Configuration_adv.h Bestand weergeven

@@ -674,19 +674,71 @@
674 674
 
675 675
 // @section leveling
676 676
 
677
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
678
+  #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
679
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
680
+  #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
681
+#endif
682
+
677 683
 // Default mesh area is an area with an inset margin on the print area.
678 684
 // Below are the macros that are used to define the borders for the mesh area,
679 685
 // made available here for specialized needs, ie dual extruder setup.
680 686
 #if ENABLED(MESH_BED_LEVELING)
681
-  #define MESH_MIN_X MESH_INSET
682
-  #define MESH_MAX_X (X_BED_SIZE - (MESH_INSET))
683
-  #define MESH_MIN_Y MESH_INSET
684
-  #define MESH_MAX_Y (Y_BED_SIZE - (MESH_INSET))
687
+  #if ENABLED(DELTA)
688
+    // Probing points may be verified at compile time within the radius
689
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
690
+    // so that may be added to SanityCheck.h in the future.
691
+    #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
692
+    #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
693
+    #define MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
694
+    #define MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
695
+  #elif IS_SCARA
696
+    #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
697
+    #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
698
+    #define MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
699
+    #define MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
700
+  #else
701
+    // Boundaries for Cartesian probing based on set limits
702
+    #if ENABLED(BED_CENTER_AT_0_0)
703
+      #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2)
704
+      #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2)
705
+      #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
706
+      #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
707
+    #else
708
+      #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0))
709
+      #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0))
710
+      #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE))
711
+      #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE))
712
+    #endif
713
+  #endif
685 714
 #elif ENABLED(AUTO_BED_LEVELING_UBL)
686
-  #define UBL_MESH_MIN_X UBL_MESH_INSET
687
-  #define UBL_MESH_MAX_X (X_BED_SIZE - (UBL_MESH_INSET))
688
-  #define UBL_MESH_MIN_Y UBL_MESH_INSET
689
-  #define UBL_MESH_MAX_Y (Y_BED_SIZE - (UBL_MESH_INSET))
715
+  #if ENABLED(DELTA)
716
+    // Probing points may be verified at compile time within the radius
717
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
718
+    // so that may be added to SanityCheck.h in the future.
719
+    #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
720
+    #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
721
+    #define UBL_MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
722
+    #define UBL_MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
723
+  #elif IS_SCARA
724
+    #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
725
+    #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
726
+    #define UBL_MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
727
+    #define UBL_MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
728
+  #else
729
+    // Boundaries for Cartesian probing based on set limits
730
+    #if ENABLED(BED_CENTER_AT_0_0)
731
+      #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2)
732
+      #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2)
733
+      #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
734
+      #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
735
+    #else
736
+      #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0))
737
+      #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0))
738
+      #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE))
739
+      #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE))
740
+    #endif
741
+  #endif
690 742
 
691 743
   // If this is defined, the currently active mesh will be saved in the
692 744
   // current slot on M500.

+ 60
- 8
Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h Bestand weergeven

@@ -673,19 +673,71 @@
673 673
 
674 674
 // @section leveling
675 675
 
676
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
677
+  #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
678
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
679
+  #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
680
+#endif
681
+
676 682
 // Default mesh area is an area with an inset margin on the print area.
677 683
 // Below are the macros that are used to define the borders for the mesh area,
678 684
 // made available here for specialized needs, ie dual extruder setup.
679 685
 #if ENABLED(MESH_BED_LEVELING)
680
-  #define MESH_MIN_X MESH_INSET
681
-  #define MESH_MAX_X (X_BED_SIZE - (MESH_INSET))
682
-  #define MESH_MIN_Y MESH_INSET
683
-  #define MESH_MAX_Y (Y_BED_SIZE - (MESH_INSET))
686
+  #if ENABLED(DELTA)
687
+    // Probing points may be verified at compile time within the radius
688
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
689
+    // so that may be added to SanityCheck.h in the future.
690
+    #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
691
+    #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
692
+    #define MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
693
+    #define MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
694
+  #elif IS_SCARA
695
+    #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
696
+    #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
697
+    #define MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
698
+    #define MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
699
+  #else
700
+    // Boundaries for Cartesian probing based on set limits
701
+    #if ENABLED(BED_CENTER_AT_0_0)
702
+      #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2)
703
+      #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2)
704
+      #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
705
+      #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
706
+    #else
707
+      #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0))
708
+      #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0))
709
+      #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE))
710
+      #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE))
711
+    #endif
712
+  #endif
684 713
 #elif ENABLED(AUTO_BED_LEVELING_UBL)
685
-  #define UBL_MESH_MIN_X UBL_MESH_INSET
686
-  #define UBL_MESH_MAX_X (X_BED_SIZE - (UBL_MESH_INSET))
687
-  #define UBL_MESH_MIN_Y UBL_MESH_INSET
688
-  #define UBL_MESH_MAX_Y (Y_BED_SIZE - (UBL_MESH_INSET))
714
+  #if ENABLED(DELTA)
715
+    // Probing points may be verified at compile time within the radius
716
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
717
+    // so that may be added to SanityCheck.h in the future.
718
+    #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
719
+    #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
720
+    #define UBL_MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
721
+    #define UBL_MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
722
+  #elif IS_SCARA
723
+    #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
724
+    #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
725
+    #define UBL_MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
726
+    #define UBL_MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
727
+  #else
728
+    // Boundaries for Cartesian probing based on set limits
729
+    #if ENABLED(BED_CENTER_AT_0_0)
730
+      #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2)
731
+      #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2)
732
+      #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
733
+      #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
734
+    #else
735
+      #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0))
736
+      #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0))
737
+      #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE))
738
+      #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE))
739
+    #endif
740
+  #endif
689 741
 
690 742
   // If this is defined, the currently active mesh will be saved in the
691 743
   // current slot on M500.

+ 60
- 8
Marlin/src/config/examples/Anet/A6/Configuration_adv.h Bestand weergeven

@@ -673,19 +673,71 @@
673 673
 
674 674
 // @section leveling
675 675
 
676
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
677
+  #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
678
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
679
+  #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
680
+#endif
681
+
676 682
 // Default mesh area is an area with an inset margin on the print area.
677 683
 // Below are the macros that are used to define the borders for the mesh area,
678 684
 // made available here for specialized needs, ie dual extruder setup.
679 685
 #if ENABLED(MESH_BED_LEVELING)
680
-  #define MESH_MIN_X MESH_INSET
681
-  #define MESH_MAX_X (X_BED_SIZE - (MESH_INSET))
682
-  #define MESH_MIN_Y MESH_INSET
683
-  #define MESH_MAX_Y (Y_BED_SIZE - (MESH_INSET))
686
+  #if ENABLED(DELTA)
687
+    // Probing points may be verified at compile time within the radius
688
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
689
+    // so that may be added to SanityCheck.h in the future.
690
+    #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
691
+    #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
692
+    #define MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
693
+    #define MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
694
+  #elif IS_SCARA
695
+    #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
696
+    #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
697
+    #define MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
698
+    #define MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
699
+  #else
700
+    // Boundaries for Cartesian probing based on set limits
701
+    #if ENABLED(BED_CENTER_AT_0_0)
702
+      #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2)
703
+      #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2)
704
+      #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
705
+      #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
706
+    #else
707
+      #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0))
708
+      #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0))
709
+      #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE))
710
+      #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE))
711
+    #endif
712
+  #endif
684 713
 #elif ENABLED(AUTO_BED_LEVELING_UBL)
685
-  #define UBL_MESH_MIN_X UBL_MESH_INSET
686
-  #define UBL_MESH_MAX_X (X_BED_SIZE - (UBL_MESH_INSET))
687
-  #define UBL_MESH_MIN_Y UBL_MESH_INSET
688
-  #define UBL_MESH_MAX_Y (Y_BED_SIZE - (UBL_MESH_INSET))
714
+  #if ENABLED(DELTA)
715
+    // Probing points may be verified at compile time within the radius
716
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
717
+    // so that may be added to SanityCheck.h in the future.
718
+    #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
719
+    #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
720
+    #define UBL_MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
721
+    #define UBL_MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
722
+  #elif IS_SCARA
723
+    #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
724
+    #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
725
+    #define UBL_MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
726
+    #define UBL_MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
727
+  #else
728
+    // Boundaries for Cartesian probing based on set limits
729
+    #if ENABLED(BED_CENTER_AT_0_0)
730
+      #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2)
731
+      #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2)
732
+      #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
733
+      #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
734
+    #else
735
+      #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0))
736
+      #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0))
737
+      #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE))
738
+      #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE))
739
+    #endif
740
+  #endif
689 741
 
690 742
   // If this is defined, the currently active mesh will be saved in the
691 743
   // current slot on M500.

+ 60
- 8
Marlin/src/config/examples/Anet/A8/Configuration_adv.h Bestand weergeven

@@ -673,19 +673,71 @@
673 673
 
674 674
 // @section leveling
675 675
 
676
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
677
+  #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
678
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
679
+  #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
680
+#endif
681
+
676 682
 // Default mesh area is an area with an inset margin on the print area.
677 683
 // Below are the macros that are used to define the borders for the mesh area,
678 684
 // made available here for specialized needs, ie dual extruder setup.
679 685
 #if ENABLED(MESH_BED_LEVELING)
680
-  #define MESH_MIN_X MESH_INSET
681
-  #define MESH_MAX_X (X_BED_SIZE - (MESH_INSET))
682
-  #define MESH_MIN_Y MESH_INSET
683
-  #define MESH_MAX_Y (Y_BED_SIZE - (MESH_INSET))
686
+  #if ENABLED(DELTA)
687
+    // Probing points may be verified at compile time within the radius
688
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
689
+    // so that may be added to SanityCheck.h in the future.
690
+    #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
691
+    #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
692
+    #define MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
693
+    #define MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
694
+  #elif IS_SCARA
695
+    #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
696
+    #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
697
+    #define MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
698
+    #define MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
699
+  #else
700
+    // Boundaries for Cartesian probing based on set limits
701
+    #if ENABLED(BED_CENTER_AT_0_0)
702
+      #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2)
703
+      #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2)
704
+      #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
705
+      #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
706
+    #else
707
+      #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0))
708
+      #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0))
709
+      #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE))
710
+      #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE))
711
+    #endif
712
+  #endif
684 713
 #elif ENABLED(AUTO_BED_LEVELING_UBL)
685
-  #define UBL_MESH_MIN_X UBL_MESH_INSET
686
-  #define UBL_MESH_MAX_X (X_BED_SIZE - (UBL_MESH_INSET))
687
-  #define UBL_MESH_MIN_Y UBL_MESH_INSET
688
-  #define UBL_MESH_MAX_Y (Y_BED_SIZE - (UBL_MESH_INSET))
714
+  #if ENABLED(DELTA)
715
+    // Probing points may be verified at compile time within the radius
716
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
717
+    // so that may be added to SanityCheck.h in the future.
718
+    #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
719
+    #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
720
+    #define UBL_MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
721
+    #define UBL_MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
722
+  #elif IS_SCARA
723
+    #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
724
+    #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
725
+    #define UBL_MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
726
+    #define UBL_MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
727
+  #else
728
+    // Boundaries for Cartesian probing based on set limits
729
+    #if ENABLED(BED_CENTER_AT_0_0)
730
+      #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2)
731
+      #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2)
732
+      #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
733
+      #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
734
+    #else
735
+      #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0))
736
+      #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0))
737
+      #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE))
738
+      #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE))
739
+    #endif
740
+  #endif
689 741
 
690 742
   // If this is defined, the currently active mesh will be saved in the
691 743
   // current slot on M500.

+ 60
- 8
Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h Bestand weergeven

@@ -673,19 +673,71 @@
673 673
 
674 674
 // @section leveling
675 675
 
676
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
677
+  #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
678
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
679
+  #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
680
+#endif
681
+
676 682
 // Default mesh area is an area with an inset margin on the print area.
677 683
 // Below are the macros that are used to define the borders for the mesh area,
678 684
 // made available here for specialized needs, ie dual extruder setup.
679 685
 #if ENABLED(MESH_BED_LEVELING)
680
-  #define MESH_MIN_X MESH_INSET
681
-  #define MESH_MAX_X (X_BED_SIZE - (MESH_INSET))
682
-  #define MESH_MIN_Y MESH_INSET
683
-  #define MESH_MAX_Y (Y_BED_SIZE - (MESH_INSET))
686
+  #if ENABLED(DELTA)
687
+    // Probing points may be verified at compile time within the radius
688
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
689
+    // so that may be added to SanityCheck.h in the future.
690
+    #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
691
+    #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
692
+    #define MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
693
+    #define MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
694
+  #elif IS_SCARA
695
+    #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
696
+    #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
697
+    #define MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
698
+    #define MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
699
+  #else
700
+    // Boundaries for Cartesian probing based on set limits
701
+    #if ENABLED(BED_CENTER_AT_0_0)
702
+      #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2)
703
+      #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2)
704
+      #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
705
+      #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
706
+    #else
707
+      #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0))
708
+      #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0))
709
+      #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE))
710
+      #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE))
711
+    #endif
712
+  #endif
684 713
 #elif ENABLED(AUTO_BED_LEVELING_UBL)
685
-  #define UBL_MESH_MIN_X UBL_MESH_INSET
686
-  #define UBL_MESH_MAX_X (X_BED_SIZE - (UBL_MESH_INSET))
687
-  #define UBL_MESH_MIN_Y UBL_MESH_INSET
688
-  #define UBL_MESH_MAX_Y (Y_BED_SIZE - (UBL_MESH_INSET))
714
+  #if ENABLED(DELTA)
715
+    // Probing points may be verified at compile time within the radius
716
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
717
+    // so that may be added to SanityCheck.h in the future.
718
+    #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
719
+    #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
720
+    #define UBL_MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
721
+    #define UBL_MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
722
+  #elif IS_SCARA
723
+    #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
724
+    #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
725
+    #define UBL_MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
726
+    #define UBL_MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
727
+  #else
728
+    // Boundaries for Cartesian probing based on set limits
729
+    #if ENABLED(BED_CENTER_AT_0_0)
730
+      #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2)
731
+      #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2)
732
+      #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
733
+      #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
734
+    #else
735
+      #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0))
736
+      #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0))
737
+      #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE))
738
+      #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE))
739
+    #endif
740
+  #endif
689 741
 
690 742
   // If this is defined, the currently active mesh will be saved in the
691 743
   // current slot on M500.

+ 60
- 8
Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h Bestand weergeven

@@ -670,19 +670,71 @@
670 670
 
671 671
 // @section leveling
672 672
 
673
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
674
+  #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
675
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
676
+  #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
677
+#endif
678
+
673 679
 // Default mesh area is an area with an inset margin on the print area.
674 680
 // Below are the macros that are used to define the borders for the mesh area,
675 681
 // made available here for specialized needs, ie dual extruder setup.
676 682
 #if ENABLED(MESH_BED_LEVELING)
677
-  #define MESH_MIN_X MESH_INSET
678
-  #define MESH_MAX_X (X_BED_SIZE - (MESH_INSET))
679
-  #define MESH_MIN_Y MESH_INSET
680
-  #define MESH_MAX_Y (Y_BED_SIZE - (MESH_INSET))
683
+  #if ENABLED(DELTA)
684
+    // Probing points may be verified at compile time within the radius
685
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
686
+    // so that may be added to SanityCheck.h in the future.
687
+    #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
688
+    #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
689
+    #define MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
690
+    #define MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
691
+  #elif IS_SCARA
692
+    #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
693
+    #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
694
+    #define MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
695
+    #define MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
696
+  #else
697
+    // Boundaries for Cartesian probing based on set limits
698
+    #if ENABLED(BED_CENTER_AT_0_0)
699
+      #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2)
700
+      #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2)
701
+      #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
702
+      #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
703
+    #else
704
+      #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0))
705
+      #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0))
706
+      #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE))
707
+      #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE))
708
+    #endif
709
+  #endif
681 710
 #elif ENABLED(AUTO_BED_LEVELING_UBL)
682
-  #define UBL_MESH_MIN_X UBL_MESH_INSET
683
-  #define UBL_MESH_MAX_X (X_BED_SIZE - (UBL_MESH_INSET))
684
-  #define UBL_MESH_MIN_Y UBL_MESH_INSET
685
-  #define UBL_MESH_MAX_Y (Y_BED_SIZE - (UBL_MESH_INSET))
711
+  #if ENABLED(DELTA)
712
+    // Probing points may be verified at compile time within the radius
713
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
714
+    // so that may be added to SanityCheck.h in the future.
715
+    #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
716
+    #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
717
+    #define UBL_MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
718
+    #define UBL_MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
719
+  #elif IS_SCARA
720
+    #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
721
+    #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
722
+    #define UBL_MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
723
+    #define UBL_MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
724
+  #else
725
+    // Boundaries for Cartesian probing based on set limits
726
+    #if ENABLED(BED_CENTER_AT_0_0)
727
+      #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2)
728
+      #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2)
729
+      #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
730
+      #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
731
+    #else
732
+      #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0))
733
+      #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0))
734
+      #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE))
735
+      #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE))
736
+    #endif
737
+  #endif
686 738
 
687 739
   // If this is defined, the currently active mesh will be saved in the
688 740
   // current slot on M500.

+ 60
- 8
Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h Bestand weergeven

@@ -673,19 +673,71 @@
673 673
 
674 674
 // @section leveling
675 675
 
676
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
677
+  #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
678
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
679
+  #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
680
+#endif
681
+
676 682
 // Default mesh area is an area with an inset margin on the print area.
677 683
 // Below are the macros that are used to define the borders for the mesh area,
678 684
 // made available here for specialized needs, ie dual extruder setup.
679 685
 #if ENABLED(MESH_BED_LEVELING)
680
-  #define MESH_MIN_X MESH_INSET
681
-  #define MESH_MAX_X (X_BED_SIZE - (MESH_INSET))
682
-  #define MESH_MIN_Y MESH_INSET
683
-  #define MESH_MAX_Y (Y_BED_SIZE - (MESH_INSET))
686
+  #if ENABLED(DELTA)
687
+    // Probing points may be verified at compile time within the radius
688
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
689
+    // so that may be added to SanityCheck.h in the future.
690
+    #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
691
+    #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
692
+    #define MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
693
+    #define MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
694
+  #elif IS_SCARA
695
+    #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
696
+    #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
697
+    #define MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
698
+    #define MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
699
+  #else
700
+    // Boundaries for Cartesian probing based on set limits
701
+    #if ENABLED(BED_CENTER_AT_0_0)
702
+      #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2)
703
+      #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2)
704
+      #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
705
+      #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
706
+    #else
707
+      #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0))
708
+      #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0))
709
+      #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE))
710
+      #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE))
711
+    #endif
712
+  #endif
684 713
 #elif ENABLED(AUTO_BED_LEVELING_UBL)
685
-  #define UBL_MESH_MIN_X UBL_MESH_INSET
686
-  #define UBL_MESH_MAX_X (X_BED_SIZE - (UBL_MESH_INSET))
687
-  #define UBL_MESH_MIN_Y UBL_MESH_INSET
688
-  #define UBL_MESH_MAX_Y (Y_BED_SIZE - (UBL_MESH_INSET))
714
+  #if ENABLED(DELTA)
715
+    // Probing points may be verified at compile time within the radius
716
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
717
+    // so that may be added to SanityCheck.h in the future.
718
+    #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
719
+    #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
720
+    #define UBL_MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
721
+    #define UBL_MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
722
+  #elif IS_SCARA
723
+    #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
724
+    #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
725
+    #define UBL_MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
726
+    #define UBL_MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
727
+  #else
728
+    // Boundaries for Cartesian probing based on set limits
729
+    #if ENABLED(BED_CENTER_AT_0_0)
730
+      #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2)
731
+      #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2)
732
+      #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
733
+      #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
734
+    #else
735
+      #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0))
736
+      #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0))
737
+      #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE))
738
+      #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE))
739
+    #endif
740
+  #endif
689 741
 
690 742
   // If this is defined, the currently active mesh will be saved in the
691 743
   // current slot on M500.

+ 60
- 8
Marlin/src/config/examples/Cartesio/Configuration_adv.h Bestand weergeven

@@ -673,19 +673,71 @@
673 673
 
674 674
 // @section leveling
675 675
 
676
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
677
+  #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
678
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
679
+  #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
680
+#endif
681
+
676 682
 // Default mesh area is an area with an inset margin on the print area.
677 683
 // Below are the macros that are used to define the borders for the mesh area,
678 684
 // made available here for specialized needs, ie dual extruder setup.
679 685
 #if ENABLED(MESH_BED_LEVELING)
680
-  #define MESH_MIN_X MESH_INSET
681
-  #define MESH_MAX_X (X_BED_SIZE - (MESH_INSET))
682
-  #define MESH_MIN_Y MESH_INSET
683
-  #define MESH_MAX_Y (Y_BED_SIZE - (MESH_INSET))
686
+  #if ENABLED(DELTA)
687
+    // Probing points may be verified at compile time within the radius
688
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
689
+    // so that may be added to SanityCheck.h in the future.
690
+    #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
691
+    #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
692
+    #define MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
693
+    #define MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
694
+  #elif IS_SCARA
695
+    #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
696
+    #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
697
+    #define MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
698
+    #define MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
699
+  #else
700
+    // Boundaries for Cartesian probing based on set limits
701
+    #if ENABLED(BED_CENTER_AT_0_0)
702
+      #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2)
703
+      #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2)
704
+      #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
705
+      #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
706
+    #else
707
+      #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0))
708
+      #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0))
709
+      #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE))
710
+      #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE))
711
+    #endif
712
+  #endif
684 713
 #elif ENABLED(AUTO_BED_LEVELING_UBL)
685
-  #define UBL_MESH_MIN_X UBL_MESH_INSET
686
-  #define UBL_MESH_MAX_X (X_BED_SIZE - (UBL_MESH_INSET))
687
-  #define UBL_MESH_MIN_Y UBL_MESH_INSET
688
-  #define UBL_MESH_MAX_Y (Y_BED_SIZE - (UBL_MESH_INSET))
714
+  #if ENABLED(DELTA)
715
+    // Probing points may be verified at compile time within the radius
716
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
717
+    // so that may be added to SanityCheck.h in the future.
718
+    #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
719
+    #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
720
+    #define UBL_MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
721
+    #define UBL_MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
722
+  #elif IS_SCARA
723
+    #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
724
+    #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
725
+    #define UBL_MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
726
+    #define UBL_MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
727
+  #else
728
+    // Boundaries for Cartesian probing based on set limits
729
+    #if ENABLED(BED_CENTER_AT_0_0)
730
+      #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2)
731
+      #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2)
732
+      #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
733
+      #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
734
+    #else
735
+      #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0))
736
+      #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0))
737
+      #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE))
738
+      #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE))
739
+    #endif
740
+  #endif
689 741
 
690 742
   // If this is defined, the currently active mesh will be saved in the
691 743
   // current slot on M500.

+ 60
- 8
Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h Bestand weergeven

@@ -673,19 +673,71 @@
673 673
 
674 674
 // @section leveling
675 675
 
676
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
677
+  #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
678
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
679
+  #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
680
+#endif
681
+
676 682
 // Default mesh area is an area with an inset margin on the print area.
677 683
 // Below are the macros that are used to define the borders for the mesh area,
678 684
 // made available here for specialized needs, ie dual extruder setup.
679 685
 #if ENABLED(MESH_BED_LEVELING)
680
-  #define MESH_MIN_X MESH_INSET
681
-  #define MESH_MAX_X (X_BED_SIZE - (MESH_INSET))
682
-  #define MESH_MIN_Y MESH_INSET
683
-  #define MESH_MAX_Y (Y_BED_SIZE - (MESH_INSET))
686
+  #if ENABLED(DELTA)
687
+    // Probing points may be verified at compile time within the radius
688
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
689
+    // so that may be added to SanityCheck.h in the future.
690
+    #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
691
+    #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
692
+    #define MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
693
+    #define MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
694
+  #elif IS_SCARA
695
+    #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
696
+    #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
697
+    #define MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
698
+    #define MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
699
+  #else
700
+    // Boundaries for Cartesian probing based on set limits
701
+    #if ENABLED(BED_CENTER_AT_0_0)
702
+      #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2)
703
+      #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2)
704
+      #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
705
+      #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
706
+    #else
707
+      #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0))
708
+      #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0))
709
+      #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE))
710
+      #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE))
711
+    #endif
712
+  #endif
684 713
 #elif ENABLED(AUTO_BED_LEVELING_UBL)
685
-  #define UBL_MESH_MIN_X UBL_MESH_INSET
686
-  #define UBL_MESH_MAX_X (X_BED_SIZE - (UBL_MESH_INSET))
687
-  #define UBL_MESH_MIN_Y UBL_MESH_INSET
688
-  #define UBL_MESH_MAX_Y (Y_BED_SIZE - (UBL_MESH_INSET))
714
+  #if ENABLED(DELTA)
715
+    // Probing points may be verified at compile time within the radius
716
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
717
+    // so that may be added to SanityCheck.h in the future.
718
+    #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
719
+    #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
720
+    #define UBL_MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
721
+    #define UBL_MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
722
+  #elif IS_SCARA
723
+    #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
724
+    #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
725
+    #define UBL_MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
726
+    #define UBL_MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
727
+  #else
728
+    // Boundaries for Cartesian probing based on set limits
729
+    #if ENABLED(BED_CENTER_AT_0_0)
730
+      #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2)
731
+      #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2)
732
+      #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
733
+      #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
734
+    #else
735
+      #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0))
736
+      #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0))
737
+      #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE))
738
+      #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE))
739
+    #endif
740
+  #endif
689 741
 
690 742
   // If this is defined, the currently active mesh will be saved in the
691 743
   // current slot on M500.

+ 60
- 8
Marlin/src/config/examples/Felix/Configuration_adv.h Bestand weergeven

@@ -673,19 +673,71 @@
673 673
 
674 674
 // @section leveling
675 675
 
676
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
677
+  #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
678
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
679
+  #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
680
+#endif
681
+
676 682
 // Default mesh area is an area with an inset margin on the print area.
677 683
 // Below are the macros that are used to define the borders for the mesh area,
678 684
 // made available here for specialized needs, ie dual extruder setup.
679 685
 #if ENABLED(MESH_BED_LEVELING)
680
-  #define MESH_MIN_X MESH_INSET
681
-  #define MESH_MAX_X (X_BED_SIZE - (MESH_INSET))
682
-  #define MESH_MIN_Y MESH_INSET
683
-  #define MESH_MAX_Y (Y_BED_SIZE - (MESH_INSET))
686
+  #if ENABLED(DELTA)
687
+    // Probing points may be verified at compile time within the radius
688
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
689
+    // so that may be added to SanityCheck.h in the future.
690
+    #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
691
+    #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
692
+    #define MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
693
+    #define MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
694
+  #elif IS_SCARA
695
+    #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
696
+    #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
697
+    #define MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
698
+    #define MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
699
+  #else
700
+    // Boundaries for Cartesian probing based on set limits
701
+    #if ENABLED(BED_CENTER_AT_0_0)
702
+      #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2)
703
+      #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2)
704
+      #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
705
+      #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
706
+    #else
707
+      #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0))
708
+      #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0))
709
+      #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE))
710
+      #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE))
711
+    #endif
712
+  #endif
684 713
 #elif ENABLED(AUTO_BED_LEVELING_UBL)
685
-  #define UBL_MESH_MIN_X UBL_MESH_INSET
686
-  #define UBL_MESH_MAX_X (X_BED_SIZE - (UBL_MESH_INSET))
687
-  #define UBL_MESH_MIN_Y UBL_MESH_INSET
688
-  #define UBL_MESH_MAX_Y (Y_BED_SIZE - (UBL_MESH_INSET))
714
+  #if ENABLED(DELTA)
715
+    // Probing points may be verified at compile time within the radius
716
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
717
+    // so that may be added to SanityCheck.h in the future.
718
+    #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
719
+    #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
720
+    #define UBL_MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
721
+    #define UBL_MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
722
+  #elif IS_SCARA
723
+    #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
724
+    #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
725
+    #define UBL_MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
726
+    #define UBL_MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
727
+  #else
728
+    // Boundaries for Cartesian probing based on set limits
729
+    #if ENABLED(BED_CENTER_AT_0_0)
730
+      #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2)
731
+      #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2)
732
+      #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
733
+      #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
734
+    #else
735
+      #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0))
736
+      #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0))
737
+      #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE))
738
+      #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE))
739
+    #endif
740
+  #endif
689 741
 
690 742
   // If this is defined, the currently active mesh will be saved in the
691 743
   // current slot on M500.

+ 60
- 8
Marlin/src/config/examples/Folger Tech/i3-2020/Configuration_adv.h Bestand weergeven

@@ -674,19 +674,71 @@
674 674
 
675 675
 // @section leveling
676 676
 
677
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
678
+  #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
679
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
680
+  #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
681
+#endif
682
+
677 683
 // Default mesh area is an area with an inset margin on the print area.
678 684
 // Below are the macros that are used to define the borders for the mesh area,
679 685
 // made available here for specialized needs, ie dual extruder setup.
680 686
 #if ENABLED(MESH_BED_LEVELING)
681
-  #define MESH_MIN_X MESH_INSET
682
-  #define MESH_MAX_X (X_BED_SIZE - (MESH_INSET))
683
-  #define MESH_MIN_Y MESH_INSET
684
-  #define MESH_MAX_Y (Y_BED_SIZE - (MESH_INSET))
687
+  #if ENABLED(DELTA)
688
+    // Probing points may be verified at compile time within the radius
689
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
690
+    // so that may be added to SanityCheck.h in the future.
691
+    #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
692
+    #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
693
+    #define MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
694
+    #define MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
695
+  #elif IS_SCARA
696
+    #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
697
+    #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
698
+    #define MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
699
+    #define MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
700
+  #else
701
+    // Boundaries for Cartesian probing based on set limits
702
+    #if ENABLED(BED_CENTER_AT_0_0)
703
+      #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2)
704
+      #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2)
705
+      #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
706
+      #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
707
+    #else
708
+      #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0))
709
+      #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0))
710
+      #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE))
711
+      #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE))
712
+    #endif
713
+  #endif
685 714
 #elif ENABLED(AUTO_BED_LEVELING_UBL)
686
-  #define UBL_MESH_MIN_X UBL_MESH_INSET
687
-  #define UBL_MESH_MAX_X (X_BED_SIZE - (UBL_MESH_INSET))
688
-  #define UBL_MESH_MIN_Y UBL_MESH_INSET
689
-  #define UBL_MESH_MAX_Y (Y_BED_SIZE - (UBL_MESH_INSET))
715
+  #if ENABLED(DELTA)
716
+    // Probing points may be verified at compile time within the radius
717
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
718
+    // so that may be added to SanityCheck.h in the future.
719
+    #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
720
+    #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
721
+    #define UBL_MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
722
+    #define UBL_MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
723
+  #elif IS_SCARA
724
+    #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
725
+    #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
726
+    #define UBL_MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
727
+    #define UBL_MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
728
+  #else
729
+    // Boundaries for Cartesian probing based on set limits
730
+    #if ENABLED(BED_CENTER_AT_0_0)
731
+      #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2)
732
+      #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2)
733
+      #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
734
+      #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
735
+    #else
736
+      #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0))
737
+      #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0))
738
+      #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE))
739
+      #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE))
740
+    #endif
741
+  #endif
690 742
 
691 743
   // If this is defined, the currently active mesh will be saved in the
692 744
   // current slot on M500.

+ 60
- 8
Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h Bestand weergeven

@@ -673,19 +673,71 @@
673 673
 
674 674
 // @section leveling
675 675
 
676
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
677
+  #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
678
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
679
+  #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
680
+#endif
681
+
676 682
 // Default mesh area is an area with an inset margin on the print area.
677 683
 // Below are the macros that are used to define the borders for the mesh area,
678 684
 // made available here for specialized needs, ie dual extruder setup.
679 685
 #if ENABLED(MESH_BED_LEVELING)
680
-  #define MESH_MIN_X MESH_INSET
681
-  #define MESH_MAX_X (X_BED_SIZE - (MESH_INSET))
682
-  #define MESH_MIN_Y MESH_INSET
683
-  #define MESH_MAX_Y (Y_BED_SIZE - (MESH_INSET))
686
+  #if ENABLED(DELTA)
687
+    // Probing points may be verified at compile time within the radius
688
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
689
+    // so that may be added to SanityCheck.h in the future.
690
+    #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
691
+    #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
692
+    #define MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
693
+    #define MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
694
+  #elif IS_SCARA
695
+    #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
696
+    #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
697
+    #define MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
698
+    #define MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
699
+  #else
700
+    // Boundaries for Cartesian probing based on set limits
701
+    #if ENABLED(BED_CENTER_AT_0_0)
702
+      #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2)
703
+      #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2)
704
+      #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
705
+      #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
706
+    #else
707
+      #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0))
708
+      #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0))
709
+      #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE))
710
+      #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE))
711
+    #endif
712
+  #endif
684 713
 #elif ENABLED(AUTO_BED_LEVELING_UBL)
685
-  #define UBL_MESH_MIN_X UBL_MESH_INSET
686
-  #define UBL_MESH_MAX_X (X_BED_SIZE - (UBL_MESH_INSET))
687
-  #define UBL_MESH_MIN_Y UBL_MESH_INSET
688
-  #define UBL_MESH_MAX_Y (Y_BED_SIZE - (UBL_MESH_INSET))
714
+  #if ENABLED(DELTA)
715
+    // Probing points may be verified at compile time within the radius
716
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
717
+    // so that may be added to SanityCheck.h in the future.
718
+    #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
719
+    #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
720
+    #define UBL_MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
721
+    #define UBL_MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
722
+  #elif IS_SCARA
723
+    #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
724
+    #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
725
+    #define UBL_MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
726
+    #define UBL_MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
727
+  #else
728
+    // Boundaries for Cartesian probing based on set limits
729
+    #if ENABLED(BED_CENTER_AT_0_0)
730
+      #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2)
731
+      #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2)
732
+      #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
733
+      #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
734
+    #else
735
+      #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0))
736
+      #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0))
737
+      #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE))
738
+      #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE))
739
+    #endif
740
+  #endif
689 741
 
690 742
   // If this is defined, the currently active mesh will be saved in the
691 743
   // current slot on M500.

+ 60
- 8
Marlin/src/config/examples/Malyan/M150/Configuration_adv.h Bestand weergeven

@@ -670,19 +670,71 @@
670 670
 
671 671
 // @section leveling
672 672
 
673
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
674
+  #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
675
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
676
+  #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
677
+#endif
678
+
673 679
 // Default mesh area is an area with an inset margin on the print area.
674 680
 // Below are the macros that are used to define the borders for the mesh area,
675 681
 // made available here for specialized needs, ie dual extruder setup.
676 682
 #if ENABLED(MESH_BED_LEVELING)
677
-  #define MESH_MIN_X MESH_INSET
678
-  #define MESH_MAX_X (X_BED_SIZE - (MESH_INSET))
679
-  #define MESH_MIN_Y MESH_INSET
680
-  #define MESH_MAX_Y (Y_BED_SIZE - (MESH_INSET))
683
+  #if ENABLED(DELTA)
684
+    // Probing points may be verified at compile time within the radius
685
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
686
+    // so that may be added to SanityCheck.h in the future.
687
+    #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
688
+    #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
689
+    #define MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
690
+    #define MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
691
+  #elif IS_SCARA
692
+    #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
693
+    #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
694
+    #define MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
695
+    #define MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
696
+  #else
697
+    // Boundaries for Cartesian probing based on set limits
698
+    #if ENABLED(BED_CENTER_AT_0_0)
699
+      #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2)
700
+      #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2)
701
+      #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
702
+      #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
703
+    #else
704
+      #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0))
705
+      #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0))
706
+      #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE))
707
+      #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE))
708
+    #endif
709
+  #endif
681 710
 #elif ENABLED(AUTO_BED_LEVELING_UBL)
682
-  #define UBL_MESH_MIN_X UBL_MESH_INSET
683
-  #define UBL_MESH_MAX_X (X_BED_SIZE - (UBL_MESH_INSET))
684
-  #define UBL_MESH_MIN_Y UBL_MESH_INSET
685
-  #define UBL_MESH_MAX_Y (Y_BED_SIZE - (UBL_MESH_INSET))
711
+  #if ENABLED(DELTA)
712
+    // Probing points may be verified at compile time within the radius
713
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
714
+    // so that may be added to SanityCheck.h in the future.
715
+    #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
716
+    #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
717
+    #define UBL_MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
718
+    #define UBL_MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
719
+  #elif IS_SCARA
720
+    #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
721
+    #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
722
+    #define UBL_MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
723
+    #define UBL_MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
724
+  #else
725
+    // Boundaries for Cartesian probing based on set limits
726
+    #if ENABLED(BED_CENTER_AT_0_0)
727
+      #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2)
728
+      #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2)
729
+      #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
730
+      #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
731
+    #else
732
+      #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0))
733
+      #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0))
734
+      #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE))
735
+      #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE))
736
+    #endif
737
+  #endif
686 738
 
687 739
   // If this is defined, the currently active mesh will be saved in the
688 740
   // current slot on M500.

+ 60
- 8
Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h Bestand weergeven

@@ -694,19 +694,71 @@
694 694
 
695 695
 // @section leveling
696 696
 
697
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
698
+  #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
699
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
700
+  #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
701
+#endif
702
+
697 703
 // Default mesh area is an area with an inset margin on the print area.
698 704
 // Below are the macros that are used to define the borders for the mesh area,
699 705
 // made available here for specialized needs, ie dual extruder setup.
700 706
 #if ENABLED(MESH_BED_LEVELING)
701
-  #define MESH_MIN_X MESH_INSET
702
-  #define MESH_MAX_X (X_BED_SIZE - (MESH_INSET))
703
-  #define MESH_MIN_Y MESH_INSET
704
-  #define MESH_MAX_Y (Y_BED_SIZE - (MESH_INSET))
707
+  #if ENABLED(DELTA)
708
+    // Probing points may be verified at compile time within the radius
709
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
710
+    // so that may be added to SanityCheck.h in the future.
711
+    #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
712
+    #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
713
+    #define MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
714
+    #define MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
715
+  #elif IS_SCARA
716
+    #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
717
+    #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
718
+    #define MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
719
+    #define MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
720
+  #else
721
+    // Boundaries for Cartesian probing based on set limits
722
+    #if ENABLED(BED_CENTER_AT_0_0)
723
+      #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2)
724
+      #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2)
725
+      #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
726
+      #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
727
+    #else
728
+      #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0))
729
+      #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0))
730
+      #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE))
731
+      #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE))
732
+    #endif
733
+  #endif
705 734
 #elif ENABLED(AUTO_BED_LEVELING_UBL)
706
-  #define UBL_MESH_MIN_X UBL_MESH_INSET
707
-  #define UBL_MESH_MAX_X (X_BED_SIZE - (UBL_MESH_INSET))
708
-  #define UBL_MESH_MIN_Y UBL_MESH_INSET
709
-  #define UBL_MESH_MAX_Y (Y_BED_SIZE - (UBL_MESH_INSET))
735
+  #if ENABLED(DELTA)
736
+    // Probing points may be verified at compile time within the radius
737
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
738
+    // so that may be added to SanityCheck.h in the future.
739
+    #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
740
+    #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
741
+    #define UBL_MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
742
+    #define UBL_MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
743
+  #elif IS_SCARA
744
+    #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
745
+    #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
746
+    #define UBL_MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
747
+    #define UBL_MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
748
+  #else
749
+    // Boundaries for Cartesian probing based on set limits
750
+    #if ENABLED(BED_CENTER_AT_0_0)
751
+      #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2)
752
+      #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2)
753
+      #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
754
+      #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
755
+    #else
756
+      #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0))
757
+      #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0))
758
+      #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE))
759
+      #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE))
760
+    #endif
761
+  #endif
710 762
 
711 763
   // If this is defined, the currently active mesh will be saved in the
712 764
   // current slot on M500.

+ 60
- 8
Marlin/src/config/examples/RigidBot/Configuration_adv.h Bestand weergeven

@@ -673,19 +673,71 @@
673 673
 
674 674
 // @section leveling
675 675
 
676
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
677
+  #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
678
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
679
+  #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
680
+#endif
681
+
676 682
 // Default mesh area is an area with an inset margin on the print area.
677 683
 // Below are the macros that are used to define the borders for the mesh area,
678 684
 // made available here for specialized needs, ie dual extruder setup.
679 685
 #if ENABLED(MESH_BED_LEVELING)
680
-  #define MESH_MIN_X MESH_INSET
681
-  #define MESH_MAX_X (X_BED_SIZE - (MESH_INSET))
682
-  #define MESH_MIN_Y MESH_INSET
683
-  #define MESH_MAX_Y (Y_BED_SIZE - (MESH_INSET))
686
+  #if ENABLED(DELTA)
687
+    // Probing points may be verified at compile time within the radius
688
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
689
+    // so that may be added to SanityCheck.h in the future.
690
+    #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
691
+    #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
692
+    #define MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
693
+    #define MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
694
+  #elif IS_SCARA
695
+    #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
696
+    #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
697
+    #define MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
698
+    #define MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
699
+  #else
700
+    // Boundaries for Cartesian probing based on set limits
701
+    #if ENABLED(BED_CENTER_AT_0_0)
702
+      #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2)
703
+      #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2)
704
+      #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
705
+      #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
706
+    #else
707
+      #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0))
708
+      #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0))
709
+      #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE))
710
+      #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE))
711
+    #endif
712
+  #endif
684 713
 #elif ENABLED(AUTO_BED_LEVELING_UBL)
685
-  #define UBL_MESH_MIN_X UBL_MESH_INSET
686
-  #define UBL_MESH_MAX_X (X_BED_SIZE - (UBL_MESH_INSET))
687
-  #define UBL_MESH_MIN_Y UBL_MESH_INSET
688
-  #define UBL_MESH_MAX_Y (Y_BED_SIZE - (UBL_MESH_INSET))
714
+  #if ENABLED(DELTA)
715
+    // Probing points may be verified at compile time within the radius
716
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
717
+    // so that may be added to SanityCheck.h in the future.
718
+    #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
719
+    #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
720
+    #define UBL_MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
721
+    #define UBL_MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
722
+  #elif IS_SCARA
723
+    #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
724
+    #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
725
+    #define UBL_MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
726
+    #define UBL_MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
727
+  #else
728
+    // Boundaries for Cartesian probing based on set limits
729
+    #if ENABLED(BED_CENTER_AT_0_0)
730
+      #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2)
731
+      #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2)
732
+      #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
733
+      #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
734
+    #else
735
+      #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0))
736
+      #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0))
737
+      #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE))
738
+      #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE))
739
+    #endif
740
+  #endif
689 741
 
690 742
   // If this is defined, the currently active mesh will be saved in the
691 743
   // current slot on M500.

+ 60
- 8
Marlin/src/config/examples/SCARA/Configuration_adv.h Bestand weergeven

@@ -673,19 +673,71 @@
673 673
 
674 674
 // @section leveling
675 675
 
676
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
677
+  #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
678
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
679
+  #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
680
+#endif
681
+
676 682
 // Default mesh area is an area with an inset margin on the print area.
677 683
 // Below are the macros that are used to define the borders for the mesh area,
678 684
 // made available here for specialized needs, ie dual extruder setup.
679 685
 #if ENABLED(MESH_BED_LEVELING)
680
-  #define MESH_MIN_X MESH_INSET
681
-  #define MESH_MAX_X (X_BED_SIZE - (MESH_INSET))
682
-  #define MESH_MIN_Y MESH_INSET
683
-  #define MESH_MAX_Y (Y_BED_SIZE - (MESH_INSET))
686
+  #if ENABLED(DELTA)
687
+    // Probing points may be verified at compile time within the radius
688
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
689
+    // so that may be added to SanityCheck.h in the future.
690
+    #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
691
+    #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
692
+    #define MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
693
+    #define MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
694
+  #elif IS_SCARA
695
+    #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
696
+    #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
697
+    #define MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
698
+    #define MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
699
+  #else
700
+    // Boundaries for Cartesian probing based on set limits
701
+    #if ENABLED(BED_CENTER_AT_0_0)
702
+      #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2)
703
+      #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2)
704
+      #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
705
+      #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
706
+    #else
707
+      #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0))
708
+      #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0))
709
+      #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE))
710
+      #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE))
711
+    #endif
712
+  #endif
684 713
 #elif ENABLED(AUTO_BED_LEVELING_UBL)
685
-  #define UBL_MESH_MIN_X UBL_MESH_INSET
686
-  #define UBL_MESH_MAX_X (X_BED_SIZE - (UBL_MESH_INSET))
687
-  #define UBL_MESH_MIN_Y UBL_MESH_INSET
688
-  #define UBL_MESH_MAX_Y (Y_BED_SIZE - (UBL_MESH_INSET))
714
+  #if ENABLED(DELTA)
715
+    // Probing points may be verified at compile time within the radius
716
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
717
+    // so that may be added to SanityCheck.h in the future.
718
+    #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
719
+    #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
720
+    #define UBL_MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
721
+    #define UBL_MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
722
+  #elif IS_SCARA
723
+    #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
724
+    #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
725
+    #define UBL_MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
726
+    #define UBL_MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
727
+  #else
728
+    // Boundaries for Cartesian probing based on set limits
729
+    #if ENABLED(BED_CENTER_AT_0_0)
730
+      #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2)
731
+      #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2)
732
+      #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
733
+      #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
734
+    #else
735
+      #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0))
736
+      #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0))
737
+      #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE))
738
+      #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE))
739
+    #endif
740
+  #endif
689 741
 
690 742
   // If this is defined, the currently active mesh will be saved in the
691 743
   // current slot on M500.

+ 60
- 8
Marlin/src/config/examples/Sanguinololu/Configuration_adv.h Bestand weergeven

@@ -662,19 +662,71 @@
662 662
 
663 663
 // @section leveling
664 664
 
665
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
666
+  #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
667
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
668
+  #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
669
+#endif
670
+
665 671
 // Default mesh area is an area with an inset margin on the print area.
666 672
 // Below are the macros that are used to define the borders for the mesh area,
667 673
 // made available here for specialized needs, ie dual extruder setup.
668 674
 #if ENABLED(MESH_BED_LEVELING)
669
-  #define MESH_MIN_X MESH_INSET
670
-  #define MESH_MAX_X (X_BED_SIZE - (MESH_INSET))
671
-  #define MESH_MIN_Y MESH_INSET
672
-  #define MESH_MAX_Y (Y_BED_SIZE - (MESH_INSET))
675
+  #if ENABLED(DELTA)
676
+    // Probing points may be verified at compile time within the radius
677
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
678
+    // so that may be added to SanityCheck.h in the future.
679
+    #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
680
+    #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
681
+    #define MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
682
+    #define MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
683
+  #elif IS_SCARA
684
+    #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
685
+    #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
686
+    #define MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
687
+    #define MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
688
+  #else
689
+    // Boundaries for Cartesian probing based on set limits
690
+    #if ENABLED(BED_CENTER_AT_0_0)
691
+      #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2)
692
+      #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2)
693
+      #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
694
+      #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
695
+    #else
696
+      #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0))
697
+      #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0))
698
+      #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE))
699
+      #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE))
700
+    #endif
701
+  #endif
673 702
 #elif ENABLED(AUTO_BED_LEVELING_UBL)
674
-  #define UBL_MESH_MIN_X UBL_MESH_INSET
675
-  #define UBL_MESH_MAX_X (X_BED_SIZE - (UBL_MESH_INSET))
676
-  #define UBL_MESH_MIN_Y UBL_MESH_INSET
677
-  #define UBL_MESH_MAX_Y (Y_BED_SIZE - (UBL_MESH_INSET))
703
+  #if ENABLED(DELTA)
704
+    // Probing points may be verified at compile time within the radius
705
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
706
+    // so that may be added to SanityCheck.h in the future.
707
+    #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
708
+    #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
709
+    #define UBL_MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
710
+    #define UBL_MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
711
+  #elif IS_SCARA
712
+    #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
713
+    #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
714
+    #define UBL_MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
715
+    #define UBL_MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
716
+  #else
717
+    // Boundaries for Cartesian probing based on set limits
718
+    #if ENABLED(BED_CENTER_AT_0_0)
719
+      #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2)
720
+      #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2)
721
+      #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
722
+      #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
723
+    #else
724
+      #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0))
725
+      #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0))
726
+      #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE))
727
+      #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE))
728
+    #endif
729
+  #endif
678 730
 
679 731
   // If this is defined, the currently active mesh will be saved in the
680 732
   // current slot on M500.

+ 60
- 8
Marlin/src/config/examples/TinyBoy2/Configuration_adv.h Bestand weergeven

@@ -673,19 +673,71 @@
673 673
 
674 674
 // @section leveling
675 675
 
676
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
677
+  #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
678
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
679
+  #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
680
+#endif
681
+
676 682
 // Default mesh area is an area with an inset margin on the print area.
677 683
 // Below are the macros that are used to define the borders for the mesh area,
678 684
 // made available here for specialized needs, ie dual extruder setup.
679 685
 #if ENABLED(MESH_BED_LEVELING)
680
-  #define MESH_MIN_X MESH_INSET
681
-  #define MESH_MAX_X (X_BED_SIZE - (MESH_INSET))
682
-  #define MESH_MIN_Y MESH_INSET
683
-  #define MESH_MAX_Y (Y_BED_SIZE - (MESH_INSET))
686
+  #if ENABLED(DELTA)
687
+    // Probing points may be verified at compile time within the radius
688
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
689
+    // so that may be added to SanityCheck.h in the future.
690
+    #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
691
+    #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
692
+    #define MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
693
+    #define MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
694
+  #elif IS_SCARA
695
+    #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
696
+    #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
697
+    #define MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
698
+    #define MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
699
+  #else
700
+    // Boundaries for Cartesian probing based on set limits
701
+    #if ENABLED(BED_CENTER_AT_0_0)
702
+      #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2)
703
+      #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2)
704
+      #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
705
+      #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
706
+    #else
707
+      #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0))
708
+      #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0))
709
+      #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE))
710
+      #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE))
711
+    #endif
712
+  #endif
684 713
 #elif ENABLED(AUTO_BED_LEVELING_UBL)
685
-  #define UBL_MESH_MIN_X UBL_MESH_INSET
686
-  #define UBL_MESH_MAX_X (X_BED_SIZE - (UBL_MESH_INSET))
687
-  #define UBL_MESH_MIN_Y UBL_MESH_INSET
688
-  #define UBL_MESH_MAX_Y (Y_BED_SIZE - (UBL_MESH_INSET))
714
+  #if ENABLED(DELTA)
715
+    // Probing points may be verified at compile time within the radius
716
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
717
+    // so that may be added to SanityCheck.h in the future.
718
+    #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
719
+    #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
720
+    #define UBL_MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
721
+    #define UBL_MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
722
+  #elif IS_SCARA
723
+    #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
724
+    #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
725
+    #define UBL_MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
726
+    #define UBL_MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
727
+  #else
728
+    // Boundaries for Cartesian probing based on set limits
729
+    #if ENABLED(BED_CENTER_AT_0_0)
730
+      #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2)
731
+      #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2)
732
+      #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
733
+      #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
734
+    #else
735
+      #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0))
736
+      #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0))
737
+      #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE))
738
+      #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE))
739
+    #endif
740
+  #endif
689 741
 
690 742
   // If this is defined, the currently active mesh will be saved in the
691 743
   // current slot on M500.

+ 60
- 8
Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h Bestand weergeven

@@ -683,19 +683,71 @@
683 683
 
684 684
 // @section leveling
685 685
 
686
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
687
+  #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
688
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
689
+  #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
690
+#endif
691
+
686 692
 // Default mesh area is an area with an inset margin on the print area.
687 693
 // Below are the macros that are used to define the borders for the mesh area,
688 694
 // made available here for specialized needs, ie dual extruder setup.
689 695
 #if ENABLED(MESH_BED_LEVELING)
690
-  #define MESH_MIN_X MESH_INSET
691
-  #define MESH_MAX_X (X_BED_SIZE - (MESH_INSET))
692
-  #define MESH_MIN_Y MESH_INSET
693
-  #define MESH_MAX_Y (Y_BED_SIZE - (MESH_INSET))
696
+  #if ENABLED(DELTA)
697
+    // Probing points may be verified at compile time within the radius
698
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
699
+    // so that may be added to SanityCheck.h in the future.
700
+    #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
701
+    #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
702
+    #define MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
703
+    #define MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
704
+  #elif IS_SCARA
705
+    #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
706
+    #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
707
+    #define MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
708
+    #define MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
709
+  #else
710
+    // Boundaries for Cartesian probing based on set limits
711
+    #if ENABLED(BED_CENTER_AT_0_0)
712
+      #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2)
713
+      #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2)
714
+      #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
715
+      #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
716
+    #else
717
+      #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0))
718
+      #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0))
719
+      #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE))
720
+      #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE))
721
+    #endif
722
+  #endif
694 723
 #elif ENABLED(AUTO_BED_LEVELING_UBL)
695
-  #define UBL_MESH_MIN_X UBL_MESH_INSET
696
-  #define UBL_MESH_MAX_X (X_BED_SIZE - (UBL_MESH_INSET))
697
-  #define UBL_MESH_MIN_Y UBL_MESH_INSET
698
-  #define UBL_MESH_MAX_Y (Y_BED_SIZE - (UBL_MESH_INSET))
724
+  #if ENABLED(DELTA)
725
+    // Probing points may be verified at compile time within the radius
726
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
727
+    // so that may be added to SanityCheck.h in the future.
728
+    #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
729
+    #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
730
+    #define UBL_MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
731
+    #define UBL_MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
732
+  #elif IS_SCARA
733
+    #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
734
+    #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
735
+    #define UBL_MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
736
+    #define UBL_MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
737
+  #else
738
+    // Boundaries for Cartesian probing based on set limits
739
+    #if ENABLED(BED_CENTER_AT_0_0)
740
+      #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2)
741
+      #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2)
742
+      #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
743
+      #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
744
+    #else
745
+      #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0))
746
+      #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0))
747
+      #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE))
748
+      #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE))
749
+    #endif
750
+  #endif
699 751
 
700 752
   // If this is defined, the currently active mesh will be saved in the
701 753
   // current slot on M500.

+ 60
- 8
Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h Bestand weergeven

@@ -673,19 +673,71 @@
673 673
 
674 674
 // @section leveling
675 675
 
676
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
677
+  #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
678
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
679
+  #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
680
+#endif
681
+
676 682
 // Default mesh area is an area with an inset margin on the print area.
677 683
 // Below are the macros that are used to define the borders for the mesh area,
678 684
 // made available here for specialized needs, ie dual extruder setup.
679 685
 #if ENABLED(MESH_BED_LEVELING)
680
-  #define MESH_MIN_X MESH_INSET
681
-  #define MESH_MAX_X (X_BED_SIZE - (MESH_INSET))
682
-  #define MESH_MIN_Y MESH_INSET
683
-  #define MESH_MAX_Y (Y_BED_SIZE - (MESH_INSET))
686
+  #if ENABLED(DELTA)
687
+    // Probing points may be verified at compile time within the radius
688
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
689
+    // so that may be added to SanityCheck.h in the future.
690
+    #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
691
+    #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
692
+    #define MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
693
+    #define MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
694
+  #elif IS_SCARA
695
+    #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
696
+    #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
697
+    #define MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
698
+    #define MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
699
+  #else
700
+    // Boundaries for Cartesian probing based on set limits
701
+    #if ENABLED(BED_CENTER_AT_0_0)
702
+      #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2)
703
+      #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2)
704
+      #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
705
+      #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
706
+    #else
707
+      #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0))
708
+      #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0))
709
+      #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE))
710
+      #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE))
711
+    #endif
712
+  #endif
684 713
 #elif ENABLED(AUTO_BED_LEVELING_UBL)
685
-  #define UBL_MESH_MIN_X UBL_MESH_INSET
686
-  #define UBL_MESH_MAX_X (X_BED_SIZE - (UBL_MESH_INSET))
687
-  #define UBL_MESH_MIN_Y UBL_MESH_INSET
688
-  #define UBL_MESH_MAX_Y (Y_BED_SIZE - (UBL_MESH_INSET))
714
+  #if ENABLED(DELTA)
715
+    // Probing points may be verified at compile time within the radius
716
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
717
+    // so that may be added to SanityCheck.h in the future.
718
+    #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
719
+    #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
720
+    #define UBL_MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
721
+    #define UBL_MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
722
+  #elif IS_SCARA
723
+    #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
724
+    #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
725
+    #define UBL_MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
726
+    #define UBL_MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
727
+  #else
728
+    // Boundaries for Cartesian probing based on set limits
729
+    #if ENABLED(BED_CENTER_AT_0_0)
730
+      #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2)
731
+      #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2)
732
+      #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
733
+      #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
734
+    #else
735
+      #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0))
736
+      #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0))
737
+      #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE))
738
+      #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE))
739
+    #endif
740
+  #endif
689 741
 
690 742
   // If this is defined, the currently active mesh will be saved in the
691 743
   // current slot on M500.

+ 60
- 8
Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h Bestand weergeven

@@ -675,19 +675,71 @@
675 675
 
676 676
 // @section leveling
677 677
 
678
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
679
+  #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
680
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
681
+  #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
682
+#endif
683
+
678 684
 // Default mesh area is an area with an inset margin on the print area.
679 685
 // Below are the macros that are used to define the borders for the mesh area,
680 686
 // made available here for specialized needs, ie dual extruder setup.
681 687
 #if ENABLED(MESH_BED_LEVELING)
682
-  #define MESH_MIN_X MESH_INSET
683
-  #define MESH_MAX_X (X_BED_SIZE - (MESH_INSET))
684
-  #define MESH_MIN_Y MESH_INSET
685
-  #define MESH_MAX_Y (Y_BED_SIZE - (MESH_INSET))
688
+  #if ENABLED(DELTA)
689
+    // Probing points may be verified at compile time within the radius
690
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
691
+    // so that may be added to SanityCheck.h in the future.
692
+    #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
693
+    #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
694
+    #define MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
695
+    #define MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
696
+  #elif IS_SCARA
697
+    #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
698
+    #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
699
+    #define MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
700
+    #define MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
701
+  #else
702
+    // Boundaries for Cartesian probing based on set limits
703
+    #if ENABLED(BED_CENTER_AT_0_0)
704
+      #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2)
705
+      #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2)
706
+      #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
707
+      #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
708
+    #else
709
+      #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0))
710
+      #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0))
711
+      #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE))
712
+      #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE))
713
+    #endif
714
+  #endif
686 715
 #elif ENABLED(AUTO_BED_LEVELING_UBL)
687
-  #define UBL_MESH_MIN_X UBL_MESH_INSET
688
-  #define UBL_MESH_MAX_X (X_BED_SIZE - (UBL_MESH_INSET))
689
-  #define UBL_MESH_MIN_Y UBL_MESH_INSET
690
-  #define UBL_MESH_MAX_Y (Y_BED_SIZE - (UBL_MESH_INSET))
716
+  #if ENABLED(DELTA)
717
+    // Probing points may be verified at compile time within the radius
718
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
719
+    // so that may be added to SanityCheck.h in the future.
720
+    #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
721
+    #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
722
+    #define UBL_MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
723
+    #define UBL_MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
724
+  #elif IS_SCARA
725
+    #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
726
+    #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
727
+    #define UBL_MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
728
+    #define UBL_MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
729
+  #else
730
+    // Boundaries for Cartesian probing based on set limits
731
+    #if ENABLED(BED_CENTER_AT_0_0)
732
+      #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2)
733
+      #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2)
734
+      #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
735
+      #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
736
+    #else
737
+      #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0))
738
+      #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0))
739
+      #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE))
740
+      #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE))
741
+    #endif
742
+  #endif
691 743
 
692 744
   // If this is defined, the currently active mesh will be saved in the
693 745
   // current slot on M500.

+ 60
- 8
Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h Bestand weergeven

@@ -675,19 +675,71 @@
675 675
 
676 676
 // @section leveling
677 677
 
678
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
679
+  #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
680
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
681
+  #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
682
+#endif
683
+
678 684
 // Default mesh area is an area with an inset margin on the print area.
679 685
 // Below are the macros that are used to define the borders for the mesh area,
680 686
 // made available here for specialized needs, ie dual extruder setup.
681 687
 #if ENABLED(MESH_BED_LEVELING)
682
-  #define MESH_MIN_X MESH_INSET
683
-  #define MESH_MAX_X (X_BED_SIZE - (MESH_INSET))
684
-  #define MESH_MIN_Y MESH_INSET
685
-  #define MESH_MAX_Y (Y_BED_SIZE - (MESH_INSET))
688
+  #if ENABLED(DELTA)
689
+    // Probing points may be verified at compile time within the radius
690
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
691
+    // so that may be added to SanityCheck.h in the future.
692
+    #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
693
+    #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
694
+    #define MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
695
+    #define MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
696
+  #elif IS_SCARA
697
+    #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
698
+    #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
699
+    #define MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
700
+    #define MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
701
+  #else
702
+    // Boundaries for Cartesian probing based on set limits
703
+    #if ENABLED(BED_CENTER_AT_0_0)
704
+      #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2)
705
+      #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2)
706
+      #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
707
+      #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
708
+    #else
709
+      #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0))
710
+      #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0))
711
+      #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE))
712
+      #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE))
713
+    #endif
714
+  #endif
686 715
 #elif ENABLED(AUTO_BED_LEVELING_UBL)
687
-  #define UBL_MESH_MIN_X UBL_MESH_INSET
688
-  #define UBL_MESH_MAX_X (X_BED_SIZE - (UBL_MESH_INSET))
689
-  #define UBL_MESH_MIN_Y UBL_MESH_INSET
690
-  #define UBL_MESH_MAX_Y (Y_BED_SIZE - (UBL_MESH_INSET))
716
+  #if ENABLED(DELTA)
717
+    // Probing points may be verified at compile time within the radius
718
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
719
+    // so that may be added to SanityCheck.h in the future.
720
+    #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
721
+    #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
722
+    #define UBL_MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
723
+    #define UBL_MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
724
+  #elif IS_SCARA
725
+    #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
726
+    #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
727
+    #define UBL_MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
728
+    #define UBL_MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
729
+  #else
730
+    // Boundaries for Cartesian probing based on set limits
731
+    #if ENABLED(BED_CENTER_AT_0_0)
732
+      #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2)
733
+      #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2)
734
+      #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
735
+      #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
736
+    #else
737
+      #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0))
738
+      #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0))
739
+      #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE))
740
+      #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE))
741
+    #endif
742
+  #endif
691 743
 
692 744
   // If this is defined, the currently active mesh will be saved in the
693 745
   // current slot on M500.

+ 60
- 8
Marlin/src/config/examples/delta/generic/Configuration_adv.h Bestand weergeven

@@ -675,19 +675,71 @@
675 675
 
676 676
 // @section leveling
677 677
 
678
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
679
+  #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
680
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
681
+  #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
682
+#endif
683
+
678 684
 // Default mesh area is an area with an inset margin on the print area.
679 685
 // Below are the macros that are used to define the borders for the mesh area,
680 686
 // made available here for specialized needs, ie dual extruder setup.
681 687
 #if ENABLED(MESH_BED_LEVELING)
682
-  #define MESH_MIN_X MESH_INSET
683
-  #define MESH_MAX_X (X_BED_SIZE - (MESH_INSET))
684
-  #define MESH_MIN_Y MESH_INSET
685
-  #define MESH_MAX_Y (Y_BED_SIZE - (MESH_INSET))
688
+  #if ENABLED(DELTA)
689
+    // Probing points may be verified at compile time within the radius
690
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
691
+    // so that may be added to SanityCheck.h in the future.
692
+    #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
693
+    #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
694
+    #define MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
695
+    #define MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
696
+  #elif IS_SCARA
697
+    #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
698
+    #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
699
+    #define MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
700
+    #define MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
701
+  #else
702
+    // Boundaries for Cartesian probing based on set limits
703
+    #if ENABLED(BED_CENTER_AT_0_0)
704
+      #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2)
705
+      #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2)
706
+      #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
707
+      #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
708
+    #else
709
+      #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0))
710
+      #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0))
711
+      #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE))
712
+      #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE))
713
+    #endif
714
+  #endif
686 715
 #elif ENABLED(AUTO_BED_LEVELING_UBL)
687
-  #define UBL_MESH_MIN_X UBL_MESH_INSET
688
-  #define UBL_MESH_MAX_X (X_BED_SIZE - (UBL_MESH_INSET))
689
-  #define UBL_MESH_MIN_Y UBL_MESH_INSET
690
-  #define UBL_MESH_MAX_Y (Y_BED_SIZE - (UBL_MESH_INSET))
716
+  #if ENABLED(DELTA)
717
+    // Probing points may be verified at compile time within the radius
718
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
719
+    // so that may be added to SanityCheck.h in the future.
720
+    #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
721
+    #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
722
+    #define UBL_MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
723
+    #define UBL_MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
724
+  #elif IS_SCARA
725
+    #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
726
+    #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
727
+    #define UBL_MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
728
+    #define UBL_MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
729
+  #else
730
+    // Boundaries for Cartesian probing based on set limits
731
+    #if ENABLED(BED_CENTER_AT_0_0)
732
+      #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2)
733
+      #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2)
734
+      #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
735
+      #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
736
+    #else
737
+      #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0))
738
+      #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0))
739
+      #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE))
740
+      #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE))
741
+    #endif
742
+  #endif
691 743
 
692 744
   // If this is defined, the currently active mesh will be saved in the
693 745
   // current slot on M500.

+ 60
- 8
Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h Bestand weergeven

@@ -675,19 +675,71 @@
675 675
 
676 676
 // @section leveling
677 677
 
678
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
679
+  #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
680
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
681
+  #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
682
+#endif
683
+
678 684
 // Default mesh area is an area with an inset margin on the print area.
679 685
 // Below are the macros that are used to define the borders for the mesh area,
680 686
 // made available here for specialized needs, ie dual extruder setup.
681 687
 #if ENABLED(MESH_BED_LEVELING)
682
-  #define MESH_MIN_X MESH_INSET
683
-  #define MESH_MAX_X (X_BED_SIZE - (MESH_INSET))
684
-  #define MESH_MIN_Y MESH_INSET
685
-  #define MESH_MAX_Y (Y_BED_SIZE - (MESH_INSET))
688
+  #if ENABLED(DELTA)
689
+    // Probing points may be verified at compile time within the radius
690
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
691
+    // so that may be added to SanityCheck.h in the future.
692
+    #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
693
+    #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
694
+    #define MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
695
+    #define MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
696
+  #elif IS_SCARA
697
+    #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
698
+    #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
699
+    #define MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
700
+    #define MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
701
+  #else
702
+    // Boundaries for Cartesian probing based on set limits
703
+    #if ENABLED(BED_CENTER_AT_0_0)
704
+      #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2)
705
+      #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2)
706
+      #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
707
+      #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
708
+    #else
709
+      #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0))
710
+      #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0))
711
+      #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE))
712
+      #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE))
713
+    #endif
714
+  #endif
686 715
 #elif ENABLED(AUTO_BED_LEVELING_UBL)
687
-  #define UBL_MESH_MIN_X UBL_MESH_INSET
688
-  #define UBL_MESH_MAX_X (X_BED_SIZE - (UBL_MESH_INSET))
689
-  #define UBL_MESH_MIN_Y UBL_MESH_INSET
690
-  #define UBL_MESH_MAX_Y (Y_BED_SIZE - (UBL_MESH_INSET))
716
+  #if ENABLED(DELTA)
717
+    // Probing points may be verified at compile time within the radius
718
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
719
+    // so that may be added to SanityCheck.h in the future.
720
+    #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
721
+    #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
722
+    #define UBL_MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
723
+    #define UBL_MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
724
+  #elif IS_SCARA
725
+    #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
726
+    #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
727
+    #define UBL_MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
728
+    #define UBL_MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
729
+  #else
730
+    // Boundaries for Cartesian probing based on set limits
731
+    #if ENABLED(BED_CENTER_AT_0_0)
732
+      #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2)
733
+      #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2)
734
+      #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
735
+      #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
736
+    #else
737
+      #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0))
738
+      #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0))
739
+      #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE))
740
+      #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE))
741
+    #endif
742
+  #endif
691 743
 
692 744
   // If this is defined, the currently active mesh will be saved in the
693 745
   // current slot on M500.

+ 60
- 8
Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h Bestand weergeven

@@ -680,19 +680,71 @@
680 680
 
681 681
 // @section leveling
682 682
 
683
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
684
+  #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
685
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
686
+  #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
687
+#endif
688
+
683 689
 // Default mesh area is an area with an inset margin on the print area.
684 690
 // Below are the macros that are used to define the borders for the mesh area,
685 691
 // made available here for specialized needs, ie dual extruder setup.
686 692
 #if ENABLED(MESH_BED_LEVELING)
687
-  #define MESH_MIN_X MESH_INSET
688
-  #define MESH_MAX_X (X_BED_SIZE - (MESH_INSET))
689
-  #define MESH_MIN_Y MESH_INSET
690
-  #define MESH_MAX_Y (Y_BED_SIZE - (MESH_INSET))
693
+  #if ENABLED(DELTA)
694
+    // Probing points may be verified at compile time within the radius
695
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
696
+    // so that may be added to SanityCheck.h in the future.
697
+    #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
698
+    #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
699
+    #define MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
700
+    #define MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
701
+  #elif IS_SCARA
702
+    #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
703
+    #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
704
+    #define MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
705
+    #define MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
706
+  #else
707
+    // Boundaries for Cartesian probing based on set limits
708
+    #if ENABLED(BED_CENTER_AT_0_0)
709
+      #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2)
710
+      #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2)
711
+      #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
712
+      #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
713
+    #else
714
+      #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0))
715
+      #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0))
716
+      #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE))
717
+      #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE))
718
+    #endif
719
+  #endif
691 720
 #elif ENABLED(AUTO_BED_LEVELING_UBL)
692
-  #define UBL_MESH_MIN_X UBL_MESH_INSET
693
-  #define UBL_MESH_MAX_X (X_BED_SIZE - (UBL_MESH_INSET))
694
-  #define UBL_MESH_MIN_Y UBL_MESH_INSET
695
-  #define UBL_MESH_MAX_Y (Y_BED_SIZE - (UBL_MESH_INSET))
721
+  #if ENABLED(DELTA)
722
+    // Probing points may be verified at compile time within the radius
723
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
724
+    // so that may be added to SanityCheck.h in the future.
725
+    #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
726
+    #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
727
+    #define UBL_MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
728
+    #define UBL_MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
729
+  #elif IS_SCARA
730
+    #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
731
+    #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
732
+    #define UBL_MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
733
+    #define UBL_MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
734
+  #else
735
+    // Boundaries for Cartesian probing based on set limits
736
+    #if ENABLED(BED_CENTER_AT_0_0)
737
+      #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2)
738
+      #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2)
739
+      #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
740
+      #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
741
+    #else
742
+      #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0))
743
+      #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0))
744
+      #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE))
745
+      #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE))
746
+    #endif
747
+  #endif
696 748
 
697 749
   // If this is defined, the currently active mesh will be saved in the
698 750
   // current slot on M500.

+ 60
- 8
Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h Bestand weergeven

@@ -675,19 +675,71 @@
675 675
 
676 676
 // @section leveling
677 677
 
678
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
679
+  #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
680
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
681
+  #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
682
+#endif
683
+
678 684
 // Default mesh area is an area with an inset margin on the print area.
679 685
 // Below are the macros that are used to define the borders for the mesh area,
680 686
 // made available here for specialized needs, ie dual extruder setup.
681 687
 #if ENABLED(MESH_BED_LEVELING)
682
-  #define MESH_MIN_X MESH_INSET
683
-  #define MESH_MAX_X (X_BED_SIZE - (MESH_INSET))
684
-  #define MESH_MIN_Y MESH_INSET
685
-  #define MESH_MAX_Y (Y_BED_SIZE - (MESH_INSET))
688
+  #if ENABLED(DELTA)
689
+    // Probing points may be verified at compile time within the radius
690
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
691
+    // so that may be added to SanityCheck.h in the future.
692
+    #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
693
+    #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
694
+    #define MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
695
+    #define MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
696
+  #elif IS_SCARA
697
+    #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
698
+    #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
699
+    #define MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
700
+    #define MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
701
+  #else
702
+    // Boundaries for Cartesian probing based on set limits
703
+    #if ENABLED(BED_CENTER_AT_0_0)
704
+      #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2)
705
+      #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2)
706
+      #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
707
+      #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
708
+    #else
709
+      #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0))
710
+      #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0))
711
+      #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE))
712
+      #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE))
713
+    #endif
714
+  #endif
686 715
 #elif ENABLED(AUTO_BED_LEVELING_UBL)
687
-  #define UBL_MESH_MIN_X UBL_MESH_INSET
688
-  #define UBL_MESH_MAX_X (X_BED_SIZE - (UBL_MESH_INSET))
689
-  #define UBL_MESH_MIN_Y UBL_MESH_INSET
690
-  #define UBL_MESH_MAX_Y (Y_BED_SIZE - (UBL_MESH_INSET))
716
+  #if ENABLED(DELTA)
717
+    // Probing points may be verified at compile time within the radius
718
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
719
+    // so that may be added to SanityCheck.h in the future.
720
+    #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
721
+    #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
722
+    #define UBL_MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
723
+    #define UBL_MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
724
+  #elif IS_SCARA
725
+    #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
726
+    #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
727
+    #define UBL_MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
728
+    #define UBL_MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
729
+  #else
730
+    // Boundaries for Cartesian probing based on set limits
731
+    #if ENABLED(BED_CENTER_AT_0_0)
732
+      #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2)
733
+      #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2)
734
+      #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
735
+      #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
736
+    #else
737
+      #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0))
738
+      #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0))
739
+      #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE))
740
+      #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE))
741
+    #endif
742
+  #endif
691 743
 
692 744
   // If this is defined, the currently active mesh will be saved in the
693 745
   // current slot on M500.

+ 60
- 8
Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h Bestand weergeven

@@ -673,19 +673,71 @@
673 673
 
674 674
 // @section leveling
675 675
 
676
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
677
+  #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
678
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
679
+  #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
680
+#endif
681
+
676 682
 // Default mesh area is an area with an inset margin on the print area.
677 683
 // Below are the macros that are used to define the borders for the mesh area,
678 684
 // made available here for specialized needs, ie dual extruder setup.
679 685
 #if ENABLED(MESH_BED_LEVELING)
680
-  #define MESH_MIN_X MESH_INSET
681
-  #define MESH_MAX_X (X_BED_SIZE - (MESH_INSET))
682
-  #define MESH_MIN_Y MESH_INSET
683
-  #define MESH_MAX_Y (Y_BED_SIZE - (MESH_INSET))
686
+  #if ENABLED(DELTA)
687
+    // Probing points may be verified at compile time within the radius
688
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
689
+    // so that may be added to SanityCheck.h in the future.
690
+    #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
691
+    #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
692
+    #define MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
693
+    #define MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
694
+  #elif IS_SCARA
695
+    #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
696
+    #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
697
+    #define MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
698
+    #define MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
699
+  #else
700
+    // Boundaries for Cartesian probing based on set limits
701
+    #if ENABLED(BED_CENTER_AT_0_0)
702
+      #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2)
703
+      #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2)
704
+      #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
705
+      #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
706
+    #else
707
+      #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0))
708
+      #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0))
709
+      #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE))
710
+      #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE))
711
+    #endif
712
+  #endif
684 713
 #elif ENABLED(AUTO_BED_LEVELING_UBL)
685
-  #define UBL_MESH_MIN_X UBL_MESH_INSET
686
-  #define UBL_MESH_MAX_X (X_BED_SIZE - (UBL_MESH_INSET))
687
-  #define UBL_MESH_MIN_Y UBL_MESH_INSET
688
-  #define UBL_MESH_MAX_Y (Y_BED_SIZE - (UBL_MESH_INSET))
714
+  #if ENABLED(DELTA)
715
+    // Probing points may be verified at compile time within the radius
716
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
717
+    // so that may be added to SanityCheck.h in the future.
718
+    #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
719
+    #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
720
+    #define UBL_MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
721
+    #define UBL_MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
722
+  #elif IS_SCARA
723
+    #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
724
+    #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
725
+    #define UBL_MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
726
+    #define UBL_MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
727
+  #else
728
+    // Boundaries for Cartesian probing based on set limits
729
+    #if ENABLED(BED_CENTER_AT_0_0)
730
+      #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2)
731
+      #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2)
732
+      #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
733
+      #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
734
+    #else
735
+      #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0))
736
+      #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0))
737
+      #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE))
738
+      #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE))
739
+    #endif
740
+  #endif
689 741
 
690 742
   // If this is defined, the currently active mesh will be saved in the
691 743
   // current slot on M500.

+ 60
- 8
Marlin/src/config/examples/makibox/Configuration_adv.h Bestand weergeven

@@ -673,19 +673,71 @@
673 673
 
674 674
 // @section leveling
675 675
 
676
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
677
+  #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
678
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
679
+  #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
680
+#endif
681
+
676 682
 // Default mesh area is an area with an inset margin on the print area.
677 683
 // Below are the macros that are used to define the borders for the mesh area,
678 684
 // made available here for specialized needs, ie dual extruder setup.
679 685
 #if ENABLED(MESH_BED_LEVELING)
680
-  #define MESH_MIN_X MESH_INSET
681
-  #define MESH_MAX_X (X_BED_SIZE - (MESH_INSET))
682
-  #define MESH_MIN_Y MESH_INSET
683
-  #define MESH_MAX_Y (Y_BED_SIZE - (MESH_INSET))
686
+  #if ENABLED(DELTA)
687
+    // Probing points may be verified at compile time within the radius
688
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
689
+    // so that may be added to SanityCheck.h in the future.
690
+    #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
691
+    #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
692
+    #define MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
693
+    #define MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
694
+  #elif IS_SCARA
695
+    #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
696
+    #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
697
+    #define MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
698
+    #define MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
699
+  #else
700
+    // Boundaries for Cartesian probing based on set limits
701
+    #if ENABLED(BED_CENTER_AT_0_0)
702
+      #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2)
703
+      #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2)
704
+      #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
705
+      #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
706
+    #else
707
+      #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0))
708
+      #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0))
709
+      #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE))
710
+      #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE))
711
+    #endif
712
+  #endif
684 713
 #elif ENABLED(AUTO_BED_LEVELING_UBL)
685
-  #define UBL_MESH_MIN_X UBL_MESH_INSET
686
-  #define UBL_MESH_MAX_X (X_BED_SIZE - (UBL_MESH_INSET))
687
-  #define UBL_MESH_MIN_Y UBL_MESH_INSET
688
-  #define UBL_MESH_MAX_Y (Y_BED_SIZE - (UBL_MESH_INSET))
714
+  #if ENABLED(DELTA)
715
+    // Probing points may be verified at compile time within the radius
716
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
717
+    // so that may be added to SanityCheck.h in the future.
718
+    #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
719
+    #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
720
+    #define UBL_MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
721
+    #define UBL_MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
722
+  #elif IS_SCARA
723
+    #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
724
+    #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
725
+    #define UBL_MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
726
+    #define UBL_MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
727
+  #else
728
+    // Boundaries for Cartesian probing based on set limits
729
+    #if ENABLED(BED_CENTER_AT_0_0)
730
+      #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2)
731
+      #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2)
732
+      #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
733
+      #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
734
+    #else
735
+      #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0))
736
+      #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0))
737
+      #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE))
738
+      #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE))
739
+    #endif
740
+  #endif
689 741
 
690 742
   // If this is defined, the currently active mesh will be saved in the
691 743
   // current slot on M500.

+ 60
- 8
Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h Bestand weergeven

@@ -673,19 +673,71 @@
673 673
 
674 674
 // @section leveling
675 675
 
676
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
677
+  #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
678
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
679
+  #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
680
+#endif
681
+
676 682
 // Default mesh area is an area with an inset margin on the print area.
677 683
 // Below are the macros that are used to define the borders for the mesh area,
678 684
 // made available here for specialized needs, ie dual extruder setup.
679 685
 #if ENABLED(MESH_BED_LEVELING)
680
-  #define MESH_MIN_X MESH_INSET
681
-  #define MESH_MAX_X (X_BED_SIZE - (MESH_INSET))
682
-  #define MESH_MIN_Y MESH_INSET
683
-  #define MESH_MAX_Y (Y_BED_SIZE - (MESH_INSET))
686
+  #if ENABLED(DELTA)
687
+    // Probing points may be verified at compile time within the radius
688
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
689
+    // so that may be added to SanityCheck.h in the future.
690
+    #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
691
+    #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
692
+    #define MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
693
+    #define MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
694
+  #elif IS_SCARA
695
+    #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
696
+    #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
697
+    #define MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
698
+    #define MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
699
+  #else
700
+    // Boundaries for Cartesian probing based on set limits
701
+    #if ENABLED(BED_CENTER_AT_0_0)
702
+      #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2)
703
+      #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2)
704
+      #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
705
+      #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
706
+    #else
707
+      #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0))
708
+      #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0))
709
+      #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE))
710
+      #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE))
711
+    #endif
712
+  #endif
684 713
 #elif ENABLED(AUTO_BED_LEVELING_UBL)
685
-  #define UBL_MESH_MIN_X UBL_MESH_INSET
686
-  #define UBL_MESH_MAX_X (X_BED_SIZE - (UBL_MESH_INSET))
687
-  #define UBL_MESH_MIN_Y UBL_MESH_INSET
688
-  #define UBL_MESH_MAX_Y (Y_BED_SIZE - (UBL_MESH_INSET))
714
+  #if ENABLED(DELTA)
715
+    // Probing points may be verified at compile time within the radius
716
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
717
+    // so that may be added to SanityCheck.h in the future.
718
+    #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
719
+    #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
720
+    #define UBL_MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
721
+    #define UBL_MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
722
+  #elif IS_SCARA
723
+    #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
724
+    #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
725
+    #define UBL_MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
726
+    #define UBL_MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
727
+  #else
728
+    // Boundaries for Cartesian probing based on set limits
729
+    #if ENABLED(BED_CENTER_AT_0_0)
730
+      #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2)
731
+      #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2)
732
+      #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
733
+      #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
734
+    #else
735
+      #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0))
736
+      #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0))
737
+      #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE))
738
+      #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE))
739
+    #endif
740
+  #endif
689 741
 
690 742
   // If this is defined, the currently active mesh will be saved in the
691 743
   // current slot on M500.

+ 60
- 8
Marlin/src/config/examples/wt150/Configuration_adv.h Bestand weergeven

@@ -673,19 +673,71 @@
673 673
 
674 674
 // @section leveling
675 675
 
676
+#if ENABLED(DELTA) && !defined(DELTA_PROBEABLE_RADIUS)
677
+  #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
678
+#elif IS_SCARA && !defined(SCARA_PRINTABLE_RADIUS)
679
+  #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
680
+#endif
681
+
676 682
 // Default mesh area is an area with an inset margin on the print area.
677 683
 // Below are the macros that are used to define the borders for the mesh area,
678 684
 // made available here for specialized needs, ie dual extruder setup.
679 685
 #if ENABLED(MESH_BED_LEVELING)
680
-  #define MESH_MIN_X MESH_INSET
681
-  #define MESH_MAX_X (X_BED_SIZE - (MESH_INSET))
682
-  #define MESH_MIN_Y MESH_INSET
683
-  #define MESH_MAX_Y (Y_BED_SIZE - (MESH_INSET))
686
+  #if ENABLED(DELTA)
687
+    // Probing points may be verified at compile time within the radius
688
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
689
+    // so that may be added to SanityCheck.h in the future.
690
+    #define MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
691
+    #define MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + MESH_INSET)
692
+    #define MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
693
+    #define MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (MESH_INSET))
694
+  #elif IS_SCARA
695
+    #define MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
696
+    #define MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + MESH_INSET)
697
+    #define MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
698
+    #define MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (MESH_INSET))
699
+  #else
700
+    // Boundaries for Cartesian probing based on set limits
701
+    #if ENABLED(BED_CENTER_AT_0_0)
702
+      #define MESH_MIN_X (max(MESH_INSET, 0) - (X_BED_SIZE) / 2)
703
+      #define MESH_MIN_Y (max(MESH_INSET, 0) - (Y_BED_SIZE) / 2)
704
+      #define MESH_MAX_X (min(X_BED_SIZE - (MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
705
+      #define MESH_MAX_Y (min(Y_BED_SIZE - (MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
706
+    #else
707
+      #define MESH_MIN_X (max(X_MIN_POS + MESH_INSET, 0))
708
+      #define MESH_MIN_Y (max(Y_MIN_POS + MESH_INSET, 0))
709
+      #define MESH_MAX_X (min(X_MAX_POS - (MESH_INSET), X_BED_SIZE))
710
+      #define MESH_MAX_Y (min(Y_MAX_POS - (MESH_INSET), Y_BED_SIZE))
711
+    #endif
712
+  #endif
684 713
 #elif ENABLED(AUTO_BED_LEVELING_UBL)
685
-  #define UBL_MESH_MIN_X UBL_MESH_INSET
686
-  #define UBL_MESH_MAX_X (X_BED_SIZE - (UBL_MESH_INSET))
687
-  #define UBL_MESH_MIN_Y UBL_MESH_INSET
688
-  #define UBL_MESH_MAX_Y (Y_BED_SIZE - (UBL_MESH_INSET))
714
+  #if ENABLED(DELTA)
715
+    // Probing points may be verified at compile time within the radius
716
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
717
+    // so that may be added to SanityCheck.h in the future.
718
+    #define UBL_MESH_MIN_X (X_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
719
+    #define UBL_MESH_MIN_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS) + UBL_MESH_INSET)
720
+    #define UBL_MESH_MAX_X (X_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
721
+    #define UBL_MESH_MAX_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS - (UBL_MESH_INSET))
722
+  #elif IS_SCARA
723
+    #define UBL_MESH_MIN_X (X_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
724
+    #define UBL_MESH_MIN_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS) + UBL_MESH_INSET)
725
+    #define UBL_MESH_MAX_X (X_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
726
+    #define UBL_MESH_MAX_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS - (UBL_MESH_INSET))
727
+  #else
728
+    // Boundaries for Cartesian probing based on set limits
729
+    #if ENABLED(BED_CENTER_AT_0_0)
730
+      #define UBL_MESH_MIN_X (max(UBL_MESH_INSET, 0) - (X_BED_SIZE) / 2)
731
+      #define UBL_MESH_MIN_Y (max(UBL_MESH_INSET, 0) - (Y_BED_SIZE) / 2)
732
+      #define UBL_MESH_MAX_X (min(X_BED_SIZE - (UBL_MESH_INSET), X_BED_SIZE) - (X_BED_SIZE) / 2)
733
+      #define UBL_MESH_MAX_Y (min(Y_BED_SIZE - (UBL_MESH_INSET), Y_BED_SIZE) - (Y_BED_SIZE) / 2)
734
+    #else
735
+      #define UBL_MESH_MIN_X (max(X_MIN_POS + UBL_MESH_INSET, 0))
736
+      #define UBL_MESH_MIN_Y (max(Y_MIN_POS + UBL_MESH_INSET, 0))
737
+      #define UBL_MESH_MAX_X (min(X_MAX_POS - (UBL_MESH_INSET), X_BED_SIZE))
738
+      #define UBL_MESH_MAX_Y (min(Y_MAX_POS - (UBL_MESH_INSET), Y_BED_SIZE))
739
+    #endif
740
+  #endif
689 741
 
690 742
   // If this is defined, the currently active mesh will be saved in the
691 743
   // current slot on M500.

Laden…
Annuleren
Opslaan