Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] 3D Mesh Generation from CGAL::Polyhedral_mesh_domain_with_features_3

Subject: CGAL users discussion list

List archive

[cgal-discuss] 3D Mesh Generation from CGAL::Polyhedral_mesh_domain_with_features_3


Chronological Thread 
  • From: kadie16 <>
  • To:
  • Subject: [cgal-discuss] 3D Mesh Generation from CGAL::Polyhedral_mesh_domain_with_features_3
  • Date: Tue, 11 Aug 2015 20:47:53 -0700 (PDT)

Hello! I am pretty new to CGAL and C++, I'm trying to generate 3D volume
meshes from polyhedrons, originally generated from data read in as .obj
files. I'm running into some errors ... hopefully you can help me out or at
least tell me if I am on the right track.

First, I was generating from a Polyhedron object:


Polyhedron mesh;
// mesh is delegated from a half edge data structure
bool generateVolumeMesh()
{
using namespace CGAL::parameters;
Mesh_domain domain(mesh);
MeshCriteria criteria(facet_angle=30, facet_size=0.1,
facet_distance=0.025,
cell_radius_edge_ratio=2, cell_size=0.1);
c3t3 = CGAL::make_mesh_3<C3T3>(domain, criteria, no_perturb(),
no_exude());
return true;
}

But that gives me a volume which doesn't respect the features of my model.

<http://cgal-discuss.949826.n4.nabble.com/file/n4661063/angel8.png>
<http://cgal-discuss.949826.n4.nabble.com/file/n4661063/angel9.png>
/Angel data set courtesy of the U.C. Berkeley Computer Animation and
Modeling Group./

Now, I am trying to use Polyhedral_mesh_domain_with_features_3


I am creating the Mesh_polyhedron the same way I did the regular polyhedron,
by delegating a half edge data structure I built with the incremental
builder.

mesh_Poly.delegate(objHDS);

Then trying to make a "Polyhedral_mesh_domain_with_features_3" like so

MeshDomain domain(mesh_Poly);

This generates the following compilation errors:


error: no type named 'Subdomain_index' in
'CGAL::Mesh_domain_with_polyline_features_3<CGAL::Polyhedral_mesh_domain_3&lt;CGAL::Polyhedron_3&lt;CGAL::Mesh_3::Robust_intersection_traits_3&lt;CGAL::Epick>,
My_items, HalfedgeDS_default, std::allocator<int> >,
CGAL::Mesh_3::Robust_intersection_traits_3<CGAL::Epick>,
CGAL::Triangle_accessor_3<CGAL::Polyhedron_3&lt;CGAL::Mesh_3::Robust_intersection_traits_3&lt;CGAL::Epick>,
My_items, HalfedgeDS_default, std::allocator<int> >,
CGAL::Mesh_3::Robust_intersection_traits_3<CGAL::Epick> >,
CGAL::Boolean_tag<true>, CGAL::Boolean_tag<true> > >'
typedef typename Base::Subdomain_index Subdomain_index;

error: no type named 'Patch_id' in
'CGAL::HalfedgeDS_in_place_list_face<CGAL::I_Polyhedron_facet&lt;My_facet&lt;CGAL::HalfedgeDS_list_types&lt;CGAL::Mesh_3::Robust_intersection_traits_3&lt;CGAL::Epick>,
CGAL::I_Polyhedron_derived_items_3<My_items>, std::allocator<int> >,
CGAL::Boolean_tag<true>, CGAL::Vector_3<CGAL::Epick> > > >'
typedef typename Polyhedron::Face::Patch_id Surface_patch_index;
~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~

Relevant typedefs

You can see the whole file here.
<https://github.com/kadie16/A-STAR-IHPC-Project/blob/master/project_VCGAL/myitems.h>


typedef double Real;
typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
typedef CGAL::Mesh_3::Robust_intersection_traits_3<Kernel> IGT;
typedef CGAL::Polyhedron_3<IGT, My_items> Polyhedron;
typedef Polyhedron::HalfedgeDS HalfedgeDS;
typedef CGAL::Point_3<Kernel> Point;
using namespace std;

//Volume Mesh
typedef CGAL::Mesh_polyhedron_3<IGT>::Type Mesh_polyhedron;
typedef CGAL::Polyhedral_mesh_domain_with_features_3<IGT, Polyhedron>
MeshDomain;
typedef CGAL::Mesh_triangulation_3<MeshDomain>::type Tr;
typedef
CGAL::Mesh_complex_3_in_triangulation_3<Tr,MeshDomain::Corner_index,MeshDomain::Curve_segment_index>
C3T3;
typedef CGAL::Mesh_criteria_3
MeshCriteria;
typedef CGAL::Polyhedron_copy_3<Polyhedron, Mesh_polyhedron> Poly_copy;
template <class HDS>



--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/3D-Mesh-Generation-from-CGAL-Polyhedral-mesh-domain-with-features-3-tp4661063.html
Sent from the cgal-discuss mailing list archive at Nabble.com.



Archive powered by MHonArc 2.6.18.

Top of Page