/
NodePointProcess.cs
106 lines (97 loc) · 2.21 KB
/
NodePointProcess.cs
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
/*
* Created by SharpDevelop.
* User: frolkinak
* Date: 25.06.2014
* Time: 14:23
*
* To change this template use Tools | Options | Coding | Edit Standard Headers.
*/
using System;
using System.Collections.Generic;
namespace eulerMake
{
/// <summary>
/// Description of NodePointProcess.
/// </summary>
public class NodePointProcess
{
bool isUsed;
//bool isPriority;
//bool isNumber;
//bool isBlank;
int curNumber;
int priority;
int nodeNumber;
public NodePointProcess( NodePoint inNode, bool inUsed)//int inNumber, int inPrior
{
curNumber = inNode.number;
priority = inNode.priority;
nodeNumber = inNode.numberNode;
isUsed = inUsed;
}
public NodePointProcess( int inNumber, int inPrior, int inNodeNumb, bool inUsed)//int inNumber, int inPrior
{
curNumber = inNumber;
priority = inPrior;
nodeNumber = inNodeNumb;
isUsed = inUsed;
}
public virtual void ProcessPoint(NodePoint inPoint)
{
//if (isSetUnused)
// inPoint.isUsed = false;
//if (isNumber)
inPoint.number = curNumber;
inPoint.isUsed = isUsed;
inPoint.priority = priority;
inPoint.numberNode = nodeNumber;
//if (isUsed)
// inPoint.isReplace = false;
}
public void IncrementNumber()
{
curNumber++;
}
}
public class ReplaceUnused : NodePointProcess
{
public ReplaceUnused(NodePoint inNode, bool inUsed) : base(inNode, inUsed)
{
}
public override void ProcessPoint(NodePoint inPoint)
{
if (!inPoint.isUsed)
{
inPoint.isReplace = true;
inPoint.name = Material.blankName;
inPoint.number = -1;
inPoint.priority = 0;
inPoint.numberNode = 0;
}
}
}
public class BestPointParams
{
//private List<int> layers;
public List<NodePointLayer> points;
}
public class BestPointSet
{
public BestPointSet(NodePointLayer inPoint, int inLayer, bool inOneLayer)
{
point = inPoint;
layer = inLayer;
isOneLayer = inOneLayer;
}
public BestPointSet(BestPointSet inBest)
{
point = new NodePointLayer(inBest.point, inBest.point.layer);
layer = inBest.layer;
isOneLayer = inBest.isOneLayer;
}
//private List<int> layers;
public NodePointLayer point;
public bool isOneLayer;
public int layer;
}
}