mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-29 05:42:33 +00:00
SPE-2298: Fix crash caused by a numerical issue during testing if a Voronoi vertex is inside a corner of a polygon.
Cherry-picked from prusa3d/PrusaSlicer@669c931b77 Co-authored-by: Lukáš Hejl <hejl.lukas@gmail.com>
This commit is contained in:
@@ -545,6 +545,23 @@ inline bool is_rotation_ninety_degrees(const Vec3d &rotation)
|
||||
}
|
||||
|
||||
Transformation mat_around_a_point_rotate(const Transformation& innMat, const Vec3d &pt, const Vec3d &axis, float rotate_theta_radian);
|
||||
|
||||
/**
|
||||
* Checks if a given point is inside a corner of a polygon.
|
||||
*
|
||||
* The corner of a polygon is defined by three points A, B, C in counterclockwise order.
|
||||
*
|
||||
* Adapted from CuraEngine LinearAlg2D::isInsideCorner by Tim Kuipers @BagelOrb
|
||||
* and @Ghostkeeper.
|
||||
*
|
||||
* @param a The first point of the corner.
|
||||
* @param b The second point of the corner (the common vertex of the two edges forming the corner).
|
||||
* @param c The third point of the corner.
|
||||
* @param query_point The point to be checked if is inside the corner.
|
||||
* @return True if the query point is inside the corner, false otherwise.
|
||||
*/
|
||||
bool is_point_inside_polygon_corner(const Point &a, const Point &b, const Point &c, const Point &query_point);
|
||||
|
||||
} } // namespace Slicer::Geometry
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user