Surface.py
Go to the documentation of this file.
1 # Una superficie e' un poligono atomico che non puo' essere scomposto nelle sue parti.
2 # L'unione di piu' superfici forma uno spazio.
3 
4 from __future__ import division
5 import object.Segment as sg
6 
7 
8 # oggetto di tipo Faccia, ha come attributo una lista di edges che formano un poligono chiuso.
9 # La dimensione della lista e' >3.
10 
11 class Cell(object):
12  def __init__(self, edges):
13  self.borders = edges
14  self.out = None
15  self.partial = None
16 
17  def set_out(self, o):
18  self.out = o
19 
20  def set_partial(self, p):
21  self.partial = p
22 
23 
24 def create_cells(edges):
25  # create faces as closed chain of adjacent edges
26  faces = []
27  face = create_3_faces(faces, edges)
28  while face:
29  face = create_3_faces(faces, edges)
30  face = create_4_faces(faces, edges)
31  while face:
32  face = create_4_faces(faces, edges)
33  face = create_5_faces(faces, edges)
34  while face:
35  face = create_5_faces(faces, edges)
36  face = create_6_faces(faces, edges)
37  while face:
38  face = create_6_faces(faces, edges)
39  face = create_7_faces(faces, edges)
40  while face:
41  face = create_7_faces(faces, edges)
42  return faces
43 
44 
45 def create_3_faces(faces, edges):
46  # if find a faces of 3 side not already present in faces, create it and add it to faces and return True.
47  boards = []
48  remaining_edges = []
49  # list of all edges associated to less than 2 faces, still good to create a face.
50  for edge in edges:
51  if edge.num_faces < 2:
52  remaining_edges.append(edge)
53  for edge in remaining_edges:
54  x1 = edge.x1
55  y1 = edge.y1
56  x2 = edge.x2
57  y2 = edge.y2
58  common_x_edge = x1
59  common_y_edge = y1
60  adjacent = sg.adjacent_edges(common_x_edge, common_y_edge, edge, remaining_edges)
61  # edges that have as extreme point x1,y1 and m different from edge
62  for a in adjacent:
63  x3 = a.x1
64  y3 = a.y1
65  x4 = a.x2
66  y4 = a.y2
67  # if there is already face with these 2 side stop and search another adjacent.
68  if face_exist(edge, a, faces):
69  break
70  # check edge that have as extreme the one different from previous one
71  if (x3 == common_x_edge) and (y3 == common_y_edge):
72  common_x_a = x4
73  common_y_a = y4
74  adjacent2 = sg.adjacent_edges(common_x_a, common_y_a, a, remaining_edges)
75  else:
76  common_x_a = x3
77  common_y_a = y3
78  adjacent2 = sg.adjacent_edges(common_x_a, common_y_a, a, remaining_edges)
79  for b in adjacent2:
80  x5 = b.x1
81  y5 = b.y1
82  x6 = b.x2
83  y6 = b.y2
84  if (x5 == common_x_a) and (y5 == common_y_a):
85  # it could be a face of 3 side, check if returned to coordinates of first edge.
86  if (x6 == x2) and (y6 == y2):
87  boards.extend((edge, a, b))
88  face = Cell(boards)
89  if not (check_belonging(face, faces)):
90  edge.num_faces += 1
91  a.num_faces += 1
92  b.num_faces += 1
93  faces.append(face)
94  return True
95  else:
96  del boards[:]
97  else:
98  # it could be a face of 3 side, check if returned to coordinates of first edge.
99  if (x5 == x2) and (y5 == y2):
100  boards.extend((edge, a, b))
101  face = Cell(boards)
102  if not (check_belonging(face, faces)):
103  edge.num_faces += 1
104  a.num_faces += 1
105  b.num_faces += 1
106  faces.append(face)
107  return True
108  else:
109  del boards[:]
110  return False
111 
112 
113 def create_4_faces(faces, edges):
114  # if find a faces of 4 side not already present in faces, create it and add it to faces and return True.
115 
116  boards = []
117  remaining_edges = []
118  # list of all edges associated to less than 2 faces, still good to create a face.
119  for edge in edges:
120  if edge.num_faces < 2:
121  remaining_edges.append(edge)
122  for edge in remaining_edges:
123  x1 = edge.x1
124  y1 = edge.y1
125  x2 = edge.x2
126  y2 = edge.y2
127  common_x_edge = x1
128  common_y_edge = y1
129  adjacent = sg.adjacent_edges(common_x_edge, common_y_edge, edge, remaining_edges)
130  # edges that have as extreme point x1,y1 and m different from edge
131  for a in adjacent:
132  x3 = a.x1
133  y3 = a.y1
134  x4 = a.x2
135  y4 = a.y2
136  # check edge that have as extreme the one different from previous one
137  if face_exist(edge, a, faces):
138  break
139  if (x3 == common_x_edge) and (y3 == common_y_edge):
140  common_x_a = x4
141  common_y_a = y4
142  adjacent2 = sg.adjacent_edges(common_x_a, common_y_a, a, remaining_edges)
143  else:
144  common_x_a = x3
145  common_y_a = y3
146  adjacent2 = sg.adjacent_edges(common_x_a, common_y_a, a, remaining_edges)
147  for b in adjacent2:
148  x5 = b.x1
149  y5 = b.y1
150  x6 = b.x2
151  y6 = b.y2
152  if (x5 == common_x_a) and (y5 == common_y_a):
153  # it could be a face of 3 side, check if returned to coordinates of first edge.
154  if (x6 == x2) and (y6 == y2):
155  adjacent3 = []
156  # choose another b of previous for loop
157  # if a face of 3 side is not closed.
158  else:
159  common_x_b = x6
160  common_y_b = y6
161  adjacent3 = sg.adjacent_edges(common_x_b, common_y_b, b, remaining_edges)
162  else:
163  # it could be a face of 3 side, check if returned to coordinates of first edge.
164  if (x5 == x2) and (y5 == y2):
165  adjacent3 = []
166  # if a face of 3 side is not closed.
167  else:
168  common_x_b = x5
169  common_y_b = y5
170  adjacent3 = sg.adjacent_edges(common_x_b, common_y_b, b, remaining_edges)
171  for c in adjacent3:
172  x7 = c.x1
173  y7 = c.y1
174  x8 = c.x2
175  y8 = c.y2
176  if (x7 == common_x_b) and (y7 == common_y_b):
177  # it could be a face of 4 side, check if returned to coordinates of first edge.
178  if (x8 == x2) and (y8 == y2):
179  boards.extend((edge, a, b, c))
180  face = Cell(boards)
181  if not (check_belonging(face, faces)):
182  edge.num_faces += 1
183  a.num_faces += 1
184  b.num_faces += 1
185  c.num_faces += 1
186  faces.append(face)
187  return True
188  else:
189  del boards[:]
190  else:
191  # it could be a face of 4 side, check if returned to coordinates of first edge.
192  if (x7 == x2) and (y7 == y2):
193  boards.extend((edge, a, b, c))
194  face = Cell(boards)
195  if not (check_belonging(face, faces)):
196  edge.num_faces += 1
197  a.num_faces += 1
198  b.num_faces += 1
199  c.num_faces += 1
200  faces.append(face)
201  return True
202  else:
203  del boards[:]
204  return False
205 
206 
207 def create_5_faces(faces, edges):
208  # if find a faces of 5 side not already present in faces, create it and add it to faces and return True.
209  boards = []
210  remaining_edges = []
211  # list of all edges associated to less than 2 faces, still good to create a face.
212  for edge in edges:
213  if edge.num_faces < 2:
214  remaining_edges.append(edge)
215  for edge in remaining_edges:
216  x1 = edge.x1
217  y1 = edge.y1
218  x2 = edge.x2
219  y2 = edge.y2
220  common_x_edge = x1
221  common_y_edge = y1
222  adjacent = sg.adjacent_edges(common_x_edge, common_y_edge, edge, remaining_edges)
223  # edges that have as extreme point x1,y1 and m different from edge
224  for a in adjacent:
225  x3 = a.x1
226  y3 = a.y1
227  x4 = a.x2
228  y4 = a.y2
229  # check edge that have as extreme the one different from previous one
230  if face_exist(edge, a, faces):
231  break
232  if (x3 == common_x_edge) and (y3 == common_y_edge):
233  common_x_a = x4
234  common_y_a = y4
235  adjacent2 = sg.adjacent_edges(common_x_a, common_y_a, a, remaining_edges)
236  else:
237  common_x_a = x3
238  common_y_a = y3
239  adjacent2 = sg.adjacent_edges(common_x_a, common_y_a, a, remaining_edges)
240  for b in adjacent2:
241  x5 = b.x1
242  y5 = b.y1
243  x6 = b.x2
244  y6 = b.y2
245  if (x5 == common_x_a) and (y5 == common_y_a):
246  # it could be a face of 3 side, check if returned to coordinates of first edge.
247  if (x6 == x2) and (y6 == y2):
248  adjacent3 = []
249  # choose another b of previous for loop
250  # if a face of 3 side is not closed.
251  else:
252  common_x_b = x6
253  common_y_b = y6
254  adjacent3 = sg.adjacent_edges(common_x_b, common_y_b, b, remaining_edges)
255  else:
256  # it could be a face of 3 side, check if returned to coordinates of first edge.
257  if (x5 == x2) and (y5 == y2):
258  adjacent3 = []
259  # if a face of 3 side is not closed.
260  else:
261  common_x_b = x5
262  common_y_b = y5
263  adjacent3 = sg.adjacent_edges(common_x_b, common_y_b, b, remaining_edges)
264  for c in adjacent3:
265  x7 = c.x1
266  y7 = c.y1
267  x8 = c.x2
268  y8 = c.y2
269  if (x7 == common_x_b) and (y7 == common_y_b):
270  # it could be a face of 4 side, check if returned to coordinates of first edge.
271  if (x8 == x2) and (y8 == y2):
272  adjacent4 = []
273  # if a face of 4 side is not closed.
274  else:
275  common_x_c = x8
276  common_y_c = y8
277  adjacent4 = sg.adjacent_edges(common_x_c, common_y_c, c, remaining_edges)
278  else:
279  # it could be a face of 4 side, check if returned to coordinates of first edge.
280  if (x7 == x2) and (y7 == y2):
281  adjacent4 = []
282  # if a face of 4 side is not closed.
283  else:
284  common_x_c = x7
285  common_y_c = y7
286  adjacent4 = sg.adjacent_edges(common_x_c, common_y_c, c, remaining_edges)
287  for d in adjacent4:
288  x9 = d.x1
289  y9 = d.y1
290  x10 = d.x2
291  y10 = d.y2
292  if (x9 == common_x_c) and (y9 == common_y_c):
293  # it could be a face of 5 side, check if returned to coordinates of first edge.
294  if (x10 == x2) and (y10 == y2) and (d != edge):
295  boards.extend((edge,a,b,c,d))
296  face = Cell(boards)
297  if not (check_belonging(face, faces)):
298  edge.num_faces += 1
299  a.num_faces += 1
300  b.num_faces += 1
301  c.num_faces += 1
302  d.num_faces += 1
303  faces.append(face)
304  return True
305  else:
306  del boards[:]
307  else:
308  # it could be a face of 5 side, check if returned to coordinates of first edge.
309  if (x9 == x2) and (y9 == y2) and (d != edge):
310  boards.extend((edge, a, b, c, d))
311  face = Cell(boards)
312  if not (check_belonging(face, faces)):
313  edge.num_faces += 1
314  a.num_faces += 1
315  b.num_faces += 1
316  c.num_faces += 1
317  d.num_faces += 1
318  faces.append(face)
319  return True
320  else:
321  del boards[:]
322  return False
323 
324 
325 def create_6_faces(faces, edges):
326  # if find a faces of 5 side not already present in faces, create it and add it to faces and return True.
327  boards = []
328  remaining_edges = []
329  # list of all edges associated to less than 2 faces, still good to create a face.
330  for edge in edges:
331  if edge.num_faces < 2:
332  remaining_edges.append(edge)
333  for edge in remaining_edges:
334  x1 = edge.x1
335  y1 = edge.y1
336  x2 = edge.x2
337  y2 = edge.y2
338  common_x_edge = x1
339  common_y_edge = y1
340  adjacent = sg.adjacent_edges(common_x_edge, common_y_edge, edge, remaining_edges)
341  # edges that have as extreme point x1,y1 and m different from edge
342  for a in adjacent:
343  x3 = a.x1
344  y3 = a.y1
345  x4 = a.x2
346  y4 = a.y2
347  # check edge that have as extreme the one different from previous one
348  if face_exist(edge, a, faces):
349  break
350  if (x3 == common_x_edge) and (y3 == common_y_edge):
351  common_x_a = x4
352  common_y_a = y4
353  adjacent2 = sg.adjacent_edges(common_x_a, common_y_a, a, remaining_edges)
354  else:
355  common_x_a = x3
356  common_y_a = y3
357  adjacent2 = sg.adjacent_edges(common_x_a, common_y_a, a, remaining_edges)
358  for b in adjacent2:
359  x5 = b.x1
360  y5 = b.y1
361  x6 = b.x2
362  y6 = b.y2
363  if (x5 == common_x_a) and (y5 == common_y_a):
364  # it could be a face of 3 side, check if returned to coordinates of first edge.
365  if (x6==x2) and (y6==y2):
366  adjacent3 = []
367  # choose another b of previous for loop
368  # if a face of 3 side is not closed.
369  else:
370  common_x_b = x6
371  common_y_b = y6
372  adjacent3 = sg.adjacent_edges(common_x_b, common_y_b, b, remaining_edges)
373  else:
374  # it could be a face of 3 side, check if returned to coordinates of first edge.
375  if (x5 == x2) and (y5 == y2):
376  adjacent3 = []
377  # if a face of 3 side is not closed.
378  else:
379  common_x_b = x5
380  common_y_b = y5
381  adjacent3 = sg.adjacent_edges(common_x_b, common_y_b, b, remaining_edges)
382  for c in adjacent3:
383  x7 = c.x1
384  y7 = c.y1
385  x8 = c.x2
386  y8 = c.y2
387  if (x7 == common_x_b) and (y7 == common_y_b):
388  # it could be a face of 4 side, check if returned to coordinates of first edge.
389  if (x8 == x2) and (y8 == y2):
390  adjacent4 = []
391  # if a face of 4 side is not closed.
392  else:
393  common_x_c = x8
394  common_y_c = y8
395  adjacent4 = sg.adjacent_edges(common_x_c, common_y_c, c, remaining_edges)
396  else:
397  # it could be a face of 4 side, check if returned to coordinates of first edge.
398  if (x7 == x2) and (y7 == y2):
399  adjacent4 = []
400  # if a face of 4 side is not closed.
401  else:
402  common_x_c = x7
403  common_y_c = y7
404  adjacent4 = sg.adjacent_edges(common_x_c, common_y_c, c, remaining_edges)
405  for d in adjacent4:
406  x9 = d.x1
407  y9 = d.y1
408  x10 = d.x2
409  y10 = d.y2
410  if (x9 == common_x_c) and (y9 == common_y_c):
411  # it could be a face of 5 side, check if returned to coordinates of first edge.
412  if (x10 == x2) and (y10 == y2) and (d != edge):
413  adjacent5 = []
414  else:
415  common_x_d = x10
416  common_y_d = y10
417  adjacent5 = sg.adjacent_edges(common_x_d, common_y_d, d, remaining_edges)
418  else:
419  # it could be a face of 5 side, check if returned to coordinates of first edge.
420  if (x9 == x2) and (y9 == y2) and (d != edge):
421  adjacent5 = []
422  else:
423  common_x_d = x9
424  common_y_d = y9
425  adjacent5 = sg.adjacent_edges(common_x_d, common_y_d, d, remaining_edges)
426  for e in adjacent5:
427  x11 = e.x1
428  y11 = e.y1
429  x12 = e.x2
430  y12 = e.y2
431  if (x11 == common_x_d) and (y11 == common_y_d):
432  # it could be a face of 5 side, check if returned to coordinates of first edge.
433  if (x12 == x2) and (y12 == y2) and (e != edge):
434  boards.extend((edge,a,b,c,d,e))
435  face = Cell(boards)
436  if not (check_belonging(face, faces)):
437  edge.num_faces += 1
438  a.num_faces += 1
439  b.num_faces += 1
440  c.num_faces += 1
441  d.num_faces += 1
442  e.num_faces += 1
443  faces.append(face)
444  return True
445  else:
446  del boards[:]
447  else:
448  # it could be a face of 5 side, check if returned to coordinates of first edge.
449  if (x11 == x2) and (y11 == y2) and (e != edge):
450  boards.extend((edge,a,b,c,d,e))
451  face = Cell(boards)
452  if not (check_belonging(face, faces)):
453  edge.num_faces += 1
454  a.num_faces += 1
455  b.num_faces += 1
456  c.num_faces += 1
457  d.num_faces += 1
458  e.num_faces += 1
459  faces.append(face)
460  return True
461  else:
462  del boards[:]
463  return False
464 
465 
466 def create_7_faces(faces, edges):
467  # if find a faces of 5 side not already present in faces, create it and add it to faces and return True.
468  boards = []
469  remaining_edges = []
470  # list of all edges associated to less than 2 faces, still good to create a face.
471  for edge in edges:
472  if edge.num_faces < 2:
473  remaining_edges.append(edge)
474  for edge in remaining_edges:
475  x1 = edge.x1
476  y1 = edge.y1
477  x2 = edge.x2
478  y2 = edge.y2
479  common_x_edge = x1
480  common_y_edge = y1
481  adjacent = sg.adjacent_edges(common_x_edge, common_y_edge, edge, remaining_edges)
482  # edges that have as extreme point x1,y1 and m different from edge
483  for a in adjacent:
484  x3 = a.x1
485  y3 = a.y1
486  x4 = a.x2
487  y4 = a.y2
488  # check edge that have as extreme the one different from previous one
489  if face_exist(edge, a, faces):
490  break
491  if (x3 == common_x_edge) and (y3 == common_y_edge):
492  common_x_a = x4
493  common_y_a = y4
494  adjacent2 = sg.adjacent_edges(common_x_a, common_y_a, a, remaining_edges)
495  else:
496  common_x_a = x3
497  common_y_a = y3
498  adjacent2 = sg.adjacent_edges(common_x_a, common_y_a, a, remaining_edges)
499  for b in adjacent2:
500  x5 = b.x1
501  y5 = b.y1
502  x6 = b.x2
503  y6 = b.y2
504  if (x5 == common_x_a) and (y5 == common_y_a):
505  # it could be a face of 3 side, check if returned to coordinates of first edge.
506  if (x6==x2) and (y6==y2):
507  adjacent3 = []
508  # choose another b of previous for loop
509  # if a face of 3 side is not closed.
510  else:
511  common_x_b = x6
512  common_y_b = y6
513  adjacent3 = sg.adjacent_edges(common_x_b, common_y_b, b, remaining_edges)
514  else:
515  # it could be a face of 3 side, check if returned to coordinates of first edge.
516  if (x5 == x2) and (y5 == y2):
517  adjacent3 = []
518  # if a face of 3 side is not closed.
519  else:
520  common_x_b = x5
521  common_y_b = y5
522  adjacent3 = sg.adjacent_edges(common_x_b, common_y_b, b, remaining_edges)
523  for c in adjacent3:
524  x7 = c.x1
525  y7 = c.y1
526  x8 = c.x2
527  y8 = c.y2
528  if (x7 == common_x_b) and (y7 == common_y_b):
529  # it could be a face of 4 side, check if returned to coordinates of first edge.
530  if (x8 == x2) and (y8 == y2):
531  adjacent4 = []
532  # if a face of 4 side is not closed.
533  else:
534  common_x_c = x8
535  common_y_c = y8
536  adjacent4 = sg.adjacent_edges(common_x_c, common_y_c, c, remaining_edges)
537  else:
538  # it could be a face of 4 side, check if returned to coordinates of first edge.
539  if (x7 == x2) and (y7 == y2):
540  adjacent4 = []
541  # if a face of 4 side is not closed.
542  else:
543  common_x_c = x7
544  common_y_c = y7
545  adjacent4 = sg.adjacent_edges(common_x_c, common_y_c, c, remaining_edges)
546  for d in adjacent4:
547  x9 = d.x1
548  y9 = d.y1
549  x10 = d.x2
550  y10 = d.y2
551  if (x9 == common_x_c) and (y9 == common_y_c):
552  # it could be a face of 5 side, check if returned to coordinates of first edge.
553  if (x10 == x2) and (y10 == y2) and (d != edge):
554  adjacent5 = []
555  else:
556  common_x_d = x10
557  common_y_d = y10
558  adjacent5 = sg.adjacent_edges(common_x_d, common_y_d, d, remaining_edges)
559  else:
560  # it could be a face of 5 side, check if returned to coordinates of first edge.
561  if (x9 == x2) and (y9 == y2) and (d != edge):
562  adjacent5 = []
563  else:
564  common_x_d = x9
565  common_y_d = y9
566  adjacent5 = sg.adjacent_edges(common_x_d, common_y_d, d, remaining_edges)
567  for e in adjacent5:
568  x11 = e.x1
569  y11 = e.y1
570  x12 = e.x2
571  y12 = e.y2
572  if (x11 == common_x_c) and (y11 == common_y_c):
573  # it could be a face of 6 side, check if returned to coordinates of first edge.
574  if (x12 == x2) and (y12 == y2) and (e != edge):
575  adjacent6 = []
576  else:
577  common_x_e = x12
578  common_y_e = y12
579  adjacent6 = sg.adjacent_edges(common_x_e, common_y_e, e, remaining_edges)
580  else:
581  # it could be a face of 6 side, check if returned to coordinates of first edge.
582  if (x11 == x2) and (y11 == y2) and (e != edge):
583  adjacent6 = []
584  else:
585  common_x_e = x11
586  common_y_e = y11
587  adjacent6 = sg.adjacent_edges(common_x_e, common_y_e, e, remaining_edges)
588  for f in adjacent6:
589  x13 = f.x1
590  y13 = f.y1
591  x14 = f.x2
592  y14 = f.y2
593  if (x13 == common_x_e) and (y13 == common_y_e):
594  # it could be a face of 5 side, check if returned to coordinates of first edge.
595  if (x14 == x2) and (y14 == y2) and (f != edge):
596  boards.extend((edge,a,b,c,d,e,f))
597  face = Cell(boards)
598  if not (check_belonging(face, faces)):
599  edge.num_faces += 1
600  a.num_faces += 1
601  b.num_faces += 1
602  c.num_faces += 1
603  d.num_faces += 1
604  e.num_faces += 1
605  f.num_faces += 1
606  faces.append(face)
607  return True
608  else:
609  del boards[:]
610  else:
611  # it could be a face of 5 side, check if returned to coordinates of first edge.
612  if (x13 == x2) and (y13 == y2) and (f != edge):
613  boards.extend((edge,a,b,c,d,e,f))
614  face = Cell(boards)
615  if not (check_belonging(face, faces)):
616  edge.num_faces += 1
617  a.num_faces += 1
618  b.num_faces += 1
619  c.num_faces += 1
620  d.num_faces += 1
621  e.num_faces += 1
622  f.num_faces += 1
623  faces.append(face)
624  return True
625  else:
626  del boards[:]
627  return False
628 
629 
630 def face_exist(edge, a, faces):
631  # return True if already exist a face with sides edge and a.
632  for face in faces:
633  if (edge in face.borders) and (a in face.borders):
634  return True
635  return False
636 
637 
638 def check_belonging(face, faces):
639  # return true if face is already inside faces or there is already one with 2 common edge
640  sides = face.borders
641  for face2 in faces:
642  sides2 = face2.borders
643  if (all(inside(side, sides2) for side in sides)) and (all(inside(side1, sides) for side1 in sides2)):
644  return True
645  if len(common_edge(face, face2)) >= 2:
646  return True
647  return False
648 
649 
650 def inside(side, sides):
651  # return True if side is inside sides
652  if side in sides:
653  return True
654  else:
655  return False
656 
657 
658 def common_edge(face1, face2):
659  # return list of edges in common between the 2 faces
660  borders1 = []
661  borders2 = []
662  for border in face1.borders:
663  borders1.append(border)
664  for border in face2.borders:
665  borders2.append(border)
666  return list(set(borders1).intersection(borders2))
667 
668 
669 def adjacent(face1, face2):
670  # return true if the 2 faces are adjacent
671  borders1 = []
672  borders2 = []
673  for border in face1.borders:
674  borders1.append(border)
675  for border in face2.borders:
676  borders2.append(border)
677  common = list(set(borders1).intersection(borders2))
678  if len(common) == 0:
679  return False
680  return True
Surface.face_exist
def face_exist(edge, a, faces)
Definition: Surface.py:630
Surface.create_cells
def create_cells(edges)
Definition: Surface.py:24
Surface.create_5_faces
def create_5_faces(faces, edges)
Definition: Surface.py:207
Surface.Cell.__init__
def __init__(self, edges)
Definition: Surface.py:12
Surface.create_6_faces
def create_6_faces(faces, edges)
Definition: Surface.py:325
Surface.Cell.set_out
def set_out(self, o)
Definition: Surface.py:17
Surface.adjacent
def adjacent(face1, face2)
Definition: Surface.py:669
Surface.create_3_faces
def create_3_faces(faces, edges)
Definition: Surface.py:45
Surface.Cell.partial
partial
Definition: Surface.py:15
Surface.Cell
Definition: Surface.py:11
Surface.inside
def inside(side, sides)
Definition: Surface.py:650
Segment.intersection
def intersection(x1, y1, x2, y2, x3, y3, x4, y4)
Definition: Segment.py:306
Surface.Cell.borders
borders
Definition: Surface.py:13
Surface.Cell.out
out
Definition: Surface.py:14
Surface.Cell.set_partial
def set_partial(self, p)
Definition: Surface.py:20
Surface.create_7_faces
def create_7_faces(faces, edges)
Definition: Surface.py:466
Surface.common_edge
def common_edge(face1, face2)
Definition: Surface.py:658
Surface.check_belonging
def check_belonging(face, faces)
Definition: Surface.py:638
Surface.create_4_faces
def create_4_faces(faces, edges)
Definition: Surface.py:113


rose2
Author(s): Gabriele Somaschini, Matteo Luperto
autogenerated on Wed Jun 28 2023 02:21:53