Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] the strange result of odt-optimization in mesh_3_example

Subject: CGAL users discussion list

List archive

[cgal-discuss] the strange result of odt-optimization in mesh_3_example


Chronological Thread 
  • From: Shang Feifei <>
  • To:
  • Subject: [cgal-discuss] the strange result of odt-optimization in mesh_3_example
  • Date: Sat, 24 Jan 2015 00:41:18 +0800

Hi all,

I use project "mesh_polyhedral_domain_with_features" in mesh_3_example.sln. The inputting file as  polyhedral domain is attached. I changed the .cpp file is as follows.

int main()
{
  // Create domain
  Mesh_domain domain("D:/Program Files (x86)/CGAL-3.8/examples/Mesh_3/data/boxsub2cyl.off");
  
  // Get sharp features
  domain.detect_features();

  // Mesh criteria
  Mesh_criteria criteria(edge_size = 2.5,
                         facet_angle = 25, facet_size = 2.5, facet_distance = 0.5,
                         cell_radius_edge_ratio = 3, cell_size = 2.5);
  
  // Mesh generation
  std::cout<<"Mesh generation ...";
  C3t3 c3t3 = CGAL::make_mesh_3<C3t3>(domain, criteria);
 

  std::ofstream medit_file("boxsub2cyl_features.mesh");
  c3t3.output_to_medit(medit_file);
  medit_file.close();

  //ODT optimization
  CGAL::odt_optimize_mesh_3(c3t3, domain, time_limit=30);

  std::ofstream medit_file_odt("boxsub2cyl_features_odt.mesh");
  c3t3.output_to_medit(medit_file_odt);
  medit_file_odt.close();

  //Exude
  std::cout<<"Exude optimization ...";
  CGAL::exude_mesh_3(c3t3, sliver_bound=10, time_limit=10);
  std::cout<<" done"<<std::endl;
  
  std::ofstream medit_file_exu("boxsub2cyl_features_exu.mesh");
  c3t3.output_to_medit(medit_file_exu);
  medit_file_exu.close();
}

It runs successfully. Then I transform the result files into .vtk file to view results. The result after make_mesh_3() is fine. But boxsub2cyl_features_odt is strange. It misses some tets and becomes rough and uneven in surface. It seems that the surface doesn't respect the domain. The domain odt_optimization_mesh_3() used is also features-caught. It should keep the features like make_mesh_3(). It is confusing.

Any reply is appreciated.

Shang Fei-Fei

Attachment: boxsub2cyl.off
Description: Binary data




Archive powered by MHonArc 2.6.18.

Top of Page