Geometry Description

gmsh.model.geo.addPointFunction
gmsh.model.geo.addPoint(x, y, z, meshSize = 0., tag = -1)

Add a geometrical point in the built-in CAD representation, at coordinates (x, y, z). If meshSize is > 0, add a meshing constraint at that point. If tag is positive, set the tag explicitly; otherwise a new tag is selected automatically. Return the tag of the point. (Note that the point will be added in the current model only after synchronize is called. This behavior holds for all the entities added in the geo module.)

Return an integer value.

source
gmsh.model.geo.addLineFunction
gmsh.model.geo.addLine(startTag, endTag, tag = -1)

Add a straight line segment in the built-in CAD representation, between the two points with tags startTag and endTag. If tag is positive, set the tag explicitly; otherwise a new tag is selected automatically. Return the tag of the line.

Return an integer value.

source
gmsh.model.geo.addCircleArcFunction
gmsh.model.geo.addCircleArc(startTag, centerTag, endTag, tag = -1, nx = 0., ny = 0., nz = 0.)

Add a circle arc (strictly smaller than Pi) in the built-in CAD representation, between the two points with tags startTag and endTag, and with center centerTag. If tag is positive, set the tag explicitly; otherwise a new tag is selected automatically. If (nx, ny, nz) != (0, 0, 0), explicitly set the plane of the circle arc. Return the tag of the circle arc.

Return an integer value.

source
gmsh.model.geo.addEllipseArcFunction
gmsh.model.geo.addEllipseArc(startTag, centerTag, majorTag, endTag, tag = -1, nx = 0., ny = 0., nz = 0.)

Add an ellipse arc (strictly smaller than Pi) in the built-in CAD representation, between the two points startTag and endTag, and with center centerTag and major axis point majorTag. If tag is positive, set the tag explicitly; otherwise a new tag is selected automatically. If (nx, ny, nz) != (0, 0, 0), explicitly set the plane of the circle arc. Return the tag of the ellipse arc.

Return an integer value.

source
gmsh.model.geo.addSplineFunction
gmsh.model.geo.addSpline(pointTags, tag = -1)

Add a spline (Catmull-Rom) curve in the built-in CAD representation, going through the points pointTags. If tag is positive, set the tag explicitly; otherwise a new tag is selected automatically. Create a periodic curve if the first and last points are the same. Return the tag of the spline curve.

Return an integer value.

source
gmsh.model.geo.addBSplineFunction
gmsh.model.geo.addBSpline(pointTags, tag = -1)

Add a cubic b-spline curve in the built-in CAD representation, with pointTags control points. If tag is positive, set the tag explicitly; otherwise a new tag is selected automatically. Creates a periodic curve if the first and last points are the same. Return the tag of the b-spline curve.

Return an integer value.

source
gmsh.model.geo.addBezierFunction
gmsh.model.geo.addBezier(pointTags, tag = -1)

Add a Bezier curve in the built-in CAD representation, with pointTags control points. If tag is positive, set the tag explicitly; otherwise a new tag is selected automatically. Return the tag of the Bezier curve.

Return an integer value.

source
gmsh.model.geo.addPolylineFunction
gmsh.model.geo.addPolyline(pointTags, tag = -1)

Add a polyline curve in the built-in CAD representation, going through the points pointTags. If tag is positive, set the tag explicitly; otherwise a new tag is selected automatically. Create a periodic curve if the first and last points are the same. Return the tag of the polyline curve.

Return an integer value.

source
gmsh.model.geo.addCompoundSplineFunction
gmsh.model.geo.addCompoundSpline(curveTags, numIntervals = 5, tag = -1)

Add a spline (Catmull-Rom) curve in the built-in CAD representation, going through points sampling the curves in curveTags. The density of sampling points on each curve is governed by numIntervals. If tag is positive, set the tag explicitly; otherwise a new tag is selected automatically. Return the tag of the spline.

Return an integer value.

source
gmsh.model.geo.addCompoundBSplineFunction
gmsh.model.geo.addCompoundBSpline(curveTags, numIntervals = 20, tag = -1)

Add a b-spline curve in the built-in CAD representation, with control points sampling the curves in curveTags. The density of sampling points on each curve is governed by numIntervals. If tag is positive, set the tag explicitly; otherwise a new tag is selected automatically. Return the tag of the b-spline.

Return an integer value.

