int mepp_component_plugin_interface::load_file_from_component(PolyhedronPtr polyhedron_ptr, QString filename, Viewer* viewer)
{
	// here your code
	mepp_component_CGAL_Example_plugin *mepp_component_plugin = NULL;
	for (int i=0; i<viewer->lplugin.size(); ++i) {
		if (dynamic_cast<mepp_component_CGAL_Example_plugin*>(viewer->lplugin[i]) != 0) {
			mepp_component_plugin = dynamic_cast<mepp_component_CGAL_Example_plugin*>(viewer->lplugin[i]);
			//cout << "mepp_component_plugin found" << endl;
		}
	}

	int res;

	if (mepp_component_plugin)
	{
		CGAL_Example_ComponentPtr component_ptr = mepp_component_plugin->findOrCreateComponentForViewer<CGAL_Example_ComponentPtr, CGAL_Example_Component>(viewer, polyhedron_ptr);

		res = polyhedron_ptr->load_mesh_off(filename.toStdString());
	}
	else
		res=-1;
	
	return res;
}