mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-11-02 20:51:23 -07:00 
			
		
		
		
	Fxied a regression that wall order can't be set in height modifier
(cherry picked from commit 5683729b17)
			
			
This commit is contained in:
		
							parent
							
								
									7b43991a36
								
							
						
					
					
						commit
						b62ce6095d
					
				
					 4 changed files with 12 additions and 11 deletions
				
			
		| 
						 | 
				
			
			@ -4126,7 +4126,7 @@ LayerResult GCode::process_layer(
 | 
			
		|||
                    m_last_obj_copy = this_object_copy;
 | 
			
		||||
                    this->set_origin(unscale(offset));
 | 
			
		||||
                    //FIXME the following code prints regions in the order they are defined, the path is not optimized in any way.
 | 
			
		||||
                    bool is_infill_first =print.config().is_infill_first;
 | 
			
		||||
                    bool is_infill_first =m_config.is_infill_first;
 | 
			
		||||
 | 
			
		||||
                    auto has_infill = [](const std::vector<ObjectByExtruder::Island::Region> &by_region) {
 | 
			
		||||
                        for (auto region : by_region) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1047,7 +1047,7 @@ float WipingExtrusions::mark_wiping_extrusions(const Print& print, unsigned int
 | 
			
		|||
                if (!object->config().flush_into_infill && !object->config().flush_into_objects && !object->config().flush_into_support)
 | 
			
		||||
                    continue;
 | 
			
		||||
                bool wipe_into_infill_only = !object->config().flush_into_objects && object->config().flush_into_infill;
 | 
			
		||||
                bool is_infill_first = print.config().is_infill_first;
 | 
			
		||||
                bool is_infill_first = region.config().is_infill_first;
 | 
			
		||||
                if (is_infill_first != perimeters_done || wipe_into_infill_only) {
 | 
			
		||||
                    for (const ExtrusionEntity* ee : layerm->fills.entities) {                      // iterate through all infill Collections
 | 
			
		||||
                        auto* fill = dynamic_cast<const ExtrusionEntityCollection*>(ee);
 | 
			
		||||
| 
						 | 
				
			
			@ -1160,7 +1160,7 @@ void WipingExtrusions::ensure_perimeters_infills_order(const Print& print)
 | 
			
		|||
                if (!object->config().flush_into_infill && !object->config().flush_into_objects)
 | 
			
		||||
                    continue;
 | 
			
		||||
 | 
			
		||||
                bool is_infill_first = print.config().is_infill_first;
 | 
			
		||||
                bool is_infill_first = region.config().is_infill_first;
 | 
			
		||||
                for (const ExtrusionEntity* ee : layerm->fills.entities) {                      // iterate through all infill Collections
 | 
			
		||||
                    auto* fill = dynamic_cast<const ExtrusionEntityCollection*>(ee);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1731,7 +1731,7 @@ void PerimeterGenerator::process_classic()
 | 
			
		|||
            // if brim will be printed, reverse the order of perimeters so that
 | 
			
		||||
            // we continue inwards after having finished the brim
 | 
			
		||||
            // TODO: add test for perimeter order
 | 
			
		||||
            bool is_outer_wall_first = this->object_config->wall_sequence == WallSequence::OuterInner;
 | 
			
		||||
            bool is_outer_wall_first = this->config->wall_sequence == WallSequence::OuterInner;
 | 
			
		||||
            if (is_outer_wall_first ||
 | 
			
		||||
                //BBS: always print outer wall first when there indeed has brim.
 | 
			
		||||
                (this->layer_id == 0 &&
 | 
			
		||||
| 
						 | 
				
			
			@ -1739,7 +1739,7 @@ void PerimeterGenerator::process_classic()
 | 
			
		|||
                    this->object_config->brim_width.value > 0))
 | 
			
		||||
                entities.reverse();
 | 
			
		||||
            // SoftFever: sandwich mode 
 | 
			
		||||
            else if (this->object_config->wall_sequence == WallSequence::InnerOuterInner)
 | 
			
		||||
            else if (this->config->wall_sequence == WallSequence::InnerOuterInner)
 | 
			
		||||
                if (entities.entities.size() > 1){
 | 
			
		||||
                    int              last_outer=0;
 | 
			
		||||
                    int              outer = 0;
 | 
			
		||||
| 
						 | 
				
			
			@ -2036,12 +2036,12 @@ void PerimeterGenerator::process_arachne()
 | 
			
		|||
        int direction = -1;
 | 
			
		||||
 | 
			
		||||
		bool is_outer_wall_first =
 | 
			
		||||
            	this->object_config->wall_sequence == WallSequence::OuterInner ||
 | 
			
		||||
            	this->object_config->wall_sequence == WallSequence::InnerOuterInner;
 | 
			
		||||
            	this->config->wall_sequence == WallSequence::OuterInner ||
 | 
			
		||||
            	this->config->wall_sequence == WallSequence::InnerOuterInner;
 | 
			
		||||
        
 | 
			
		||||
        if (layer_id == 0){ // disable inner outer inner algorithm after the first layer
 | 
			
		||||
        	is_outer_wall_first =
 | 
			
		||||
            	this->object_config->wall_sequence == WallSequence::OuterInner;
 | 
			
		||||
            	this->config->wall_sequence == WallSequence::OuterInner;
 | 
			
		||||
        }
 | 
			
		||||
        if (is_outer_wall_first) {
 | 
			
		||||
            start_perimeter = 0;
 | 
			
		||||
| 
						 | 
				
			
			@ -2169,7 +2169,7 @@ void PerimeterGenerator::process_arachne()
 | 
			
		|||
        }
 | 
			
		||||
 | 
			
		||||
       // printf("New Layer: Layer ID %d\n",layer_id); //debug - new layer
 | 
			
		||||
        if (this->object_config->wall_sequence == WallSequence::InnerOuterInner && layer_id > 0) { // only enable inner outer inner algorithm after first layer
 | 
			
		||||
        if (this->config->wall_sequence == WallSequence::InnerOuterInner && layer_id > 0) { // only enable inner outer inner algorithm after first layer
 | 
			
		||||
            if (ordered_extrusions.size() > 2) { // 3 walls minimum needed to do inner outer inner ordering
 | 
			
		||||
                int position = 0; // index to run the re-ordering for multiple external perimeters in a single island.
 | 
			
		||||
                int arr_i, arr_j = 0;    // indexes to run through the walls in the for loops
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -753,7 +753,6 @@ PRINT_CONFIG_CLASS_DEFINE(
 | 
			
		|||
    // BBS
 | 
			
		||||
    ((ConfigOptionBool,                flush_into_infill))
 | 
			
		||||
    ((ConfigOptionBool,                flush_into_support))
 | 
			
		||||
    ((ConfigOptionEnum<WallSequence>,  wall_sequence))
 | 
			
		||||
    // BBS
 | 
			
		||||
    ((ConfigOptionFloat,              tree_support_branch_distance))
 | 
			
		||||
    ((ConfigOptionFloat,              tree_support_tip_diameter))
 | 
			
		||||
| 
						 | 
				
			
			@ -903,6 +902,9 @@ PRINT_CONFIG_CLASS_DEFINE(
 | 
			
		|||
    ((ConfigOptionBool,                 overhang_reverse))
 | 
			
		||||
    ((ConfigOptionBool,                 overhang_reverse_internal_only))
 | 
			
		||||
    ((ConfigOptionFloatOrPercent,       overhang_reverse_threshold))
 | 
			
		||||
    
 | 
			
		||||
    ((ConfigOptionEnum<WallSequence>,  wall_sequence))
 | 
			
		||||
    ((ConfigOptionBool,                is_infill_first))
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
PRINT_CONFIG_CLASS_DEFINE(
 | 
			
		||||
| 
						 | 
				
			
			@ -1179,7 +1181,6 @@ PRINT_CONFIG_CLASS_DERIVED_DEFINE(
 | 
			
		|||
 | 
			
		||||
    ((ConfigOptionBools,               activate_chamber_temp_control))
 | 
			
		||||
    ((ConfigOptionInts ,               chamber_temperature))
 | 
			
		||||
    ((ConfigOptionBool,                is_infill_first))
 | 
			
		||||
    
 | 
			
		||||
    ((ConfigOptionFloat,               preferred_orientation))
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue