This repository has been archived by the owner on Sep 18, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathnodeTolerance.h
138 lines (108 loc) · 4.17 KB
/
nodeTolerance.h
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
//
// Copyright (c) 1991-2018 by STEP Tools Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Author: Samson Bonfante ([email protected])
//
#pragma once
#include <nan.h>
#include <stncapt/Tolerance.h>
#include "nodeAptStepMaker.h"
#include <stncapt/message.h>
class Tolerance : public Nan::ObjectWrap {
private:
static Tolerance* _singleton;
tolerance * _tol;
static NAN_METHOD(New);
static inline Nan::Persistent<v8::Function> & constructor() {
static Nan::Persistent<v8::Function> my_constructor;
return my_constructor;
}
~Tolerance() { delete _tol; };
Tolerance() {
report_via_printf();
_tol = new tolerance(AptStepMaker::getApt());
};
public:
static NAN_MODULE_INIT(Init);
//int[] GetDatumFaceAll()
static NAN_METHOD(GetDatumFaceAll);
//char * GetDatumLabel()
static NAN_METHOD(GetDatumLabel);
// string GetFaceMeasureGeometryType(int face_id)
static NAN_METHOD(GetFaceMeasureGeometryType);
//string[] GetProbeResults()
static NAN_METHOD(GetProbeResults);
//int GetToleranceAllCount()
static NAN_METHOD(GetToleranceAllCount);
//int GetToleranceAllNext(int index)
static NAN_METHOD(GetToleranceAllNext);
//New Function for NodeJS using GetToleranceAllCount and GetToleranceAllNext
static NAN_METHOD(GetToleranceAll);
//char *[] GetToleranceDatumAll(int id)
static NAN_METHOD(GetToleranceDatumAll);
// int[] GetToleranceFaceAll()
static NAN_METHOD(GetToleranceFaceAll);
// int[] GetToleranceMeasuredAll()
static NAN_METHOD(GetToleranceMeasuredAll);
// double GetToleranceMeasuredVaule(int tol_id);
static NAN_METHOD(GetToleranceMeasuredValue);
//{lower:double,upper:double} GetToleranceMeasuredLowerUpperValue(int tol_id);
static NAN_METHOD(GetToleranceMeasuredLowerUpperValue);
// char[] GetToleranceModifierAll()
static NAN_METHOD(GetToleranceModifierAll);
// bool GetTolerancePlusMinus(int TolId)
static NAN_METHOD(GetTolerancePlusMinus);
// string GetToleranceStatus(int TolId)
static NAN_METHOD(GetToleranceStatus); //TODO: IMPLEMENT ME tolerance_status (int tol_id, const char * &grade);
//string GetToleranceType(int TolId)
static NAN_METHOD(GetToleranceType);
//string GetToleranceUnit(int TolId)
static NAN_METHOD(GetToleranceUnit);
//double GetToleranceValue(int TolId)
static NAN_METHOD(GetToleranceValue);
//int[] GetWorkingstepToleranceAll(int ws)
static NAN_METHOD(GetWorkingstepToleranceAll);
//int GetWorkpieceOfTolerance(int wp_id)
static NAN_METHOD(GetWorkpieceOfTolerance);
//int[] GetWorkpieceToleranceAll(int wp_id)
static NAN_METHOD(GetWorkpieceToleranceAll);
//int[] GetWorkpieceDatumAllAll(int dat_id)
static NAN_METHOD(GetWorkpieceDatumAllAll);
//int[] NavigateToleranceToWorkingstepAll(int TolId)
static NAN_METHOD(NavigateToleranceToWorkingstepAll);
//int ReportProbeResult(string feature_uuid, int order, int count, double x, double y, double z)
static NAN_METHOD(ReportProbeResult);
//void ResetAllToleranceMeasuredValue()
static NAN_METHOD(ResetAllToleranceMeasuredValue);
//void SetToleranceMeasuredValue(string tolUUID, double val)
static NAN_METHOD(SetToleranceMeasuredValue);
/*void WorkpiecePlacementUsingFaces(
int wp_id,
int face1a_id,
int face1b_id,
int face1c_id,
int face2a_id,
int face2b_id,
int face2c_id
)*/
static NAN_METHOD(WorkpiecePlacementUsingFaces);
/*void WorkplanSetupPlacementUsingFaces(
int plan_id,
int faceA_id,
int faceB_id,
int faceC_id
)*/
static NAN_METHOD(WorkplanSetupPlacementUsingFaces);
};