-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstep_processing.py
128 lines (81 loc) · 2.63 KB
/
step_processing.py
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
#import numpy as np
#import os
#from step_parser import *
#from CAD_processVstep import *
#from CAD_kernel import *
import sys
sys.path.append("/home/rejish/PhD/project/NSPCC/NSPCC_reader")
from step_reader import *
#from face_reader import *
#from eval_connection import *
#import sys
#import h5py
from read_writeh5 import *
name1 = "testing_ownM.stp"
#name1="m6.stp"
#name1="ubend_1.stp"
#name1="ubend_0-5.stp"
#name1="ubend_1-0-1-1.stp"
#name1 ="ubend_4-6.stp"
#name1="ubend_4.stp"
#name1="ubend_6.stp"
#name1="halfcylinder.stp"
#name1="sbend.stp"
#name1='testing_ownS.stp'
#name1='half_S.stp'
#name1='Final_S.stp'
#name1 = 'ubend.stp'
#name1='main2.stp'
#degree_u, degree_v, Mu, Mv, knots_u, knots_v, all_CP = step_read(name1, details=False)
#print all_CP
#name1 = 'M6_CADopt.stp'
#name1 = 'testing_new.stp'
#degree, edge_mulu, edge_knots, all_edges = step_edgeRead(name1)
#print 'edges', all_edges
#name1 = "testing_own07.stp"
#print ' '
#print len(all_edges[1])
#print len(all_edges[0])
patch_type, degree_u, degree_v,mul_u, mul_v, knots_u, knots_v, all_CP = step_surfaceRead(name1)
print 'hi', degree_u
no_of_patch = len(all_CP)
patch1 = all_CP
print all_CP
get = create_NSPCCBRep(degree_u, degree_v,mul_u, knots_u, mul_v, knots_v, all_CP)
ID1 = -1
ID2 = -1
connecting = []
#print all_CP[0]
#patchID = ['12','13']
#get = get_step(patchID, name1, 1, degree_u, deg/ree_v, mul_u, mul_v, knots_u, knots_v, all_CP)
#free_patch = [0, 1, 3, 6]
free_patch = [0]
#print 'surface' , all_CP
#print 'number of patch', len(all_CP)
#print all_CP
#print all_CP
#print all_CP[1]
#design_type,degree_ud, degree_vd, Mud, Mvd, knots_ud, knots_vd, all_CPd = design_patch(patch_type, degree_u, degree_v, mul_u, mul_v, knots_u, knots_v, all_CP, free_patch)
#get = get_patchCon(all_CP, design_type ,details=True)
name11 = 'new_s.stp'
name22 = '/home/rejish/Reya_sep29/test/'+name11
no_of_axis = 1
#get = step_writer(name11, name22, no_of_axis, degree_u, degree_v, mul_u, mul_v, knots_u, knots_v, all_CP)
'''
p = 0
print degree_u
print np.size(all_CP[p])
get = get_edge(degree_u[p], degree_v[p], Mu[p], Mv[p], knots_u[p], knots_v[p], all_CP[p])
print ' Edge of single patch', len(get)
a = get[0]
print a[0]
com = eval_compare_patch(all_CP[3], all_CP[11])
'''
#check = connecting_patch(degree_u, degree_v, Mu, Mv, knots_u, knots_v, all_CP)
'''
6#patchID = [0,1,2,3,4,5,6,7,8,9,10,11,12,13]
patchID = [0,5]
#split = split_step(patchID, name1, 1, degree_u, degree_v, Mu, Mv, knots_u, knots_v, all_CP )
patchID = ['1','5']
get = get_step(patchID, name1, 1, degree_u, degree_v, Mu, Mv, knots_u, knots_v, all_CP)
'''