Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Problem to write/read nef file

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Problem to write/read nef file


Chronological Thread 
  • From: Guillaume Caron <>
  • To:
  • Subject: Re: [cgal-discuss] Problem to write/read nef file
  • Date: Wed, 22 May 2013 13:20:04 +0200

Indeed, this is working. Thanks a lot.

Guillaume.

Le 21/05/2013 11:01, Sebastien Loriot (GeometryFactory) a écrit :
My patch was buggy, here is the patch file that makes it works with lazy_exact_nt and EPEC kernel.

Let me know if it works for you too.

Sebastien.

On 05/21/2013 10:57 AM, Guillaume Caron wrote:
Just one more thing, when i want work with the cartesian kernel i have
this error at the compilation:

/include/CGAL/Nef_3/SNC_io_parser.h: In static member function ‘static
void CGAL::Geometry_io<CGAL::Cartesian_tag,
CGAL::Epeck>::print_point(std::ostream&, CGAL::Point_3<R>)’:
include/CGAL/Nef_3/SNC_io_parser.h:781: erreur: ‘Exact_kernel’ in class
‘CGAL::Epeck’ does not name a type
include/CGAL/Nef_3/SNC_io_parser.h:781: erreur: invalid type in
declaration before ‘;’ token/
...

I have to include CGAL/exact_predicates_exact_constructions_kernel.h to
not have this error.
Even if I do not use it.

Guillaume.



Le 16/05/2013 15:53, Sebastien Loriot (GeometryFactory) a écrit :
On 05/16/2013 03:32 PM, Guillaume Caron wrote:
Ok, thanks a lot, indeed, this is working for the predefined kernel.

So what version of CGAL/Nef_3/SNC_io_parser.h is it?
Nothing official for now. However, it will be in the next release.


And do you think that the problem for Lazy_exact_nt will be fixed for
the next release of CGAL?
It's on my todo list.

Sebastien.


Guillaume.


Le 16/05/2013 14:18, Sebastien Loriot (GeometryFactory) a écrit :
On 05/16/2013 12:06 PM, Guillaume Caron wrote:
Yes, I still have the same problem/error.
The specialization indeed no longer match. Try with to use the
following version of CGAL/Nef_3/SNC_io_parser.h

It worked on my machine.

Sebastien.


Guillaume.

Le 16/05/2013 12:02, Sebastien Loriot (GeometryFactory) a écrit :
On 05/16/2013 11:56 AM, Guillaume Caron wrote:
Ok, thank you for the answer but as I said I have the same problem
with
the predefined kernel
CGAL::Exact_predicates_exact_constructions_kernel.

And if I understood correctly,
CGAL::Exact_predicates_exact_constructions_kernel is equal to:
CGAL::Cartesian<CGAL::Lazy_exact_nt<CGAL::Quotient<CGAL:Gmpz>>>.
No, it is something like Lazy_kernel< Simple_cartesian< CGAL::Gmpq >,
... > for which a specialization is available.

Do you still have the problem?

Sebastien.


So if the problem is a specialization of an internal writer missing
for
a kernel using Lazy_exact_nt, the predefined kernel can not work
either,
no?

Guillaume.


Le 16/05/2013 11:38, Sebastien Loriot (GeometryFactory) a écrit :
There is a specialization of an internal writer missing for a
kernel
using Lazy_exact_nt as number type.

If it is OK for you, use
CGAL::Exact_predicates_exact_constructions_kernel as "kernel".

I'll try to fix this for the next release of CGAL.

Sebastien.

On 05/15/2013 03:51 PM, Guillaume C wrote:
Hi,

I'm new to CGAL, and i try to write a Nef_polyhedron in a nef file
and read
it after. But i have an error when i use lazy_exact_nt or
predefined
kernels.

My program:

/
typedef CGAL::Lazy_exact_nt< CGAL::Gmpq> FT_t;
typedef CGAL::Cartesian< FT_t> kernel;
typedef CGAL::Nef_polyhedron_3< kernel> Nef_polyhedron;
typedef CGAL::Polyhedron_3< kernel> Polyhedron;
typedef Polyhedron::Point_3 Point;



int main()
{

Point p(sqrt(2), 0, 0);
Point q( 0,sqrt(2), 0);
Point r( 0, 0,sqrt(2));
Point s( 0, 0, 0);

Nef_polyhedron Cube,Cube2;
Polyhedron P;
P.make_tetrahedron( p, q, r, s);
Cube=P;

std::ofstream out ("temp.nef");
out<< Cube;

std::ifstream in ("temp.nef");
in>> Cube;

return 0;
}/

And the error:

/terminate called after throwing an instance of
'CGAL::Assertion_exception'
what(): CGAL ERROR: assertion violation!
File:
/home/ostab/PACKAGE/CGAL-3.9/include/CGAL/Nef_3/SNC_io_parser.h
Line: 1368
Explanation: SNC_io_parser::read: error in node line
Abandon/

Thank you.



--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Problem-to-write-read-nef-file-tp4657449.html




Sent from the cgal-discuss mailing list archive at Nabble.com.






















Archive powered by MHonArc 2.6.18.

Top of Page