Newbie - surface mesh combine (union)?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Newbie - surface mesh combine (union)?

Xiaofan Li-2

Hi all,

 

I am new to CGAL and (after reading the introduction & some tutorials) I am still puzzled about the very function that I’d realize using CGAL, i.e. I have two (or more) spheres that may intersect with each other. What I want is a combined triangulated mesh of the whole lot, with the overlay parts clipped away and junctions joined properly. I know how to mesh a sphere but have no idea what is the ‘recommended way’, or the best way, to implement the union operation using CGAL to its full scale. Any suggestions or keywords for me to search for are extremely welcome as I am an absolute beginner to CGAL, although reading code is not a problem for me.

 

Regards,

Xiaofan

 

--

Xiaofan Li

Biomolecular Modelling Laboratory

Cancer Research UK London Research Institute

 

Reply | Threaded
Open this post in threaded view
|

Re: Newbie - surface mesh combine (union)?

Nico Kruithof-2
Hi,

Probably the fastest method is to use the skin surface package which is also able to triangulate the boundary of a union of balls. It is quite fast, but doesn't give you a quality mesh. I suggest that you have a look at the examples in the Skin_surface_3 directory (especially union_of_balls_simple.cpp and union_of_balls_subdiv.cpp). As I wrote in my previous e-mail you need to patch one file before you can use the examples. Please let me know if you find the package usefull.

The other option is to use the delaunay mesher, but this probably requires some coding.

Bests,
Nico Kruithof

On Mon, Jun 30, 2008 at 5:08 PM, Xiaofan Li <[hidden email]> wrote:

Hi all,

 

I am new to CGAL and (after reading the introduction & some tutorials) I am still puzzled about the very function that I'd realize using CGAL, i.e. I have two (or more) spheres that may intersect with each other. What I want is a combined triangulated mesh of the whole lot, with the overlay parts clipped away and junctions joined properly. I know how to mesh a sphere but have no idea what is the 'recommended way', or the best way, to implement the union operation using CGAL to its full scale. Any suggestions or keywords for me to search for are extremely welcome as I am an absolute beginner to CGAL, although reading code is not a problem for me.

 

Regards,

Xiaofan

 

--

Xiaofan Li

Biomolecular Modelling Laboratory

Cancer Research UK London Research Institute

 


Reply | Threaded
Open this post in threaded view
|

Re: Newbie - surface mesh combine (union)?

Nico Kruithof-2
Hi Xiaofan,

On Tue, Jul 15, 2008 at 11:54 AM, Xiaofan Li <[hidden email]> wrote:

Hi Nico,

 

Sorry to bother you again regarding CGAL and the skin surface module you wrote. After reading the manual and some of the raw code I have become a bit confused. You mentioned in the manual that SkinSurface_3 is a "concept" but I failed to find this concept explicitly defined in your code?

That is correct. The concept defines the types and methods that a class should implement in order to be useable as a template. In this case the Skin_surface_3 class implements the SkinSurface_3 concept, which means that it implements the functions defined by the concept. On the implementation side I use a general base class both for the skin surface meshing and the meshing of the union of balls. But that is only an implementation issue.
 

I am new to CGAL and by intuition I thought if I were to materialise a Model (class) from a Concept, my new Model class should inherit the Concept (base) class. However, in your code I found models such as Skin_surface_3< … > are actually derived from a base class called Skin_surface_base_3< … >. Is this _base_ class the same thing as what is described in the manual as SkinSurface_3? If not, what are the differences between them? And if I want to have my own skin surface class, should I derive from Skin_surface_3 or Skin_surface_base_3?

Probably from Skin_surface_3 as you will also need the functions defined by Skin_surface_3 to get the complete implemenation of the SkinSurface_3 concept.
 

 

A few more questions include: if I copy construct a skin surface, will it be a hard copy or, internally, reference counting? Are copy constructors recommended for general use throughout CGAL or discouraged? I am planning to implement Richards (Conolly) surface definition (rolling probe spheres) for proteins and molecules – is SkinSurface_3 a good starting point or a more fundamental mesh class (please advise any)?

The copy will copy the underlying triangulation and datastructures so it is quite an expensive operation. The polyhedron with the additional links back to the skin surface will not work anymore as the pointers will still point to the old triangulation.

About the Conolly surfaces, this would in principle work, although it might be quite difficult as you cannot directly rely on the regular triangulation for the geometry of the patches. It might work if you add the radius of the solvent to the radii of the input balls, but I will have to give this some more thought. In any case you cannot use the mixed complex for the subdivision of the patches, but a similar structured subdivision might exist. I can send you a hardcopy of my PhD thesis if you are interested in reading more on skin surfaces.

 

Thanks a lot in advance for your time if you could give hints on the above problems.

Let me know if I can help you more. Having an implementation of conelly surfaces would  be nice.

Bests,
Nico

 

 

Regards,

Xiaofan

 


From: Nico Kruithof [mailto:[hidden email]]
Sent: Monday, June 30, 2008 8:45 PM

Subject: Re: [cgal-discuss] Newbie - surface mesh combine (union)?

 

Hi,

Probably the fastest method is to use the skin surface package which is also able to triangulate the boundary of a union of balls. It is quite fast, but doesn't give you a quality mesh. I suggest that you have a look at the examples in the Skin_surface_3 directory (especially union_of_balls_simple.cpp and union_of_balls_subdiv.cpp). As I wrote in my previous e-mail you need to patch one file before you can use the examples. Please let me know if you find the package usefull.

The other option is to use the delaunay mesher, but this probably requires some coding.

Bests,
Nico Kruithof

On Mon, Jun 30, 2008 at 5:08 PM, Xiaofan Li <[hidden email]> wrote:

Hi all,

 

I am new to CGAL and (after reading the introduction & some tutorials) I am still puzzled about the very function that I'd realize using CGAL, i.e. I have two (or more) spheres that may intersect with each other. What I want is a combined triangulated mesh of the whole lot, with the overlay parts clipped away and junctions joined properly. I know how to mesh a sphere but have no idea what is the 'recommended way', or the best way, to implement the union operation using CGAL to its full scale. Any suggestions or keywords for me to search for are extremely welcome as I am an absolute beginner to CGAL, although reading code is not a problem for me.

 

Regards,

Xiaofan

 

--

Xiaofan Li

Biomolecular Modelling Laboratory

Cancer Research UK London Research Institute