| 
									
										
										
										
											2015-06-29 19:43:15 -04:00
										 |  |  | USING: accessors kernel tools.test euler.b-rep euler.operators | 
					
						
							|  |  |  | euler.modeling game.models.half-edge ;
 | 
					
						
							|  |  |  | IN: euler.modeling.tests | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ! polygon>double-face | 
					
						
							| 
									
										
										
										
											2015-07-03 12:39:59 -04:00
										 |  |  | { } [ | 
					
						
							| 
									
										
										
										
											2015-06-29 19:43:15 -04:00
										 |  |  |     [ | 
					
						
							|  |  |  |         { { -1 -1 0 } { 1 -1 0 } { 1 1 0 } { -1 1 0 } } | 
					
						
							|  |  |  |         smooth-smooth polygon>double-face | 
					
						
							|  |  |  |         [ face-sides 4 assert= ] | 
					
						
							|  |  |  |         [ opposite-edge>> face-sides 4 assert= ] | 
					
						
							|  |  |  |         [ face-normal { 0.0 0.0 1.0 } assert= ] | 
					
						
							|  |  |  |         tri
 | 
					
						
							|  |  |  |     ] make-b-rep check-b-rep | 
					
						
							|  |  |  | ] unit-test | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ! extrude-simple | 
					
						
							| 
									
										
										
										
											2015-07-03 12:39:59 -04:00
										 |  |  | { } [ | 
					
						
							| 
									
										
										
										
											2015-06-29 19:43:15 -04:00
										 |  |  |     [ | 
					
						
							|  |  |  |         { { -1 -1 0 } { 1 -1 0 } { 1 1 0 } } | 
					
						
							|  |  |  |         smooth-smooth polygon>double-face | 
					
						
							|  |  |  |         1 f extrude-simple | 
					
						
							|  |  |  |         [ face-sides 3 assert= ] | 
					
						
							|  |  |  |         [ opposite-edge>> face-sides 4 assert= ] | 
					
						
							|  |  |  |         bi
 | 
					
						
							|  |  |  |     ] make-b-rep check-b-rep | 
					
						
							|  |  |  | ] unit-test | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ! project-pt-line | 
					
						
							| 
									
										
										
										
											2015-07-03 12:39:59 -04:00
										 |  |  | { {  0 1 0 } } [ {  0 0 0 } { 0 1 0 } { 1 1 0 } project-pt-line ] unit-test | 
					
						
							|  |  |  | { {  0 1 0 } } [ {  0 0 0 } { 1 1 0 } { 0 1 0 } project-pt-line ] unit-test | 
					
						
							|  |  |  | { {  0 1 0 } } [ {  0 0 0 } { 2 1 0 } { 1 1 0 } project-pt-line ] unit-test | 
					
						
							|  |  |  | { { -1 1 0 } } [ { -1 0 0 } { 2 1 0 } { 1 1 0 } project-pt-line ] unit-test | 
					
						
							|  |  |  | { { 1/2 1/2 0 } } [ {  0 0 0 } { 0 1 0 } { 1 0 0 } project-pt-line ] unit-test | 
					
						
							| 
									
										
										
										
											2015-06-29 19:43:15 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | ! project-pt-plane | 
					
						
							| 
									
										
										
										
											2015-07-03 12:39:59 -04:00
										 |  |  | { {  0  0  1 } } [ { 0 0 0 } { 0 0 1 } { 0 0  1 } -1 project-pt-plane ] unit-test | 
					
						
							|  |  |  | { {  0  0 -1 } } [ { 0 0 0 } { 0 0 1 } { 0 0  1 }  1 project-pt-plane ] unit-test | 
					
						
							|  |  |  | { {  0  0  3 } } [ { 0 0 0 } { 0 0 1 } { 0 0  1 } -3 project-pt-plane ] unit-test | 
					
						
							|  |  |  | { {  0  0  3 } } [ { 0 0 0 } { 0 0 1 } { 0 0 -1 }  3 project-pt-plane ] unit-test | 
					
						
							|  |  |  | { {  0  0  1 } } [ { 0 0 0 } { 0 0 1 } { 0 1  1 } -1 project-pt-plane ] unit-test | 
					
						
							| 
									
										
										
										
											2015-06-29 19:43:15 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-03 12:39:59 -04:00
										 |  |  | { { 0 2/3 1/3 } } [ { 0 0 0 } { 0 2 1 } { 0 1  1 } -1 project-pt-plane ] unit-test | 
					
						
							| 
									
										
										
										
											2015-06-29 19:43:15 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-03 12:39:59 -04:00
										 |  |  | { {  0  0  1 } } [ { 0 0 0 } { 0 0   1/2 } { 0 0 1 } -1 project-pt-plane ] unit-test | 
					
						
							|  |  |  | { {  0  1  1 } } [ { 0 0 0 } { 0 1/2 1/2 } { 0 0 1 } -1 project-pt-plane ] unit-test |