Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Mesh_3 support for vs2013

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Mesh_3 support for vs2013


Chronological Thread 
  • From: goranw <>
  • To:
  • Subject: Re: [cgal-discuss] Mesh_3 support for vs2013
  • Date: Fri, 21 Feb 2014 07:29:47 -0800 (PST)

To reproduce the bug in CGAL 4.3 it's enough to include the header where the
error occurs:

#include<CGAL/Mesh_3/Refine_facets_3.h>

It seems the compiler chokes when it handles the following (private) type:

typedef typename
boost::optional<CGAL::cpp11::tuple&lt;Surface_patch_index, Index, Point> >
Facet_properties;

The immediate compiler internal error seems to go away if I change the tuple
into a simple struct, like this:

struct Facet_properties_internal
{
Facet_properties_internal(Surface_patch_index si, Index sci, Point sc) {
surface_index = si; surface_center_index = sci; surface_center = sc;
}
Surface_patch_index surface_index;
Index surface_center_index;
Point surface_center;
};

typedef typename boost::optional<Facet_properties_internal>
Facet_properties;

I also updated treat_new_facet() with these lines:

const Surface_patch_index& surface_index = properties->surface_index;
const Index& surface_center_index = properties->surface_center_index;
const Point& surface_center = properties->surface_center;

And I changed CGAL::cpp0x::make_tuple(...) and CGAL::cpp11::make_tuple(...)
into the constructor call Facet_properties_internal(...).

NOTE: This is not meant as a working replacement for this data structure,
but only as a means to find a workaround for the compiler bug. With these
changes, the following can be observed:

* Under VC2012, code compiles and seems to work (only tested with
examples/Mesh_3/mesh_implicit_sphere).

* Under VC2013 Update 1, the compiler internal error goes away. A .cpp file
containing only an include of <CGAL/Mesh_3/Refine_facets_3.h> or
<CGAL/make_mesh_3.h> compiles fine. However, another error appears when
compiling examples/Mesh_3/mesh_implicit_sphere. This error seems unrelated
and should be easier to find (?), so hopefully this information could bring
us closer to a working build in VC2013.

The new error message I get is very long, so I will only brief it here. I
could post the complete error if requested. It happens while compiling the
Mesh_criteria constructor from main() in mesh_implicit_sphere.cpp.

The error is reported in this file(line) :


CGAL-4.3/include/CGAL/Mesh_3/Robust_weighted_circumcenter_filtered_traits_3.h(241)

In this method:

CGAL::Robust_filtered_construct_weighted_circumcenter_3<K_>::operator
()(p,q,r)

On the last line:

return back_from_exact(exact_weighted_circumcenter(to_exact(p),
to_exact(q), to_exact(r)));

error C3066: there are multiple ways that an object of this type can be
called with these arguments

It seems to be a matching ambiguity involving Weighted_converter_3 /
Cartesian_converter.

The "path" down to the error is:

Mesh_criteria()
Mesh_criteria_3_impl::facet_criteria_;
Mesh_facet_criteria_3()
Mesh_facet_criteria_3::init_distance(distance_bound);
criteria_.add(new Curvature_criterion(distance_bound));
Curvature_size_criterion::Badness do_is_bad (const Facet& f) const
circumcenter = Gt().construct_weighted_circumcenter_3_object();
const Point_3 c = circumcenter(p1,p2,p3);
Robust_filtered_construct_weighted_circumcenter_3::operator()(p,q,r)
return back_from_exact(exact_weighted_circumcenter(to_exact(p), to_exact(q),
to_exact(r)));

Hope this helps...



--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Mesh-3-support-for-vs2013-tp4658737p4658839.html
Sent from the cgal-discuss mailing list archive at Nabble.com.



Archive powered by MHonArc 2.6.18.

Top of Page