diff options
| -rw-r--r-- | src/CGALEvaluator.cc | 13 | ||||
| -rw-r--r-- | src/CGAL_Nef_polyhedron.h | 2 | ||||
| -rw-r--r-- | src/cgal.h | 7 | ||||
| -rw-r--r-- | src/cgalutils.cc | 3 | ||||
| -rw-r--r-- | src/cgalutils.h | 2 | 
5 files changed, 15 insertions, 12 deletions
| diff --git a/src/CGALEvaluator.cc b/src/CGALEvaluator.cc index d0140fa..8417636 100644 --- a/src/CGALEvaluator.cc +++ b/src/CGALEvaluator.cc @@ -202,30 +202,31 @@ CGAL_Nef_polyhedron CGALEvaluator::applyResize(const CgaladvNode &node)  	if ( N.dim == 2 ) {  		CGAL_Iso_rectangle_2e bbox = bounding_box( *N.p2 );  		CGAL_Point_2e min2(bbox.min()), max2(bbox.max()); -		CGAL_Point_3 min3(min2.x(),min2.y(),0), max3(max2.x(),max2.y(),0); +		CGAL_Point_3 min3(CGAL::to_double(min2.x()), CGAL::to_double(min2.y()), 0), +			max3(CGAL::to_double(max2.x()), CGAL::to_double(max2.y()), 0);  		bb = CGAL_Iso_cuboid_3( min3, max3 );  	}  	else {  		bb = bounding_box( *N.p3 );  	} -	std::vector<NT> scale, bbox_size; -	for (int i=0;i<3;i++) scale.push_back( NT(1) ); +	std::vector<NT3> scale, bbox_size; +	for (int i=0;i<3;i++) scale.push_back( NT3(1) );  	bbox_size.push_back( bb.xmax()-bb.xmin() );  	bbox_size.push_back( bb.ymax()-bb.ymin() );  	bbox_size.push_back( bb.zmax()-bb.zmin() );  	for (int i=0;i<3;i++) {  		if (node.newsize[i]) { -			if (bbox_size[i]==NT(0)) { +			if (bbox_size[i]==NT3(0)) {  				PRINT("WARNING: Cannot resize in direction normal to flat object");  				return N;  			}  			else { -				scale[i] = NT(node.newsize[i]) / bbox_size[i]; +				scale[i] = NT3(node.newsize[i]) / bbox_size[i];  			}  		}  	} -	NT autoscale = std::max( scale[0], std::max( scale[1], scale[2] )); +	NT3 autoscale = std::max( scale[0], std::max( scale[1], scale[2] ));  	for (int i=0;i<3;i++) {  		if (node.autosize[i]) scale[i] = autoscale;  	} diff --git a/src/CGAL_Nef_polyhedron.h b/src/CGAL_Nef_polyhedron.h index cfab993..7f59861 100644 --- a/src/CGAL_Nef_polyhedron.h +++ b/src/CGAL_Nef_polyhedron.h @@ -1,7 +1,7 @@  #ifndef CGAL_NEF_POLYHEDRON_H_  #define CGAL_NEF_POLYHEDRON_H_ -#include "cgalfwd.h" +#include "cgal.h"  #include "memory.h"  #include <string>  #include "linalg.h" @@ -39,8 +39,8 @@ using boost::uintmax_t;  #include <CGAL/assertions_behaviour.h>  #include <CGAL/exceptions.h> -typedef CGAL::Gmpq NT; -typedef CGAL::Extended_cartesian<NT> CGAL_Kernel2; +typedef CGAL::Gmpq NT2; +typedef CGAL::Extended_cartesian<NT2> CGAL_Kernel2;  typedef CGAL::Nef_polyhedron_2<CGAL_Kernel2> CGAL_Nef_polyhedron2;  typedef CGAL_Kernel2::Aff_transformation_2 CGAL_Aff_transformation2; @@ -50,6 +50,7 @@ typedef CGAL::Polygon_with_holes_2<CGAL_ExactKernel2> CGAL_Poly2h;   //typedef CGAL::Cartesian<NT> CGAL_Kernel3;  typedef CGAL::Exact_predicates_exact_constructions_kernel CGAL_Kernel3; +typedef CGAL::Exact_predicates_exact_constructions_kernel::FT NT3;  typedef CGAL::Nef_polyhedron_3<CGAL_Kernel3> CGAL_Nef_polyhedron3;  typedef CGAL_Nef_polyhedron3::Aff_transformation_3 CGAL_Aff_transformation; @@ -64,7 +65,7 @@ typedef CGAL::Iso_cuboid_3<CGAL_Kernel3> CGAL_Iso_cuboid_3;  // CGAL_Nef_polyhedron2::Explorer::Point which is different than  // CGAL_Kernel2::Point. Hence the suffix 'e'  typedef CGAL_Nef_polyhedron2::Explorer::Point CGAL_Point_2e; -typedef CGAL::Iso_rectangle_2<CGAL::Simple_cartesian<NT> > CGAL_Iso_rectangle_2e; +typedef CGAL::Iso_rectangle_2<CGAL::Simple_cartesian<NT2> > CGAL_Iso_rectangle_2e;  #ifdef PREV_NDEBUG diff --git a/src/cgalutils.cc b/src/cgalutils.cc index 8b4c476..bb46f1c 100644 --- a/src/cgalutils.cc +++ b/src/cgalutils.cc @@ -193,7 +193,8 @@ void ZRemover::visit( CGAL_Nef_polyhedron3::Halffacet_const_handle hfacet )  			std::vector<CGAL_Nef_polyhedron2::Explorer::Point> contour;  			CGAL_For_all( c1, cend ) {  				CGAL_Nef_polyhedron3::Point_3 point3d = c1->source()->target()->point(); -				CGAL_Nef_polyhedron2::Explorer::Point point2d( point3d.x(), point3d.y() ); +				CGAL_Nef_polyhedron2::Explorer::Point point2d(CGAL::to_double(point3d.x()), +																											CGAL::to_double(point3d.y()));  				contour.push_back( point2d );  			}  			if (contour.size()==0) continue; diff --git a/src/cgalutils.h b/src/cgalutils.h index 6ea7711..d25fd4c 100644 --- a/src/cgalutils.h +++ b/src/cgalutils.h @@ -1,7 +1,7 @@  #ifndef CGALUTILS_H_  #define CGALUTILS_H_ -#include <cgalfwd.h> +#include <cgal.h>  class PolySet *createPolySetFromPolyhedron(const CGAL_Polyhedron &p);  CGAL_Polyhedron *createPolyhedronFromPolySet(const class PolySet &ps);  CGAL_Iso_cuboid_3 bounding_box( const CGAL_Nef_polyhedron3 &N ); | 
