Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] OFF files-Edges Creation (Triangluation)

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] OFF files-Edges Creation (Triangluation)


Chronological Thread 
  • From: Philipp Moeller <>
  • To:
  • Cc: Philipp Moeller <>
  • Subject: Re: [cgal-discuss] OFF files-Edges Creation (Triangluation)
  • Date: Thu, 15 Mar 2012 11:09:08 +0100
  • Organization: GeometryFactory

In the example you posted, there is one more face than specified in the
header. This facet is ignored by the off reader. Although the extra face
is a duplicate anyway.

To generate OFF files that are valid for a polyhedron, no faces should
be duplicated and no vertices should be duplicated.

You got the vertices right in this example, but you need 12 faces for a
triangulated cube.

I'm not familiar with VRML but writing a converter shouldn't be too hard
and meshconv [2] (never tried it) seems capable of it.

--
Philipp Moeller
GeometryFactory

[2] : http://www.cs.princeton.edu/~min/meshconv/

Helmi Ben Hmida
<>
writes:

> Hi Philipp,
> Thanks for u re replay,
> In fact, I want to write an off file onto a Polydehron. Unfortuantely,
> at the beganning, we don´t have theses OFF files, just we have a VRML
> and x3d file that we re converting to OFF files. We have made a forst
> attempt to convert the faces of the VRML to OFF, but, we re getting
> always an empty Polyhderon, based on Nicholas´s suggestions, it works
> with a triangulated faces, just with this compbination (see
> example). I tried to simulate others faces combination, but getting an
> empty Polyhderon.
> The question was, is there some specific restrictions, or algorithm to
> create theses faces.
>
> Hpepefully that it´s clear
>
> Thanks in advance for u re help, we r blocked here for 2 weeks
>
> Am 14.03.2012 23:40, schrieb Philipp Moeller:
>> Helmi Ben
>> Hmida<>
>> writes:
>>
>>> Hello every Body,
>>> I´m trying to weel create the edges in an OFF files respecting this
>>> template (functional example) in order to convert it to a
>>> polyderon. To do, an algorithm creating edges has to be automatically
>>> implemented.
>>> The standard example sent is this one
>>> OFF
>>> 8 10 0
>>> 19.454456 9.214429 9.195417
>>> 19.454456 9.214429 6
>>> 19.629456 9.214429 6
>>> 19.629456 9.214429 9.195417
>>> 19.629456 13.049429 6
>>> 19.629456 13.049429 8.724564
>>> 19.454456 13.049429 6
>>> 19.454456 13.049429 8.724564
>>> 3 0 1 2
>>> 3 2 3 0
>>> 3 3 2 4
>>> 3 4 5 3
>>> 3 5 4 6
>>> 3 6 7 5
>>> 3 7 6 1
>>> 3 1 0 7
>>> 3 3 5 7
>>> 3 7 0 3
>>> 3 7 0 3
>>>
>>>
>>> The problem is with the 4 last edges, is there any relations between
>>> them to be created automatically by an algorithm, since we have a
>>> verayty of 3D points number (not always 8)
>>>
>>> Thanks in advance
>>> H.
>>>
>> It's hard to understand what you want to do. Do you want to read or
>> write an OFF file from or into a Polyhedron? Polyhedron overloads
>> operator<< and operator>> for those tasks [1].
>>
>> If this has absolutely no relevance to your question, I misunderstood
>> you.
>>
>> HTH,
>> Philipp Moeller
>> GeometryFactory
>>
>> [1] :
>> http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Polyhedron/Chapter_main.html#Section_25.4
>>



Archive powered by MHonArc 2.6.16.

Top of Page