Tech ENABLE_OUT_OF_BED_DETECTION_IMPROVEMENTS - Enable detection of collision with circular printbed for toolpaths

This commit is contained in:
enricoturri1966 2021-09-30 12:08:05 +02:00
parent 448911df9f
commit 7cfe082621
4 changed files with 79 additions and 41 deletions

View file

@ -41,6 +41,11 @@ enum ModelInstanceEPrintVolumeState : unsigned char;
// Return appropriate color based on the ModelVolume.
std::array<float, 4> color_from_model_volume(const ModelVolume& model_volume);
#if ENABLE_OUT_OF_BED_DETECTION_IMPROVEMENTS
// return the state of given object volume (extrusion along z of obj_hull_2d by obj_height)
// with respect to the given print volume (extrusion along z of printbed_shape by print_volume_height)
ModelInstanceEPrintVolumeState printbed_collision_state(const Polygon& printbed_shape, double print_volume_height, const Polygon& obj_hull_2d, double obj_min_z, double obj_max_z);
#endif // ENABLE_OUT_OF_BED_DETECTION_IMPROVEMENTS
// A container for interleaved arrays of 3D vertices and normals,
// possibly indexed by triangles and / or quads.