[Gmsh] constructing trimmed NURBS surfaces
cgeuzaine at uliege.be
Fri Nov 27 10:52:29 CET 2020
> On 27 Nov 2020, at 01:21, Banks, Stephen (Energy, Clayton North) <Stephen.Banks at csiro.au> wrote:
> Hi Christophe,
> Yes, I agree that the most natural way would be to specify wires of curves defined in the parametric space of the surface. OpenNURBS also does it this way, i.e. uses 2D parameter space trimming curves (https://developer.rhino3d.com/guides/cpp/brep-data-structure/). Inspection of these curves in OpenNURBS reveals it constructs a "2D curve" using a 3D curve with the 'Z' coordinate used in the curve construction set to zero.
I've pushed a first implementation: you can now pass wires to the addBSplineSurface() and addBezierSurface() API functions. The wires can be either interpreted in 2D (in the parametric space of the surface), or in 3D (projected on the patch). See https://gitlab.onelab.info/gmsh/gmsh/-/blob/master/demos/api/bspline_bezier_trimmed.py for an example.
Don't hesitate to open an issue on the gitlab to discuss the implementation.
> Kind regards,
> -----Original Message-----
> From: Christophe Geuzaine <cgeuzaine at uliege.be>
> Sent: Thursday, 26 November 2020 10:51 PM
> To: Banks, Stephen (Energy, Clayton North) <Stephen.Banks at csiro.au>
> Cc: gmsh at onelab.info
> Subject: Re: [Gmsh] constructing trimmed NURBS surfaces
> Hi Stephen,
> We currently only create trimmed patches indirectly, e.g. through boolean operations.
> It would indeed be nice to expose an interface for building trimmed surfaces directly. I guess the most natural way would be to specify wires of curves defined in the parametric space of the surface? We would need to think a bit about how to design the api, since in Gmsh we only expose the creation of 3D curves.
>> On 26 Nov 2020, at 07:07, Banks, Stephen (Energy, Clayton North) <Stephen.Banks at csiro.au> wrote:
>> How do I construct trimmed NURBS surfaces?
>> In section F.4 of the documentation, point (1) states Gmsh supports trimmed NURBS surface with the OpenCASCADE kernel. However, I am not able to work out how construct them. I see the addBSplineSurface function, which I have successfully used to construct a NURBS surface, but I don’t see how to trim the resulting surface using curves.
>> For background, I am developing an interface between Rhino3D and Gmsh using the OpenNURBS library and the Gmsh API. This involves translating the geometry from one representation to the other. This question is prompted by me trying translate OpenNURBS Brep (boundary representation) geometrical objects to Gmsh, which is a surface or polysurface with trim curve information.
>> Many thanks,
>> gmsh mailing list
>> gmsh at onelab.info
> Prof. Christophe Geuzaine
> University of Liege, Electrical Engineering and Computer Science http://people.montefiore.ulg.ac.be/geuzaine
> gmsh mailing list
> gmsh at onelab.info
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science
More information about the gmsh