Exemple #1
0
	double MSDM2_Component::getMaxDim(PolyhedronPtr polyhedron_ptr)
	{
		polyhedron_ptr->compute_bounding_box();
		
		double max=polyhedron_ptr->xmax()-polyhedron_ptr->xmin();
		if(polyhedron_ptr->ymax()-polyhedron_ptr->ymin()>max)
			max = polyhedron_ptr->ymax()-polyhedron_ptr->ymin();
		if(polyhedron_ptr->zmax()-polyhedron_ptr->zmin()>max)
			max = polyhedron_ptr->zmax()-polyhedron_ptr->zmin();

		return max;

	}
void Implicit_Surface_Meshing_Component::BuildPolyhedron(const C2t3& c2t3,PolyhedronPtr pMesh)
{
	Polyhedron_C2t3_Importer <Polyhedron::HalfedgeDS> builder (c2t3);
	pMesh->delegate(builder);//build the polyhedron
	//compute these properties in order to display the polyhedron in Mepp
		pMesh->compute_bounding_box();

		pMesh->compute_normals();
		pMesh->compute_type();

		(void)pMesh->calc_nb_components();
		(void)pMesh->calc_nb_boundaries();
}