|  | @@ -409,11 +409,16 @@ void boostJsonObject::FromParamJson(string param)
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |          try{
 |  |          try{
 | 
											
												
													
														|  |              boost::property_tree::ptree sur_data = root.get_child("surfParam");
 |  |              boost::property_tree::ptree sur_data = root.get_child("surfParam");
 | 
											
												
													
														|  | -            da_struct->surfParam0 = true;
 |  | 
 | 
											
												
													
														|  | -            da_struct->surfParam->max_size = sur_data.get<std::string>("max_size");
 |  | 
 | 
											
												
													
														|  | -            da_struct->surfParam->min_size = sur_data.get<std::string>("min_size");
 |  | 
 | 
											
												
													
														|  | -            da_struct->surfParam->SurfStyle = sur_data.get<std::string>("surfStyle");
 |  | 
 | 
											
												
													
														|  | -            da_struct->surfParam->Global_physical_size = sur_data.get<std::string>("global_physical_size");
 |  | 
 | 
											
												
													
														|  | 
 |  | +            if(sur_data.empty()){
 | 
											
												
													
														|  | 
 |  | +                da_struct->surfParam0 = false;
 | 
											
												
													
														|  | 
 |  | +            }else{
 | 
											
												
													
														|  | 
 |  | +                da_struct->surfParam0 = true;
 | 
											
												
													
														|  | 
 |  | +                da_struct->surfParam->gradation = sur_data.get<std::string>("gradation");
 | 
											
												
													
														|  | 
 |  | +                da_struct->surfParam->max_size = sur_data.get<std::string>("max_size");
 | 
											
												
													
														|  | 
 |  | +                da_struct->surfParam->min_size = sur_data.get<std::string>("min_size");
 | 
											
												
													
														|  | 
 |  | +                da_struct->surfParam->SurfStyle = sur_data.get<std::string>("surfStyle");
 | 
											
												
													
														|  | 
 |  | +                da_struct->surfParam->Global_physical_size = sur_data.get<std::string>("global_physical_size");
 | 
											
												
													
														|  | 
 |  | +            }
 | 
											
												
													
														|  |          }catch(myException &ex){
 |  |          }catch(myException &ex){
 | 
											
												
													
														|  |              std::cout<<"-----no surfParam-----"<<std::endl;
 |  |              std::cout<<"-----no surfParam-----"<<std::endl;
 | 
											
												
													
														|  |              throw myException("surfParam miss some parameters!");
 |  |              throw myException("surfParam miss some parameters!");
 | 
											
										
											
												
													
														|  | @@ -422,17 +427,21 @@ void boostJsonObject::FromParamJson(string param)
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |          try{
 |  |          try{
 | 
											
												
													
														|  |              boost::property_tree::ptree sur1_data = root.get_child("surfParam1");
 |  |              boost::property_tree::ptree sur1_data = root.get_child("surfParam1");
 | 
											
												
													
														|  | -            da_struct->surfParam1 = true;
 |  | 
 | 
											
												
													
														|  | -            da_struct->surfParam->gradation = sur1_data.get<std::string>("gradation");
 |  | 
 | 
											
												
													
														|  | -            da_struct->surfParam->anisotropic_ratio = sur1_data.get<std::string>("anisotropic_ratio");
 |  | 
 | 
											
												
													
														|  | -            da_struct->surfParam->chordal_error = sur1_data.get<std::string>("chordal_error");
 |  | 
 | 
											
												
													
														|  | -            da_struct->surfParam->geometric_approximation_angle = sur1_data.get<std::string>("geometric_approximation_angle");
 |  | 
 | 
											
												
													
														|  | -            da_struct->surfParam->Debug = sur1_data.get<std::string>("debug");
 |  | 
 | 
											
												
													
														|  | -            da_struct->surfParam->closed_geometry = sur1_data.get<std::string>("closed_geometry");
 |  | 
 | 
											
												
													
														|  | -            da_struct->surfParam->enforce_cad_edge_sizes = sur1_data.get<std::string>("enforce_cad_edge_sizes");
 |  | 
 | 
											
												
													
														|  | -            da_struct->surfParam->force_bad_surface_element_removal = sur1_data.get<std::string>("force_bad_surface_element_removal");
 |  | 
 | 
											
												
													
														|  | -            da_struct->surfParam->discard_input_topology = sur1_data.get<std::string>("discard_input_topology");
 |  | 
 | 
											
												
													
														|  | -            da_struct->surfParam->create_tag_on_collision = sur1_data.get<std::string>("create_tag_on_collision");
 |  | 
 | 
											
												
													
														|  | 
 |  | +            if(sur1_data.empty()){
 | 
											
												
													
														|  | 
 |  | +                da_struct->surfParam1 = false;
 | 
											
												
													
														|  | 
 |  | +            }else{
 | 
											
												
													
														|  | 
 |  | +                da_struct->surfParam1 = true;
 | 
											
												
													
														|  | 
 |  | +                da_struct->surfParam->gradation = sur1_data.get<std::string>("gradation");
 | 
											
												
													
														|  | 
 |  | +                da_struct->surfParam->anisotropic_ratio = sur1_data.get<std::string>("anisotropic_ratio");
 | 
											
												
													
														|  | 
 |  | +                da_struct->surfParam->chordal_error = sur1_data.get<std::string>("chordal_error");
 | 
											
												
													
														|  | 
 |  | +                da_struct->surfParam->geometric_approximation_angle = sur1_data.get<std::string>("geometric_approximation_angle");
 | 
											
												
													
														|  | 
 |  | +                da_struct->surfParam->Debug = sur1_data.get<std::string>("debug");
 | 
											
												
													
														|  | 
 |  | +                da_struct->surfParam->closed_geometry = sur1_data.get<std::string>("closed_geometry");
 | 
											
												
													
														|  | 
 |  | +                da_struct->surfParam->enforce_cad_edge_sizes = sur1_data.get<std::string>("enforce_cad_edge_sizes");
 | 
											
												
													
														|  | 
 |  | +                da_struct->surfParam->force_bad_surface_element_removal = sur1_data.get<std::string>("force_bad_surface_element_removal");
 | 
											
												
													
														|  | 
 |  | +                da_struct->surfParam->discard_input_topology = sur1_data.get<std::string>("discard_input_topology");
 | 
											
												
													
														|  | 
 |  | +                da_struct->surfParam->create_tag_on_collision = sur1_data.get<std::string>("create_tag_on_collision");
 | 
											
												
													
														|  | 
 |  | +            }
 | 
											
												
													
														|  |          }catch(myException &ex){
 |  |          }catch(myException &ex){
 | 
											
												
													
														|  |              std::cout<<"-----no surfParam1-----"<<std::endl;
 |  |              std::cout<<"-----no surfParam1-----"<<std::endl;
 | 
											
												
													
														|  |              throw myException("surfParam1 miss some parameters!");
 |  |              throw myException("surfParam1 miss some parameters!");
 | 
											
										
											
												
													
														|  | @@ -441,12 +450,16 @@ void boostJsonObject::FromParamJson(string param)
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |          try{
 |  |          try{
 | 
											
												
													
														|  |              boost::property_tree::ptree sur2_data = root.get_child("surfParam2");
 |  |              boost::property_tree::ptree sur2_data = root.get_child("surfParam2");
 | 
											
												
													
														|  | -            da_struct->surfParam2 = true;
 |  | 
 | 
											
												
													
														|  | -            da_struct->surfParam->element_order = sur2_data.get<std::string>("element_order");
 |  | 
 | 
											
												
													
														|  | -            da_struct->surfParam->remove_duplicate_cad_faces = sur2_data.get<std::string>("remove_duplicate_cad_faces");
 |  | 
 | 
											
												
													
														|  | -            da_struct->surfParam->scaled_jacobian_threshold_value = sur2_data.get<std::string>("scaled_jacobian_threshold_value");
 |  | 
 | 
											
												
													
														|  | -            da_struct->surfParam->optimisation = sur2_data.get<std::string>("optimisation");
 |  | 
 | 
											
												
													
														|  | -            da_struct->surfParam->correct_surface_intersections = sur2_data.get<std::string>("correct_surface_intersections");
 |  | 
 | 
											
												
													
														|  | 
 |  | +            if(sur2_data.empty()){
 | 
											
												
													
														|  | 
 |  | +                da_struct->surfParam2 = false;
 | 
											
												
													
														|  | 
 |  | +            }else{
 | 
											
												
													
														|  | 
 |  | +                da_struct->surfParam2 = true;
 | 
											
												
													
														|  | 
 |  | +                da_struct->surfParam->element_order = sur2_data.get<std::string>("element_order");
 | 
											
												
													
														|  | 
 |  | +                da_struct->surfParam->remove_duplicate_cad_faces = sur2_data.get<std::string>("remove_duplicate_cad_faces");
 | 
											
												
													
														|  | 
 |  | +                da_struct->surfParam->scaled_jacobian_threshold_value = sur2_data.get<std::string>("scaled_jacobian_threshold_value");
 | 
											
												
													
														|  | 
 |  | +                da_struct->surfParam->optimisation = sur2_data.get<std::string>("optimisation");
 | 
											
												
													
														|  | 
 |  | +                da_struct->surfParam->correct_surface_intersections = sur2_data.get<std::string>("correct_surface_intersections");
 | 
											
												
													
														|  | 
 |  | +            }
 | 
											
												
													
														|  |          }catch(myException &ex){
 |  |          }catch(myException &ex){
 | 
											
												
													
														|  |              std::cout<<"-----no surfParam2-----"<<std::endl;
 |  |              std::cout<<"-----no surfParam2-----"<<std::endl;
 | 
											
												
													
														|  |              throw myException("surfParam2 miss some parameters!");
 |  |              throw myException("surfParam2 miss some parameters!");
 |