mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-30 20:21:12 -06:00 
			
		
		
		
	FIXME on ExPolygon::overlaps(), which should be commutative.
This commit is contained in:
		
							parent
							
								
									59017a7dae
								
							
						
					
					
						commit
						eef800b5c4
					
				
					 2 changed files with 3 additions and 2 deletions
				
			
		|  | @ -132,8 +132,7 @@ ExPolygon::has_boundary_point(const Point &point) const | ||||||
|     return false; |     return false; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| bool | bool ExPolygon::overlaps(const ExPolygon &other) const | ||||||
| ExPolygon::overlaps(const ExPolygon &other) const |  | ||||||
| { | { | ||||||
|     #if 0 |     #if 0 | ||||||
|     BoundingBox bbox = get_extents(other); |     BoundingBox bbox = get_extents(other); | ||||||
|  | @ -150,6 +149,7 @@ ExPolygon::overlaps(const ExPolygon &other) const | ||||||
|     #endif |     #endif | ||||||
|     if (! pl_out.empty()) |     if (! pl_out.empty()) | ||||||
|         return true;  |         return true;  | ||||||
|  |     //FIXME ExPolygon::overlaps() shall be commutative, it is not!
 | ||||||
|     return ! other.contour.points.empty() && this->contains_b(other.contour.points.front()); |     return ! other.contour.points.empty() && this->contains_b(other.contour.points.front()); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -84,6 +84,7 @@ public: | ||||||
|         float                                   overhangs_area = 0.f; |         float                                   overhangs_area = 0.f; | ||||||
|          |          | ||||||
|         bool overlaps(const Structure &rhs) const {  |         bool overlaps(const Structure &rhs) const {  | ||||||
|  |             //FIXME ExPolygon::overlaps() shall be commutative, it is not!
 | ||||||
|             return this->bbox.overlap(rhs.bbox) && (this->polygon->overlaps(*rhs.polygon) || rhs.polygon->overlaps(*this->polygon));  |             return this->bbox.overlap(rhs.bbox) && (this->polygon->overlaps(*rhs.polygon) || rhs.polygon->overlaps(*this->polygon));  | ||||||
|         } |         } | ||||||
|         float overlap_area(const Structure &rhs) const {  |         float overlap_area(const Structure &rhs) const {  | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Vojtech Bubnik
						Vojtech Bubnik