[Gmsh] Surface bounded by two arbitrary closed (spline) curves

Christophe Geuzaine cgeuzaine at uliege.be
Wed Aug 21 14:46:38 CEST 2019


Dear Mathias,

In surface_using_points.geo, OpenCASCADE computes one amongst the infinite number of surfaces passing through (well, close to) the points. You might want to investigate the parameters given to the BRepOffsetAPI_MakeFilling() method to see if a more judicious choice could lead to a more suitable fit. If you do we could clearly interface the interesting parameters so that we could set them in scripts or through the api.

In surface_splitted.geo, there are no functions currently to create an arbitrary surface by fitting as in surface_using_points.geo, but with holes.

Somehow I feel that you need to add more constraints to better define the one surface that represents "best" your data.

Christophe




> On 7 Aug 2019, at 18:25, Mathias Scheunert <mathias.scheunert at math.tu-freiberg.de> wrote:
> 
> 
> Dear developers and users,
> 
> *** The problem
> our group wants to use Gmsh for setting up meshes for simulation of geophysical data.
> Therefore we need to create surfaces which are bounded by a circle or rectangular curve and that contain some topographic information (from given point cloud) in the “interior” part.
> The given points have to be part of the resulting mesh.
> 
> Defining a Curve Loop from piece-wise splines (or just Lines) and adding all the points to the surface leads to undesired “topographic features” in the area between the boundary and the point cloud in the resulting mesh.
> See surface_using_points.geo
> 
> Furthermore, by refining the mesh by splitting, one can see that the mesh around the points added is not flat/smooth anymore.
> See mesh_issue.png
> 
> So we separately defined a surface of the interior part by defining a surrounding spline curve, which provides a "nice" mesh for that part.
> See surface_splitted.geo
> 
> Now we need to obtain a flat surface that is bounded by the outermost rectangular curve and the spline curve to obtain a coherent surface.
> We played around with ThruSection (hoping that this is the most promising way to go) but facing the following problems:
> 
> 1)
> Curve Loop(50) = {out_spl[]};
> Wire(1) = {1};
> Wire(2) = {30};
> ThruSections{1, 2}
> → Here we get an Error, that OpenCASCADE can’t find the Curve Loop from splines
> 
> So we neglect the request for a rectangular outermost boundary an tried
> 2)
> Spline(1) = {1:4, 1};
> Curve Loop(50) = {1};
> Wire(1) = {1};
> Wire(2) = {30};
> ThruSections{1, 2}
> → now Wire(1) can be created from Spline(1) but the resulting mesh is somehow twisted (although enjoyable flat …)
> 
> 
> *** The question(s)
> Can our approach be used at all?
> → we definitely want to avoid playing around with meshes externally like: http://onelab.info/pipermail/gmsh/2018/012591.html
> 
> If so – how? 
> Or is there a more promising way to attack our problem?
> 
> Best regards,
> Mathias
> 
> ps: We are using Gmsh 4.3.0.
> 
> -- 
> Dr. Mathias Scheunert
> Institute of Geophysics and Geoinformatics, TU Bergakademie Freiberg
> Gustav-Zeuner-Str. 12, D-09596 Freiberg
> Tel.: +493731393630
> 
> <mesh_issue.png><surface_splitted.geo><surface_using_points.geo>_______________________________________________
> gmsh mailing list
> gmsh at onelab.info
> http://onelab.info/mailman/listinfo/gmsh

— 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://www.montefiore.ulg.ac.be/~geuzaine






More information about the gmsh mailing list