mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 20:51:12 -06:00 
			
		
		
		
	ENH: disable arranging selected items
0. disable arranging selected 1. fix bug where brim is not correct. 2. fix bug where big circle objects are not arranged properly 3. disable default enable_rotation Change-Id: Ifc69f35d900ff63ec1e9ec8bf8638afc6ea7d54b (cherry picked from commit 2ed1b0dd8573a1e10aaf77f0d9f8896cef304427)
This commit is contained in:
		
							parent
							
								
									74e92ac51d
								
							
						
					
					
						commit
						07ae246e5f
					
				
					 9 changed files with 77 additions and 31 deletions
				
			
		|  | @ -203,6 +203,20 @@ public: | |||
|     inline Unit area() const BP2D_NOEXCEPT { | ||||
|         return Unit(width())*height(); | ||||
|     } | ||||
| 
 | ||||
|     _Box intersection(_Box other) { | ||||
|         _Box inter; | ||||
|         inter.p1.x() = std::max(p1.x(), other.p1.x()); | ||||
|         inter.p1.y() = std::max(p1.y(), other.p1.y()); | ||||
|         inter.p2.x() = std::min(p2.x(), other.p2.x()); | ||||
|         inter.p2.y() = std::min(p2.y(), other.p2.y()); | ||||
|         inter.defined = true; | ||||
|         if (inter.p2.y() < inter.p1.y() || inter.p2.x() < inter.p1.x()) { | ||||
|             inter.p2 = inter.p1; | ||||
|             inter.defined = false; | ||||
|         }             | ||||
|         return inter; | ||||
|     } | ||||
|      | ||||
|     static inline _Box infinite(const P ¢er = {TCoord<P>(0), TCoord<P>(0)}); | ||||
| }; | ||||
|  |  | |||
|  | @ -1083,9 +1083,13 @@ private: | |||
|         auto d = cb - ci;        | ||||
| 
 | ||||
|         // BBS TODO we assume the exclude region contains bottom left corner. If not, change the code below
 | ||||
|         if (!config_.m_excluded_regions.empty()) { | ||||
|             d.x() = d.x() < 0 ? 0 : d.x(); | ||||
|             d.y() = d.y() < 0 ? 0 : d.y(); | ||||
|         if (!config_.m_excluded_regions.empty()) { // do not move to left to much to avoid clash with excluded regions
 | ||||
|             if (d.x() < 0) { | ||||
|                 d.x() = 0;// std::max(long(d.x()), long(bbin.maxCorner().x() - bb.maxCorner().x()));
 | ||||
|             } | ||||
|             if (d.y() < 0) { | ||||
|                 d.y() = 0;// std::max(long(d.y()), long(bbin.maxCorner().y() - bb.maxCorner().y()));
 | ||||
|             } | ||||
|         } | ||||
|         for(Item& item : items_) | ||||
|             if (!item.is_virt_object) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Arthur
						Arthur