My Marlin configs for Fabrikator Mini and CTC i3 Pro B
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

point_t.h 2.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
  4. *
  5. * Based on Sprinter and grbl.
  6. * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
  7. *
  8. * This program is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation, either version 3 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  20. *
  21. */
  22. #ifndef __POINT_T__
  23. #define __POINT_T__
  24. /**
  25. * @brief Cartesian Point
  26. * @details Represents a three dimensional point on Cartesian coordinate system,
  27. * using an additional fourth dimension for the extrusion length.
  28. *
  29. * @param x The x-coordinate of the point.
  30. * @param y The y-coordinate of the point.
  31. * @param z The z-coordinate of the point.
  32. * @param e The e-coordinate of the point.
  33. */
  34. struct point_t {
  35. float x;
  36. float y;
  37. float z;
  38. float e;
  39. /**
  40. * @brief Two dimensional point constructor
  41. *
  42. * @param x The x-coordinate of the point.
  43. * @param y The y-coordinate of the point.
  44. */
  45. point_t(float const x, float const y)
  46. : point_t(x, y, NAN, NAN) {}
  47. /**
  48. * @brief Three dimensional point constructor
  49. *
  50. * @param x The x-coordinate of the point.
  51. * @param y The y-coordinate of the point.
  52. * @param z The z-coordinate of the point.
  53. */
  54. point_t(float const x, float const y, float const z)
  55. : point_t(x, y, z, NAN) {}
  56. /**
  57. * @brief Tree dimensional point constructor with extrusion length
  58. *
  59. * @param x The x-coordinate of the point.
  60. * @param y The y-coordinate of the point.
  61. * @param z The z-coordinate of the point.
  62. * @param e The e-coordinate of the point.
  63. */
  64. point_t(float const x, float const y, float const z, float const e) {
  65. this->x = x;
  66. this->y = y;
  67. this->z = z;
  68. this->e = e;
  69. }
  70. };
  71. #endif // __POINT_T__