Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] fix border edges for mesh simplification

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] fix border edges for mesh simplification


Chronological Thread 
  • From: "Fernando Cacciola" <>
  • To: <>
  • Subject: Re: [cgal-discuss] fix border edges for mesh simplification
  • Date: Tue, 1 Apr 2008 12:33:54 -0300
  • Organization: Geometry Factory

Hi Qianqian,

Fernando Cacciola wrote:
Hi Qianqian,

typedef typename Profile::const_in_edge_iterator
const_in_edge_iterator ;

Replacing the above line to
typedef typename Profile::ConstGraphTraits::const_in_edge_iterator
const_in_edge_iterator ;

the error message became:

edge_collapse_enriched_polyhedron.cpp:142: error: no type named
‘const_in_edge_iterator’ in ‘struct boost::graph_traits<const
CGAL::Polyhedron_3<CGAL::Simple_cartesian<double>,
CGAL::Polyhedron_items_with_id_3, CGAL::HalfedgeDS_default,
std::allocator<int> > >’

seems something still not quite right.

OK...
I couldn't compile the warpper myself because the development version of the package was broken and I had been postponing fixing it until I finish something else.
But now I just fixed it, so I was able to try the wrapper myself...
There were some additional errors, but the attached version works AFAICT.

Best

Fernando Cacciola
GeometryFactory
template<class GetPlacement_>
struct Placement_with_fixed_border_vertices : GetPlacement_
{
typedef GetPlacement_ GetPlacement ;

typedef typename GetPlacement::Profile Profile ;

typedef typename GetPlacement::result_type result_type ;

typedef typename Profile::ECM ECM ;
typedef typename Profile::const_vertex_descriptor const_vertex_descriptor ;
typedef typename Profile::const_edge_descriptor const_edge_descriptor ;
typedef typename Profile::ConstGraphTraits::in_edge_iterator const_in_edge_iterator ;
result_type operator()( Profile const& aProfile ) const
{
if ( is_border_vertex(aProfile.v0(), aProfile.surface()) ||
is_border_vertex(aProfile.v1(), aProfile.surface()) )
return boost::none ;
else
return this->GetPlacement::operator()(aProfile);
}

bool is_border_vertex( const_vertex_descriptor v, ECM& aSurface ) const
{
bool rR = false ;

const_in_edge_iterator eb, ee ; for ( boost::tie(eb,ee) = boost::in_edges(v,aSurface) ; eb != ee ; ++ eb )
{
const_edge_descriptor lEdge = *eb ;
if ( lEdge->is_border() || lEdge->opposite()->is_border() )
{
rR = true ;
break ;
}
}
return rR ; }
} ;



Archive powered by MHonArc 2.6.16.

Top of Page