source
gmsh.model.geo.addCurveLoopFunction
gmsh.model.geo.addCurveLoop(curveTags, tag = -1, reorient = false)

Add a curve loop (a closed wire) in the built-in CAD representation, formed by the curves curveTags. curveTags should contain (signed) tags of model entities of dimension 1 forming a closed loop: a negative tag signifies that the underlying curve is considered with reversed orientation. If tag is positive, set the tag explicitly; otherwise a new tag is selected automatically. If reorient is set, automatically reorient the curves if necessary. Return the tag of the curve loop.

Return an integer value.

source
gmsh.model.geo.addCurveLoopsFunction
gmsh.model.geo.addCurveLoops(curveTags)

Add curve loops in the built-in CAD representation based on the curves curveTags. Return the tags of found curve loops, if any.

Return tags.

source
gmsh.model.geo.addPlaneSurfaceFunction
gmsh.model.geo.addPlaneSurface(wireTags, tag = -1)

Add a plane surface in the built-in CAD representation, defined by one or more curve loops wireTags. The first curve loop defines the exterior contour; additional curve loop define holes. If tag is positive, set the tag explicitly; otherwise a new tag is selected automatically. Return the tag of the surface.

Return an integer value.

source
gmsh.model.geo.addSurfaceFillingFunction
gmsh.model.geo.addSurfaceFilling(wireTags, tag = -1, sphereCenterTag = -1)

Add a surface in the built-in CAD representation, filling the curve loops in wireTags using transfinite interpolation. Currently only a single curve loop is supported; this curve loop should be composed by 3 or 4 curves only. If tag is positive, set the tag explicitly; otherwise a new tag is selected automatically. Return the tag of the surface.

Return an integer value.

source
gmsh.model.geo.addSurfaceLoopFunction
gmsh.model.geo.addSurfaceLoop(surfaceTags, tag = -1)

Add a surface loop (a closed shell) formed by surfaceTags in the built-in CAD representation. If tag is positive, set the tag explicitly; otherwise a new tag is selected automatically. Return the tag of the shell.

Return an integer value.

source
gmsh.model.geo.addVolumeFunction
gmsh.model.geo.addVolume(shellTags, tag = -1)

Add a volume (a region) in the built-in CAD representation, defined by one or more shells shellTags. The first surface loop defines the exterior boundary; additional surface loop define holes. If tag is positive, set the tag explicitly; otherwise a new tag is selected automatically. Return the tag of the volume.

Return an integer value.

source
gmsh.model.geo.extrudeFunction
gmsh.model.geo.extrude(dimTags, dx, dy, dz, numElements = Cint[], heights = Cdouble[], recombine = false)

Extrude the entities dimTags in the built-in CAD representation, using a translation along (dx, dy, dz). Return extruded entities in outDimTags. If numElements is not empty, also extrude the mesh: the entries in numElements give the number of elements in each layer. If height is not empty, it provides the (cumulative) height of the different layers, normalized to 1. If recombine is set, recombine the mesh in the layers.

Return outDimTags.

source
gmsh.model.geo.revolveFunction
gmsh.model.geo.revolve(dimTags, x, y, z, ax, ay, az, angle, numElements = Cint[], heights = Cdouble[], recombine = false)

Extrude the entities dimTags in the built-in CAD representation, using a rotation of angle radians around the axis of revolution defined by the point (x, y, z) and the direction (ax, ay, az). The angle should be strictly smaller than Pi. Return extruded entities in outDimTags. If numElements is not empty, also extrude the mesh: the entries in numElements give the number of elements in each layer. If height is not empty, it provides the (cumulative) height of the different layers, normalized to 1. If recombine is set, recombine the mesh in the layers.

Return outDimTags.

source
gmsh.model.geo.twistFunction
gmsh.model.geo.twist(dimTags, x, y, z, dx, dy, dz, ax, ay, az, angle, numElements = Cint[], heights = Cdouble[], recombine = false)

Extrude the entities dimTags in the built-in CAD representation, using a combined translation and rotation of angle radians, along (dx, dy, dz) and around the axis of revolution defined by the point (x, y, z) and the direction (ax, ay, az). The angle should be strictly smaller than Pi. Return extruded entities in outDimTags. If numElements is not empty, also extrude the mesh: the entries in numElements give the number of elements in each layer. If height is not empty, it provides the (cumulative) height of the different layers, normalized to 1. If recombine is set, recombine the mesh in the layers.

