Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Load a mesh in Gmsh format

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Load a mesh in Gmsh format


Chronological Thread 
  • From: Chris Marsh <>
  • To: <>, <>
  • Subject: Re: [cgal-discuss] Load a mesh in Gmsh format
  • Date: Thu, 8 Nov 2018 21:28:28 -0600
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=Pass
  • Ironport-phdr: 9a23:8z721BXBMW6IHMb1NwajjQHexs3V8LGtZVwlr6E/grcLSJyIuqrYbRSDt8tkgFKBZ4jH8fUM07OQ7/i/HzRYqb+681k6OKRWUBEEjchE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i764jEdAAjwOhRoLerpBIHSk9631+ev8JHPfglEnjWwba9wIRmssQndqtQdjJd/JKo21hbHuGZDdf5MxWNvK1KTnhL86dm18ZV+7SleuO8v+tBZX6nicKs2UbJXDDI9M2Ao/8LrrgXMTRGO5nQHTGoblAdDDhXf4xH7WpfxtTb6tvZ41SKHM8D6Uaw4VDK/5KptVRTmijoINyQh/W7YhMx/jqJVrhyiqRJi3YDbfJqYNP9icq7HZ94WWXZNU8RXWidcAo28dYwPD+8ZMOtGr4n9vVoOrQCjDgerHuzv0CRIhn/r1qA9z+shERvG3A07H94UtXTbts/1NLwSUe2u0anI1i/Mb+hV2Tvn9IfHaAksrPeRVrx+dsrRzFMgFwLDjliIqIzlOSmV1uUXvGSB4epgT/qji2o5pA1ouTeg3N0sipLTioIT1F/E6T11wIk0Jd2kSE57fMWrHIFMuCGdMot6Wt8tQ2FyuCY70b0GvIS0fDIRyJQn3RLQd+aIfo6V6RzgTOacOSp0iGxmdb6lmRq//0atxvfiWsWp0FtGtDRJn9bQunwVyRDf9syKRuF+80qhwzqDygHe5+BeLUwpl6fWL5gsyaMqmJUJq0TMBCr2lV32jKCIckUk/fCl6+H9bbXnop+QLZJ0ihrkPaQ1mcyzG/g3PRIWU2ia/+SzyqHj8FXkTLlUjfA6iLfVvZ7UKMgBuKK1Hg9Y3pw95xuwEzuqyNEYkmMGLFJBdhKHlY/pO1TWLf/kDfe/mVWskCxxy/DDJLLhGI7NLnjYnbf8ZrZy8VVcyAkpwd9D/Z1YEqsBL+7rWk/tqNzYCQc0PBC7w+n9DNVxz54RWWOUAqCFLaPSqkSI6/k0I+iMYY8VoCzyJ+Ik5/7ol385mEUScbOn3ZsNOziFGO97KRCZfWb0mYVGVnwbuxI3Cu3sklyLFzBJIG2jWro1oTA9BoXhBojKQsWhgaeKwTygTaFRMzRNBVmIVHvpbI6ZQOwkaSSII8YnnCZSEfD1Wogo0xeGsAK/wbN9NazS9zFO5rz5090gzO3JlAp60DVuFMTVh2qNVWBv2GYBXSQ29L1kqFd+jFyKh/sry8dEHMBesqsaGjwxMoTRmrQjWoLCHznZd9LMc26IB9CvADU/VNU0modcfl10ANbkhRmRhnP2UY9QrKSCAdkPyoyZx2L4fp4v1m3Pz6pnhFB0GpISZ13jvbZ28k3oP6CMk0idkP/3J6EV3SqL6XyK1mnIt0gKCQM=

Ah I just made a note of the type in the comments. I think auto is stillpreferable for the overall example.

I'm sorry to hear this is being so problematic. I've attached the code and cmake file to this email -- I hope the list doesn't strip it out. I've cc'd you on this email just to be sure.
This code correctly compiles and runs for me.

> With this described approach, I  will create several times the same point.
You're right, I was being too general sorry.

I'll describe what I do:
Since the Vertex_handle is just a pointer, you can store them with low overhead.  Then, when you read a face that uses it, you just use that existing i-th vertex. For example:

here I read and make all the vertexes

then I grab the i-th vertex when I make the new face, so I never duplicate a vertex

I hope that's more clear,

Cheers
Chris


Chris Marsh
PhD Candidate
chrismarsh.ca

On Thu, 8 Nov 2018 at 19:37, Yoann LE BARS <> wrote:

Hello everybody out there!

On 2018/11/09 at 01:47 am, Chris Marsh wrote:
> Oh, no auto is too bad. In this case, it's triangulation::Vertex_handle
> and triangulation::Face_handle. You have to use the template derived class.
> I've updated the SO to make this more clear. Does this let you compile now?

        Well, I cannot see any difference on Stackoverflow.

        Anyway, as I indicated in the previous message, in my own code when I
use “Triangulation::Vertex_handle”, I have this compilation error
indicating it does not provide “set_point”.

> I fear it won't really help you, but on off chance it does, this is a
> section of code where I build the CGAL data structure from a file
> https://github.com/Chrismarsh/CHM/blob/master/src/mesh/triangulation.cpp#L232

        I have started to read this, I will take some times to investigate it.

> The general approach with millions of faces is to, while reading in the
> gmsh/whatever file, you create the 3 vertexes, insert the face, and move
> on.

        It sounds quite reasonable, but I do not know how to do this, as a
vertex usually belongs to several faces. With this described approach, I
will create several times the same point.

        Best regards.

--
Yoann LE BARS
http://le-bars.net/yoann/
Diaspora* :

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


cmake_minimum_required (VERSION 3.12)
project (tri)
find_package(CGAL REQUIRED)
include(${CGAL_USE_FILE})



include_directories(
${CGAL_INCLUDE_DIRS}
${CGAL_3RD_PARTY_INCLUDE_DIRS})

add_executable(main
main.cpp)

target_link_libraries(main ${CGAL_3RD_PARTY_LIBRARIES})

Attachment: main.cpp
Description: Binary data




Archive powered by MHonArc 2.6.18.

Top of Page