{
SMESH_Comment msg("\nMeshGems error. ");
msg << txt << "\n";
+ std::cout << msg;
AddError( msg.c_str() );
}
bool SetParam( const std::string& param, const std::string& value )
{
status_t ret = hybrid_set_param( _session, param.c_str(), value.c_str() );
-#ifdef _DEBUG_
- //std::cout << param << " = " << value << std::endl;
-#endif
+ std::cout << param << " = " << value << std::endl;
return ( ret == STATUS_OK );
}
status_t ret;
int tag = stoi(s);
if ( param=="boundary_layer_imprinting_tags" )
+ {
ret = hybrid_set_boundary_layer_imprinting_tag(_session, tag);
+ std::cout << "imprinting_tag " << tag << std::endl;
+ }
else if ( param=="boundary_layer_snapping_tags" )
+ {
ret = hybrid_set_boundary_layer_snapping_tag(_session, tag);
+ std::cout << "snapping_tag " << tag << std::endl;
+ }
else if ( param=="boundary_layer_surface_tags" )
+ {
ret = hybrid_set_initial_height_on_surface_tag(_session, tag, stod(size));
+ std::cout << "surface_tag: " << tag << " , hegith: " << stod(size) << std::endl;
+ }
if ( ret != STATUS_OK )
+ {
+ std::cout << "PBBBBBBBBBBBBBBBBBBBBBB STATUS not OK ";
return false;
+ }
}
return true;
}
status_t my_message_cb(message_t * msg, void *user_data)
{
char *desc;
+ integer e, n, m;
+ integer i, i_data[10];
+ real r_data[10];
+ n = m = 0;
+ message_get_description(msg, &desc);
+ message_get_number(msg, &e);
+
+ if (e < 0) {
+ printf("mg-hybrid ERROR %i : %s", MESHGEMS_ABS_CODE(e), desc);
+ message_get_integer_data_count(msg, &n);
+ message_get_real_data_count(msg, &m);
+ printf("MGMESSAGE %i ", e);
+ printf(" %i", n);
+ if (n > 0) {
+ message_get_integer_data(msg, 1, n, i_data);
+ for (i = 0; i < n; i++)
+ printf(" %i", i_data[i]);
+ }
+ printf(" %i", m);
+ if (m > 0) {
+ message_get_real_data(msg, 1, m, r_data);
+ for (i = 0; i < m; i++)
+ printf(" %f", r_data[i]);
+ }
+ printf(" \n");
+
+ }
+ if (e >= 0) {
+ if (e == 0)
+ printf("\rmg-hybrid info : %s", desc);
+ else
+ printf("mg-hybrid info %i : %s", MESHGEMS_CODE(e), desc);
+ }
message_get_description(msg, &desc);
MG_HYBRID_API::LibData* data = (MG_HYBRID_API::LibData *) user_data;