mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-30 12:11:15 -06:00 
			
		
		
		
	Merge branch 'master' of https://github.com/Prusa3d/Slic3r
This commit is contained in:
		
						commit
						a178a0ff7e
					
				
					 5 changed files with 25 additions and 24 deletions
				
			
		|  | @ -1333,6 +1333,8 @@ void Transformation::set_rotation(const Vec3d& rotation) | |||
| void Transformation::set_rotation(Axis axis, double rotation) | ||||
| { | ||||
|     rotation = angle_to_0_2PI(rotation); | ||||
|     if (is_approx(std::abs(rotation), 2.0 * (double)PI)) | ||||
|         rotation = 0.0; | ||||
| 
 | ||||
|     if (m_rotation(axis) != rotation) | ||||
|     { | ||||
|  |  | |||
|  | @ -2003,7 +2003,7 @@ bool GLBed::on_init_from_file(const std::string& filename, bool useVBOs) | |||
|     else | ||||
|         m_volume.indexed_vertex_array.load_mesh_flat_shading(mesh); | ||||
| 
 | ||||
|     float color[4] = { 0.235f, 0.235f, 0.235f, 1.0f }; | ||||
|     float color[4] = { 0.235f, 0.235f, 0.235f, 0.5f }; | ||||
|     set_color(color, 4); | ||||
| 
 | ||||
|     m_volume.bounding_box = m_volume.indexed_vertex_array.bounding_box(); | ||||
|  |  | |||
|  | @ -145,19 +145,24 @@ void Field::get_value_by_opt_type(wxString& str) | |||
| 		double val; | ||||
| 		// Replace the first occurence of comma in decimal number.
 | ||||
| 		str.Replace(",", ".", false); | ||||
| 		if(!str.ToCDouble(&val)) | ||||
| 		{ | ||||
| 			show_error(m_parent, _(L("Invalid numeric input."))); | ||||
| 			set_value(double_to_string(val), true); | ||||
| 		} | ||||
| 		if (m_opt.min > val || val > m_opt.max) | ||||
| 		{ | ||||
| 			show_error(m_parent, _(L("Input value is out of range"))); | ||||
| 			if (m_opt.min > val) val = m_opt.min; | ||||
| 			if (val > m_opt.max) val = m_opt.max; | ||||
| 			set_value(double_to_string(val), true); | ||||
| 		} | ||||
| 		m_value = val; | ||||
|         if (str == ".") | ||||
|             val = 0.0; | ||||
|         else | ||||
|         { | ||||
|             if (!str.ToCDouble(&val)) | ||||
|             { | ||||
|                 show_error(m_parent, _(L("Invalid numeric input."))); | ||||
|                 set_value(double_to_string(val), true); | ||||
|             } | ||||
|             if (m_opt.min > val || val > m_opt.max) | ||||
|             { | ||||
|                 show_error(m_parent, _(L("Input value is out of range"))); | ||||
|                 if (m_opt.min > val) val = m_opt.min; | ||||
|                 if (val > m_opt.max) val = m_opt.max; | ||||
|                 set_value(double_to_string(val), true); | ||||
|             } | ||||
|         } | ||||
|         m_value = val; | ||||
| 		break; } | ||||
| 	case coString: | ||||
| 	case coStrings: | ||||
|  |  | |||
|  | @ -73,14 +73,8 @@ ObjectManipulation::ObjectManipulation(wxWindow* parent) : | |||
|         def.default_value = new ConfigOptionFloat(0.0); | ||||
|         def.width = 50; | ||||
| 
 | ||||
|         if (option_name == "Rotation") | ||||
|         { | ||||
|             def.min = -360; | ||||
|             def.max = 360; | ||||
|         } | ||||
| 
 | ||||
|         // Add "uniform scaling" button in front of "Scale" option 
 | ||||
|         else if (option_name == "Scale") { | ||||
|         if (option_name == "Scale") { | ||||
|             line.near_label_widget = [this](wxWindow* parent) { | ||||
|                 auto btn = new PrusaLockButton(parent, wxID_ANY); | ||||
|                 btn->Bind(wxEVT_BUTTON, [btn, this](wxCommandEvent &event){ | ||||
|  | @ -293,13 +287,13 @@ void ObjectManipulation::update_if_dirty() | |||
|         deg_rotation(i) = Geometry::rad2deg(m_new_rotation(i)); | ||||
|     } | ||||
| 
 | ||||
|     if (m_cache.rotation(0) != m_new_rotation(0)) | ||||
|     if ((m_cache.rotation(0) != m_new_rotation(0)) || (m_new_rotation(0) == 0.0)) | ||||
|         m_og->set_value("rotation_x", double_to_string(deg_rotation(0), 2)); | ||||
| 
 | ||||
|     if (m_cache.rotation(1) != m_new_rotation(1)) | ||||
|     if ((m_cache.rotation(1) != m_new_rotation(1)) || (m_new_rotation(1) == 0.0)) | ||||
|         m_og->set_value("rotation_y", double_to_string(deg_rotation(1), 2)); | ||||
| 
 | ||||
|     if (m_cache.rotation(2) != m_new_rotation(2)) | ||||
|     if ((m_cache.rotation(2) != m_new_rotation(2)) || (m_new_rotation(2) == 0.0)) | ||||
|         m_og->set_value("rotation_z", double_to_string(deg_rotation(2), 2)); | ||||
| 
 | ||||
|     m_cache.rotation = deg_rotation; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 bubnikv
						bubnikv