Subject: CGAL users discussion list
List archive
- From:
- To:
- Subject: Re: [cgal-discuss] Joining 2 Polygon_with_holes_2 objects
- Date: Mon, 4 Feb 2008 19:18:40 +0200
Hi,
I ran your code on Linux and it works. The problem is with windows.
I attached the source and makefile.
Guy
Quoting Efi Fogel
<>:
Hello,
It's a crash of VC++. Note that VC8 is more robust than VC7.
andreas
Kenneth Tham wrote:
Hi,--
I have tried to use that function, but I always get the error: "error result returned from cl.exe". Attached is my code. The first join statement can work, but the second one cannot. Thanks for your help.
Regards,
Kenneth
-----Original Message-----
From: Efi Fogel
[mailto:]
Sent: Monday, February 04, 2008 5:33 PM
To:
Subject: Re: [cgal-discuss] Joining 2 Polygon_with_holes_2 objects
Kenneth Tham wrote:
Hi,There is a global function:
Is there a way of joining 2 Polygon_with_holes_2 using CGAL::join? I have only managed to use it with 2 Polygon_2 objects. Is there an example of using CGAL::join with 2 Polygon_with_holes_2 objects? The full definition of the object I'm using is CGAL::Polygon_with_holes_2<Kernel>. Thanks for your help.
Regards,
Kenneth
template <class Kernel, class Container>
inline bool join (const Polygon_with_holes_2<Kernel, Container> & pgn1,
const Polygon_with_holes_2<Kernel, Container> & pgn2,
Polygon_with_holes_2<Kernel, Container>& res);
I believe it is also documented.
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss
// This is the main project file for VC++ application project // generated using an Application Wizard. //#include "stdafx.h" #include "bso_rational_nt.h" #include <CGAL/Cartesian.h> #include <CGAL/Boolean_set_operations_2.h> #include "print_utils.h" //using namespace System; struct Kernel : public CGAL::Cartesian<Number_type> {}; typedef Kernel::Point_2 Point_2; typedef CGAL::Polygon_2<Kernel> Polygon_2; typedef CGAL::Polygon_with_holes_2<Kernel> Polygon_with_holes_2; int main(int argc, char argv[]) { Polygon_2 P; P.push_back (Point_2 (0, 1)); P.push_back (Point_2 (2, 0)); P.push_back (Point_2 (1, 1)); P.push_back (Point_2 (2, 2)); Polygon_2 Q; Q.push_back (Point_2 (3, 1)); Q.push_back (Point_2 (1, 2)); Q.push_back (Point_2 (2, 1)); Q.push_back (Point_2 (1, 0)); Polygon_with_holes_2 ph1(P); Polygon_with_holes_2 ph2(Q); Polygon_with_holes_2 ph3; Polygon_with_holes_2 ph4; CGAL::join (P, Q, ph3); print_polygon_with_holes (ph3); CGAL::join (ph1, ph2, ph4); print_polygon_with_holes (ph4); //system ("PAUSE"); return 0; }# Created by the script cgal_create_makefile
# This is the makefile for compiling a CGAL application.
#---------------------------------------------------------------------#
# include platform specific settings
#---------------------------------------------------------------------#
# Choose the right include file from the <cgalroot>/make directory.
# CGAL_MAKEFILE = ENTER_YOUR_INCLUDE_MAKEFILE_HERE
include $(CGAL_MAKEFILE)
#---------------------------------------------------------------------#
# compiler flags
#---------------------------------------------------------------------#
CXXFLAGS = \
-Wno-deprecated -I../../include \
$(CGAL_CXXFLAGS) \
$(LONG_NAME_PROBLEM_CXXFLAGS)
#---------------------------------------------------------------------#
# linker flags
#---------------------------------------------------------------------#
LIBPATH = \
$(CGAL_LIBPATH)
LDFLAGS = \
$(LONG_NAME_PROBLEM_LDFLAGS) \
$(CGAL_LDFLAGS)
#---------------------------------------------------------------------#
# target entries
#---------------------------------------------------------------------#
all: mergebug
clean: \
mergebug.clean
#---------------------------------------------------------------------#
# suffix rules
#---------------------------------------------------------------------#
.C$(OBJ_EXT):
$(CGAL_CXX) $(CXXFLAGS) $(OBJ_OPT) $<
.cpp$(OBJ_EXT):
$(CGAL_CXX) $(CXXFLAGS) $(OBJ_OPT) $<
- RE: [cgal-discuss] Joining 2 Polygon_with_holes_2 objects, Kenneth Tham, 02/04/2008
- Re: [cgal-discuss] Joining 2 Polygon_with_holes_2 objects, Andreas Fabri, 02/04/2008
- Message not available
- Re: [cgal-discuss] Joining 2 Polygon_with_holes_2 objects, guyzucke, 02/04/2008
- <Possible follow-up(s)>
- Re: [cgal-discuss] Joining 2 Polygon_with_holes_2 objects, Mahmood Naderan, 02/04/2008
- RE: [cgal-discuss] Joining 2 Polygon_with_holes_2 objects, Kenneth Tham, 02/05/2008
- RE: [cgal-discuss] Joining 2 Polygon_with_holes_2 objects, guyzucke, 02/06/2008
Archive powered by MHonArc 2.6.16.