Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Problem in 3D Triangulation

Subject: CGAL users discussion list

List archive

[cgal-discuss] Problem in 3D Triangulation


Chronological Thread 
  • From: "Yang Liu" <>
  • To:
  • Subject: [cgal-discuss] Problem in 3D Triangulation
  • Date: Tue, 24 Jun 2008 16:35:05 +0200
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:to:subject:mime-version:content-type; b=oWBOLRoWf7muHdH47Y9ux6G6cVy0O7jxIM8QuqsGUpu1b6xkm9PJYd9URReIEGUJja 9KQ2eURM2sHLve4XAWN2Nu4/tN46XDMJLG7nUO0uKP53k1IItjbP+VNT73a540XBbSqT IRTGBDqH91Z6X9BsCs8cr3SIB+qoPa/dLJuFI=

Dear all,

Recently I am using CGAL to compute 3D triangulation.
For some input data,  the 3D triangulation does not work.

My simple test code is attached at the end of this email.

I am using Microsoft Visual Studio 2008 and CGAL-3.3.1.
The CGAL library is recompiled under VS2008.

My program always reports "Microsoft C++ exception: CGAL::Uncertain_conversion_exception at memory location ..." in debug mode.

In release mode, the program stops at some place, the call stack is attached after my sample code.


I have tried to use Exact_predicates_exact_constructions_kernel,
the problem is still there.

Does anyone know how to solve this problem ?


Thanks.

Yang Liu

INRIA - LORIA


-----------------------------------------------------------------------------------------

#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Triangulation_3.h>

typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Triangulation_3<K>  Triangulation3D;
typedef Triangulation3D::Point    Point3D;

#include <iostream>
#include <fstream>

int main()
{
Triangulation3D DT;

std::ifstream mout("c:\\test.txt");
for (int i = 0; i < 7; i++)
{
double x, y, z;
mout >> x >> y >> z;
DT.insert(Point3D(x,y,z));
}
mout.close();

return 0;
}
-------------------------------------------------------------------
test.txt

5.2797039788822553e-002 -1.0000000000000000e+000 -8.5052301668333641e-001
-6.4775641845221166e-001 -1.0000000000000000e+000 8.8775770697145473e-001
4.9765656210897458e-001 -2.5474338749700953e-001 5.0567501274491111e-001
1.0000000000000000e+000 -1.0000000000000000e+000 1.2851343478562227e-001
1.0000000000000000e+000 -1.0000000000000000e+000 -5.0824290316902976e-001
-3.1646143449986469e-001 -1.0000000000000000e+000 1.0000000000000000e+000
-3.0282326636478069e-001 -8.4918673507225406e-001 1.0000000000000000e+000

-----------------------------
Call stack in release mode

testcgal.exe!std::vector<short,std::allocator<short> >::_Ufill(short * _Ptr=0x005f74fc, unsigned int _Count=1, const short & _Val=8422)  Line 1259 + 0x19 bytes

testcgal.exe!std::vector<short,std::allocator<short> >::_Insert_n()  + 0x10d bytes

testcgal.exe!std::vector<short,std::allocator<short> >::insert()  + 0x4e bytes

testcgal.exe!std::vector<short,std::allocator<short> >::push_back()  + 0x62 bytes

testcgal.exe!CGAL::MP_Float::construct_from_builtin_fp_type<double>()  + 0x144 bytes

testcgal.exe!CGAL::MP_Float::MP_Float()  + 0x46 bytes

testcgal.exe!CGAL::Split_double<CGAL::MP_Float>::operator()(double d=0.12851343478562227, CGAL::MP_Float & num={...}, CGAL::MP_Float & den={...})  Line 70 + 0x13 bytes

testcgal.exe!CGAL::Quotient<CGAL::MP_Float>::Quotient<CGAL::MP_Float>(const double & n=0.12851343478562227)  Line 94

testcgal.exe!CGAL::NT_converter<double,CGAL::Quotient<CGAL::MP_Float> >::operator()(const double & a=)  Line 39 + 0xf bytes

