-
-
Notifications
You must be signed in to change notification settings - Fork 919
Expand file tree
/
Copy pathpath_ordering.cpp
More file actions
59 lines (49 loc) · 1.56 KB
/
path_ordering.cpp
File metadata and controls
59 lines (49 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// Copyright (c) 2023 UltiMaker
// CuraEngine is released under the terms of the AGPLv3 or higher.
#include "path_ordering.h" //The definitions we're implementing here.
#include "WallToolPaths.h"
#include "geometry/OpenPolyline.h"
#include "sliceDataStorage.h" //For SliceLayerPart.
namespace cura
{
template<typename PathType>
const Polyline& PathOrdering<PathType>::getVertexData()
{
return *vertices_;
}
template<>
const Polyline& PathOrdering<const SkinPart*>::getVertexData()
{
return vertices_->outline.outerPolygon();
}
template<>
const Polyline& PathOrdering<const SliceLayerPart*>::getVertexData()
{
return vertices_->outline.outerPolygon();
}
template<>
const Polyline& PathOrdering<SliceLayerPart*>::getVertexData()
{
return vertices_->outline.outerPolygon();
}
template<>
const Polyline& PathOrdering<const SupportInfillPart*>::getVertexData()
{
return vertices_->outline_.outerPolygon();
}
template<>
const Polyline& PathOrdering<const ExtrusionLine*>::getVertexData()
{
if (! cached_vertices_.has_value())
{
cached_vertices_ = vertices_->toPolygon();
}
return *cached_vertices_;
}
template const Polyline& PathOrdering<Polygon*>::getVertexData();
template const Polyline& PathOrdering<Polygon const*>::getVertexData();
template const Polyline& PathOrdering<const OpenPolyline*>::getVertexData();
template const Polyline& PathOrdering<OpenPolyline*>::getVertexData();
template const Polyline& PathOrdering<ClosedPolyline*>::getVertexData();
template const Polyline& PathOrdering<Polyline const*>::getVertexData();
} // namespace cura