Skip to Content.
Sympa Menu

cgal-discuss - Re: Re: Re: [cgal-discuss][Nef_polyhedron]convert_to_Polyhedron(Polyhedron& P)

Subject: CGAL users discussion list

List archive

Re: Re: Re: [cgal-discuss][Nef_polyhedron]convert_to_Polyhedron(Polyhedron& P)


Chronological Thread 
  • From: "Max" <>
  • To: "" <>
  • Subject: Re: Re: Re: [cgal-discuss][Nef_polyhedron]convert_to_Polyhedron(Polyhedron& P)
  • Date: Fri, 18 Jan 2008 21:32:14 +0800
  • Disposition-notification-to: "Max" <>
  • Organization: LoadCom

Thanks you, Peter.

Max

>Hi Max,
>
>the problems have nothing to do with the new functionality but with
>the kernel. If you modify for off-file with floating-point coordinates
>as input, you must use the Exact_predicates_exact_constructions_kernel.
>
>About your other question. To find out how to get all the shells, you
>should study the incidence structure. Look at:
>
>http://www.cgal.org/Manual/3.3/doc_html/cgal_manual/Nef_3/Chapter_main.html#Subsection_18.7.2
>http://www.cgal.org/Manual/3.3/doc_html/cgal_manual/Nef_3_ref/Class_Nef_polyhedron_3-Traits---Volume.html
>
>Peter
>
>
>On Fri, 2008-01-18 at 10:44 +0800, Max wrote:
>> Hello Peter,
>>
>> I've tested with three OFF models as attached.
>> The output are as follows:
>>
>> 1. robocat_deci.off
>> I got only a bunch of "Error !!!!!!!!!!!!!!!!!!!!!!!" then
>> the program terminated abnormally.
>>
>> 2. torus_tri.off
>> The program terminated abnormally without saying anything.
>>
>> 3. Simple.off
>> The program said:
>> old impl 0.07
>> new impl 0.06
>> and then ends normally.
>>
>> My platform:
>> CGAL 3.3.1
>> Windows XP/SP2
>> VS2005 without SP1
>>
>> Build under release mode.
>>
>> One more question: If the code runs correctly, how can I get
>> the group of single closed polyhedrona I needed?
>>
>> p.s., I've slightly modified the program to get a model in OFF format.
>> it's also attached. perhaps some problem comes from the conversion
>> from a polyhedron to a nef_3.
>>
>> B/Rgds
>> Max
>>
>> >Hello Peter,
>> >
>> >Thank you very much for you prompt and detailed reply!
>> >I'll test your code addition and post the result asap.
>> >
>> >B/Rgds
>> >Max
>> >
>> >>Hi Max,
>> >>
>> >>I got this question frequently off late. For this reason I implemented a
>> >>new function. Add the attached file shell_to_nef_3.h to your
>> >>include/CGAL/Nef_3 directory and add the following code to
>> >>Nef_polyhedron_3.h:
>> >>
>> >>Nef_polyhedron_3(const Nef_polyhedron& N,
>> >> SFace_const_iterator sf)
>> >>{
>> >> SNC_structure rsnc;
>> >> *this = Nef_polyhedron_3(rsnc, new SNC_point_locator_default, false);
>> >> initialize_infibox_vertices(EMPTY);
>> >> shell_to_nef_3(N, sf, snc());
>> >> build_external_structure();
>> >> simplify();
>> >> CGAL::Mark_bounded_volumes<Nef_polyhedron_3> mbv(true);
>> >> delegate(mbv);
>> >> set_snc(snc());
>> >>}
>> >>
>> >>There is another file attached, which demonstrates the usage. This
>> >>program compares two methods of conversion, an old and simple one with
>> >>the new one. If you don't use CGAL 3.3.1, you won't have the code for
>> >>the old implementation and need to comment/ignore the first part of the
>> >>program. I originally wrote the code to work for closed inner shells,
>> >>but maybe it also works non-closed shells and outer shells. Please tell
>> >>me how it works.
>> >>
>> >>Peter
>> >>
>> >>
>> >>On Thu, 2008-01-17 at 19:18 +0800, Max wrote:
>> >>> Hi all,
>> >>>
>> >>> I know if a Nef_polyhedron is simple (or, in other words,
>> >>> a manifold), it could be converted to a single polyhedron
>> >>> with the method:
>> >>>
>> >>> Nef_polyhedron::convert_to_Polyhedron ( Polyhedron& P)
>> >>>
>> >>> My question is, if N is not a single manifold, but still finite,
>> >>> is there a way in CGAL to convert it into a group of polyhedra?
>> >>>
>> >>> Thanks for any help.
>> >>>
>> >>> B/Rgds
>> >>> Max
>> >>>
>> >>--
>> >>You are currently subscribed to cgal-discuss.
>> >>To unsubscribe or access the archives, go to
>> >>https://lists-sop.inria.fr/wws/info/cgal-discuss
>> >>
>> >--
>> >You are currently subscribed to cgal-discuss.
>> >To unsubscribe or access the archives, go to
>> >https://lists-sop.inria.fr/wws/info/cgal-discuss
>> >--
>> You are currently subscribed to cgal-discuss.
>> To unsubscribe or access the archives, go to
>> https://lists-sop.inria.fr/wws/info/cgal-discuss
>--
>You are currently subscribed to cgal-discuss.
>To unsubscribe or access the archives, go to
>https://lists-sop.inria.fr/wws/info/cgal-discuss
>



Archive powered by MHonArc 2.6.16.

Top of Page