mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-13 21:06:00 +08:00
Merge branch 'lm_seq_models'
This commit is contained in:
commit
227fce631a
@ -66,6 +66,14 @@
|
||||
{
|
||||
"height": "7",
|
||||
"type": "convex",
|
||||
"polygons": [
|
||||
"-48,-15; 24,-15; 24,66; -48,66",
|
||||
"-37,-47; 40,-47; 40,21; -37,21"
|
||||
]
|
||||
},
|
||||
{
|
||||
"height": "32",
|
||||
"type": "convex",
|
||||
"polygons": [
|
||||
"-49,7; 27,7; 27,83; -49,83",
|
||||
"-42,-46; 40,-46; 40,14; -42,14"
|
||||
@ -192,14 +200,14 @@
|
||||
"type": "convex",
|
||||
"polygons": [
|
||||
"-10,-47;34,-47;34,16;-10,16",
|
||||
"-34,13;32,13;32,67;-34,67"
|
||||
"-43,11;28,11;28,66;-43,66"
|
||||
]
|
||||
},
|
||||
{
|
||||
"height": "23",
|
||||
"type": "convex",
|
||||
"polygons": [
|
||||
"-42,11;32,11;32,66;-42,66",
|
||||
"-43,11;28,11;28,66;-43,66",
|
||||
"-33,-37;43,-37;43,18;-33,18",
|
||||
"-13,-68;47,-68;47,-30;-13,-30"
|
||||
]
|
||||
@ -208,7 +216,7 @@
|
||||
"height": "19",
|
||||
"type": "box",
|
||||
"polygons": [
|
||||
"-400,24;400,24;400,50;-400,50"
|
||||
"-400,24;400,24;400,59;-400,59"
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -263,7 +271,7 @@
|
||||
"height": "33",
|
||||
"type": "box",
|
||||
"polygons": [
|
||||
"-300,-49; 300,-49; 300,-24; -300,-24"
|
||||
"-300,-49; 300,-49; 300,-19; -300,-19"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
Binary file not shown.
Binary file not shown.
@ -470,6 +470,15 @@ Slic3r::Polygon scaleUp_PolygonForSlicer(coord_t scale_factor, const Polygon &po
|
||||
}
|
||||
|
||||
|
||||
Slic3r::Polygon truncate_PolygonAsSeenBySequentialSolver(coord_t scale_factor, const Slic3r::Polygon &polygon)
|
||||
{
|
||||
Slic3r::Polygon scale_down_polygon = scaleDown_PolygonForSequentialSolver(scale_factor, polygon);
|
||||
Slic3r::Polygon scale_up_polygon = scaleUp_PolygonForSlicer(scale_factor, scale_down_polygon);
|
||||
|
||||
return scale_up_polygon;
|
||||
}
|
||||
|
||||
|
||||
void ground_PolygonByBoundingBox(Slic3r::Polygon &polygon)
|
||||
{
|
||||
BoundingBox polygon_box = get_extents(polygon);
|
||||
@ -610,9 +619,30 @@ void decimate_PolygonForSequentialSolver(double DP_tolerance,
|
||||
{
|
||||
if (extra_safety)
|
||||
{
|
||||
grow_PolygonForContainedness(center_x, center_y, decimated_polygon);
|
||||
Slic3r::Polygon prefinal_polygon = decimated_polygon;
|
||||
|
||||
while (true)
|
||||
{
|
||||
grow_PolygonForContainedness(center_x, center_y, decimated_polygon);
|
||||
Slic3r::Polygon truncated_polygon = truncate_PolygonAsSeenBySequentialSolver(SEQ_SLICER_SCALE_FACTOR, decimated_polygon);
|
||||
|
||||
bool trunc_contains = true;
|
||||
for (unsigned int i = 0; i < prefinal_polygon.points.size(); ++i)
|
||||
{
|
||||
if (!Slic3r::contains(truncated_polygon, prefinal_polygon.points[i], false))
|
||||
{
|
||||
trunc_contains = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (trunc_contains)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -108,6 +108,8 @@ Slic3r::Polygon scaleUp_PolygonForSlicer(coord_t scale_factor, const Slic3r::Pol
|
||||
Slic3r::Polygon scaleUp_PolygonForSlicer(const Slic3r::Polygon &polygon, double x_pos, double y_pos);
|
||||
Slic3r::Polygon scaleUp_PolygonForSlicer(coord_t scale_factor, const Slic3r::Polygon &polygon, double x_pos, double y_pos);
|
||||
|
||||
Slic3r::Polygon truncate_PolygonAsSeenBySequentialSolver(coord_t scale_factor, const Slic3r::Polygon &polygon);
|
||||
|
||||
void ground_PolygonByBoundingBox(Slic3r::Polygon &polygon);
|
||||
void ground_PolygonByFirstPoint(Slic3r::Polygon &polygon);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user