testcgal.exe!CGAL::Cartesian_converter<CGAL::Type_equality_wrapper<CGAL::Cartesian_base_no_ref_count<double,CGAL::Filtered_kernel<CGAL::Simple_cartesian<double> > >,CGAL::Filtered_kernel<CGAL::Simple_cartesian<double> > >,CGAL::Simple_cartesian<CGAL::Quotient<CGAL::MP_Float> >,CGAL::NT_converter<double,CGAL::Quotient<CGAL::MP_Float> > >::operator()(const CGAL::Point_3<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double> > > & a={...})  Line 225 + 0x13 bytes

testcgal.exe!CGAL::Filtered_predicate<CGAL::CartesianKernelFunctors::Orientation_3<CGAL::Simple_cartesian<CGAL::Quotient<CGAL::MP_Float> > >,CGAL::CartesianKernelFunctors::Orientation_3<CGAL::Simple_cartesian<CGAL::Interval_nt<0> > >,CGAL::Cartesian_converter<CGAL::Type_equality_wrapper<CGAL::Cartesian_base_no_ref_count<double,CGAL::Filtered_kernel<CGAL::Simple_cartesian<double> > >,CGAL::Filtered_kernel<CGAL::Simple_cartesian<double> > >,CGAL::Simple_cartesian<CGAL::Quotient<CGAL::MP_Float> >,CGAL::NT_converter<double,CGAL::Quotient<CGAL::MP_Float> > >,CGAL::Cartesian_converter<CGAL::Type_equality_wrapper<CGAL::Cartesian_base_no_ref_count<double,CGAL::Filtered_kernel<CGAL::Simple_cartesian<double> > >,CGAL::Filtered_kernel<CGAL::Simple_cartesian<double> > >,CGAL::Simple_cartesian<CGAL::Interval_nt<0> >,CGAL::NT_converter<double,CGAL::Interval_nt<0> > >,1>::operator()<CGAL::Point_3<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double> > >,CGAL::Point_3<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double> > >,CGAL::Point_3<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double> > >,CGAL::Point_3<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double> > > >(const CGAL::Point_3<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double> > > & a1={...}, const CGAL::Point_3<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double> > > & a2={...}, const CGAL::Point_3<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double> > > & a3={...}, const CGAL::Point_3<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double> > > & a4={...})  Line 457 + 0xf bytes

testcgal.exe!CGAL::SF_Orientation_3<CGAL::Filtered_kernel_base<CGAL::Type_equality_wrapper<CGAL::Cartesian_base_no_ref_count<double,CGAL::Filtered_kernel<CGAL::Simple_cartesian<double> > >,CGAL::Filtered_kernel<CGAL::Simple_cartesian<double> > > > >::operator()(const CGAL::Point_3<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double> > > & p={...}, const CGAL::Point_3<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double> > > & q={...}, const CGAL::Point_3<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double> > > & r={...}, const CGAL::Point_3<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double> > > & s={...})  Line 127

testcgal.exe!CGAL::TR3<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double> >,CGAL::TDS3<CGAL::T_vb3<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double> >,CGAL::TDS_vb3<void> >,CGAL::T_cb3<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double> >,CGAL::TDS_cb3<void> > > >::locate(const CGAL::Point_3<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double> > > & p={...}, CGAL::TR3<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double> >,CGAL::TDS3<CGAL::T_vb3<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double> >,CGAL::TDS_vb3<void> >,CGAL::T_cb3<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double> >,CGAL::TDS_cb3<void> > > >::Locate_type & lt=OUTSIDE_CONVEX_HULL, int & li=0, int & lj=2090193940, CGAL::TDS3<CGAL::T_vb3<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double> >,CGAL::TDS_vb3<void> >,CGAL::T_cb3<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double> >,CGAL::TDS_cb3<void> > >::Cell_handle start={...})  Line 1517 + 0x19 bytes

testcgal.exe!main()  Line 21 + 0x47 bytes

testcgal.exe!_encode_pointer(void * ptr=0x00000000)  Line 114 + 0x5 bytes

00393358()

kernel32.dll!7c817067()

[Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]

---------------------------






Archive powered by MHonArc 2.6.16.

Top of Page