mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-14 10:17:55 -06:00
Minor improvement to IntersectionLine (now subclasses Line)
This commit is contained in:
parent
39172d5a08
commit
d4ae734659
2 changed files with 4 additions and 7 deletions
|
@ -614,10 +614,8 @@ TriangleMeshSlicer::slice_facet(float slice_z, const stl_facet &facet, const int
|
||||||
if (!points.empty()) {
|
if (!points.empty()) {
|
||||||
assert(points.size() == 2); // facets must intersect each plane 0 or 2 times
|
assert(points.size() == 2); // facets must intersect each plane 0 or 2 times
|
||||||
IntersectionLine line;
|
IntersectionLine line;
|
||||||
line.a.x = points[1].x;
|
line.a = (Point)points[1];
|
||||||
line.a.y = points[1].y;
|
line.b = (Point)points[0];
|
||||||
line.b.x = points[0].x;
|
|
||||||
line.b.y = points[0].y;
|
|
||||||
line.a_id = points[1].point_id;
|
line.a_id = points[1].point_id;
|
||||||
line.b_id = points[0].point_id;
|
line.b_id = points[0].point_id;
|
||||||
line.edge_a_id = points[1].edge_id;
|
line.edge_a_id = points[1].edge_id;
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#include <admesh/stl.h>
|
#include <admesh/stl.h>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include "BoundingBox.hpp"
|
#include "BoundingBox.hpp"
|
||||||
|
#include "Line.hpp"
|
||||||
#include "Point.hpp"
|
#include "Point.hpp"
|
||||||
#include "Polygon.hpp"
|
#include "Polygon.hpp"
|
||||||
#include "ExPolygon.hpp"
|
#include "ExPolygon.hpp"
|
||||||
|
@ -71,11 +72,9 @@ class IntersectionPoint : public Point
|
||||||
IntersectionPoint() : point_id(-1), edge_id(-1) {};
|
IntersectionPoint() : point_id(-1), edge_id(-1) {};
|
||||||
};
|
};
|
||||||
|
|
||||||
class IntersectionLine
|
class IntersectionLine : public Line
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Point a;
|
|
||||||
Point b;
|
|
||||||
int a_id;
|
int a_id;
|
||||||
int b_id;
|
int b_id;
|
||||||
int edge_a_id;
|
int edge_a_id;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue