-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathother.go
39 lines (33 loc) · 949 Bytes
/
other.go
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
package nest
import (
"errors"
"fmt"
"log"
)
var WithoutBinErr error = errors.New("bin 未设置")
var WithoutPartsErr error = errors.New("parts 未设置")
var CanNotPutErr error = errors.New("材料摆放不下")
var InvalidPoly error = errors.New("存在 不合法part")
func op_Equality(a, b int64) bool {
return a == b
}
func Int128Mul(a, b int64) int64 {
return a * b
}
func (this *ClipperStruct) Check(AllMinimaList string) {
var AllMinimaListGo = ""
for b := this.m_MinimaList; b != nil; b = b.Next {
AllMinimaListGo = AllMinimaListGo + fmt.Sprintf("%d", b.Y)
}
if AllMinimaListGo != AllMinimaList {
log.Println("AllMinimaListGo!=AllMinimaList")
panic("AllMinimaListGo!=AllMinimaList")
}
}
func (this *ClipperStruct) SortedEdges() string {
var AllMinimaListGo = ""
for b := this.m_SortedEdges; b != nil; b = b.NextInSEL {
AllMinimaListGo = AllMinimaListGo + fmt.Sprintf("%d", b.Curr.X)
}
return AllMinimaListGo
}