Return outDimTags.

source
gmsh.model.geo.extrudeBoundaryLayerFunction
gmsh.model.geo.extrudeBoundaryLayer(dimTags, numElements = [1], heights = Cdouble[], recombine = false, second = false, viewIndex = -1)

Extrude the entities dimTags in the built-in CAD representation along the normals of the mesh, creating discrete boundary layer entities. Return extruded entities in outDimTags. The entries in numElements give the number of elements in each layer. If height is not empty, it provides the height of the different layers. If recombine is set, recombine the mesh in the layers. A second boundary layer can be created from the same entities if second is set. If viewIndex is >= 0, use the corresponding view to either specify the normals (if the view contains a vector field) or scale the normals (if the view is scalar).

Return outDimTags.

source
gmsh.model.geo.translateFunction
gmsh.model.geo.translate(dimTags, dx, dy, dz)

Translate the entities dimTags in the built-in CAD representation along (dx, dy, dz).

source
gmsh.model.geo.rotateFunction
gmsh.model.geo.rotate(dimTags, x, y, z, ax, ay, az, angle)

Rotate the entities dimTags in the built-in CAD representation by angle radians around the axis of revolution defined by the point (x, y, z) and the direction (ax, ay, az).

source
gmsh.model.geo.dilateFunction
gmsh.model.geo.dilate(dimTags, x, y, z, a, b, c)

Scale the entities dimTag in the built-in CAD representation by factors a, b and c along the three coordinate axes; use (x, y, z) as the center of the homothetic transformation.

source
gmsh.model.geo.mirrorFunction
gmsh.model.geo.mirror(dimTags, a, b, c, d)

Mirror the entities dimTag in the built-in CAD representation, with respect to the plane of equation a * x + b * y + c * z + d = 0.

source
gmsh.model.geo.symmetrizeFunction
gmsh.model.geo.symmetrize(dimTags, a, b, c, d)

Mirror the entities dimTag in the built-in CAD representation, with respect to the plane of equation a * x + b * y + c * z + d = 0. (This is a synonym for mirror, which will be deprecated in a future release.)

source
gmsh.model.geo.copyFunction
gmsh.model.geo.copy(dimTags)

Copy the entities dimTags in the built-in CAD representation; the new entities are returned in outDimTags.

Return outDimTags.

source
gmsh.model.geo.removeFunction
gmsh.model.geo.remove(dimTags, recursive = false)

Remove the entities dimTags in the built-in CAD representation. If recursive is true, remove all the entities on their boundaries, down to dimension 0.

source
gmsh.model.geo.removeAllDuplicatesFunction
gmsh.model.geo.removeAllDuplicates()

Remove all duplicate entities in the built-in CAD representation (different entities at the same geometrical location).

source
gmsh.model.geo.splitCurveFunction
gmsh.model.geo.splitCurve(tag, pointTags)

Split the curve of tag tag in the built-in CAD representation, on the control points pointTags. Return the tags curveTags of the newly created curves.

Return curveTags.

source
gmsh.model.geo.getMaxTagFunction
gmsh.model.geo.getMaxTag(dim)

Get the maximum tag of entities of dimension dim in the built-in CAD representation.

Return an integer value.

source
gmsh.model.geo.setMaxTagFunction
gmsh.model.geo.setMaxTag(dim, maxTag)

Set the maximum tag maxTag for entities of dimension dim in the built-in CAD representation.

source
gmsh.model.geo.addPhysicalGroupFunction
gmsh.model.geo.addPhysicalGroup(dim, tags, tag = -1)

Add a physical group of dimension dim, grouping the entities with tags tags in the built-in CAD representation. Return the tag of the physical group, equal to tag if tag is positive, or a new tag if tag < 0.

Return an integer value.

source
gmsh.model.geo.removePhysicalGroupsFunction
gmsh.model.geo.removePhysicalGroups(dimTags = Tuple{Cint,Cint}[])

Remove the physical groups dimTags from the built-in CAD representation. If dimTags is empty, remove all groups.

source
gmsh.model.geo.synchronizeFunction
gmsh.model.geo.synchronize()

Synchronize the built-in CAD representation with the current Gmsh model. This can be called at any time, but since it involves a non trivial amount of processing, the number of synchronization points should normally be minimized. Without synchronization the entities in the built-in CAD representation are not available to any function outside of the built-in CAD kernel functions.

source