Geometry Factories

Factory functions for creating standard geometric shapes and test geometries.

Basis Creators

TinyGismo.createBSplineUnitInterval — Function
createBSplineUnitInterval(deg::Int)

Create a B-spline basis on the unit interval [0, 1].

Arguments

  • deg: Polynomial degree of the basis

Returns

A BSpline geometry of degree deg mapping the parametric domain [0, 1] onto the interval [0, 1] — that is, the identity curve, with parDim == targetDim == 1

Details

This is a convenience function for the standard univariate spline space on the unit interval with a clamped knot vector. Use TinyGismo.basis on the result to get the corresponding BSplineBasis.

Examples

# Quadratic identity curve on [0, 1]curve = createBSplineUnitInterval(2)# ... and its basisb = TinyGismo.basis(curve)
source

Basic Shapes

Rectangles and Quadrilaterals

TinyGismo.createBSplineRectangle — Function
createBSplineRectangle(low_x=0, low_y=0, upp_x=1, upp_y=1, turndeg=0)

Create a B-spline rectangular patch.

Arguments

  • low_x: Lower x-coordinate (default: 0)
  • low_y: Lower y-coordinate (default: 0)
  • upp_x: Upper x-coordinate (default: 1)
  • upp_y: Upper y-coordinate (default: 1)
  • turndeg: Rotation angle in degrees (default: 0)

Returns

A TensorBSpline{2} representing a rectangular patch

Examples

# Unit squarerect = createBSplineRectangle()# Custom rectangle -- arguments are positional; keyword arguments are not supportedrect = createBSplineRectangle(-1, -1, 2, 3)
source
TinyGismo.createBSplineTrapezium — Function
createBSplineTrapezium(Lbot=1, Ltop=0.5, H=1, d=0, turndeg=0)
createBSplineTrapezium(Ax, Ay, Bx, By, Cx, Cy, Dx, Dy, turndeg=0)

Create a B-spline trapezoidal patch.

Arguments

Parameter version:

  • Lbot: Length of bottom edge (default: 1)
  • Ltop: Length of top edge (default: 0.5)
  • H: Height (default: 1)
  • d: Horizontal offset of top edge (default: 0)
  • turndeg: Rotation angle in degrees (default: 0)

Corner points version:

  • Ax, Ay: First corner coordinates
  • Bx, By: Second corner coordinates
  • Cx, Cy: Third corner coordinates
  • Dx, Dy: Fourth corner coordinates
  • turndeg: Rotation angle in degrees (default: 0)

Returns

A TensorBSpline{2} representing a trapezoidal patch

Examples

# Parameter version -- arguments are positional; keyword arguments are not supportedtrap = createBSplineTrapezium(2, 1, 1.5)# Corner points versiontrap = createBSplineTrapezium(0, 0, 2, 0, 1.5, 1, 0.5, 1)
source
TinyGismo.createNurbsArcTrapezium — Function
createNurbsArcTrapezium(Lbot=1, Ltop=0.5, H=1, d=0, turndeg=0)
createNurbsArcTrapezium(Ax, Ay, Bx, By, Cx, Cy, Dx, Dy, turndeg=0)

Create a NURBS trapezoidal patch with curved sides.

Arguments

Parameter version:

  • Lbot: Length of bottom edge (default: 1)
  • Ltop: Length of top edge (default: 0.5)
  • H: Height (default: 1)
  • d: Horizontal offset of top edge (default: 0)
  • turndeg: Rotation angle in degrees (default: 0)

Corner points version:

  • Ax, Ay: First corner coordinates
  • Bx, By: Second corner coordinates
  • Cx, Cy: Third corner coordinates
  • Dx, Dy: Fourth corner coordinates
  • turndeg: Rotation angle in degrees (default: 0)

Returns

A TensorNurbs{2} representing a trapezoidal patch with curved edges

Details

Unlike the B-spline version, this creates a trapezium with smoothly curved sides using NURBS.

source

Triangles

TinyGismo.createBSplineTriangle — Function
createBSplineTriangle(H=1, W=1)

Create a triangular B-spline patch.

Arguments

  • H: Height of the triangle (default: 1)
  • W: Width of the triangle base (default: 1)

Returns

A TensorBSpline{2} representing a triangular patch

source

Simple Primitives

TinyGismo.createBSplineSquare — Function
createBSplineSquare(r=1, x=0, y=0)

Create a square B-spline patch.

Arguments

  • r: Radius/scale factor (default: 1)
  • x: Center x-coordinate (default: 0)
  • y: Center y-coordinate (default: 0)

Returns

A TensorBSpline{2} representing a square patch

source
TinyGismo.createBSplineSegment — Function
createBSplineSegment(u0=0, u1=1)

Create a B-spline line segment.

Arguments

  • u0: Start parameter (default: 0)
  • u1: End parameter (default: 1)

Returns

A BSpline curve representing a line segment, with parDim == targetDim == 1

Details

Creates a simple parametric line segment that can be used as a basis for other constructions.

source

2D Shapes

Circles and Disks

TinyGismo.createNurbsCircle — Function
createNurbsCircle(r=1, x=0, y=0)

Create a NURBS circle curve.

Arguments

  • r: Radius (default: 1)
  • x: Center x-coordinate (default: 0)
  • y: Center y-coordinate (default: 0)

Returns

A Nurbs curve representing a circle

source
TinyGismo.createBSplineFatCircle — Function
createBSplineFatCircle(r=1, x=0, y=0)

Create a B-spline circle patch (disk).

Arguments

  • r: Radius (default: 1)
  • x: Center x-coordinate (default: 0)
  • y: Center y-coordinate (default: 0)

Returns

A BSpline curve in the plane (parDim == 1, targetDim == 2) approximating a circle. For the filled disk as a surface, see createBSplineFatDisk.

source
TinyGismo.createBSplineFatDisk — Function
createBSplineFatDisk(r=1, x=0, y=0)

Create a B-spline disk patch.

Arguments

  • r: Radius (default: 1)
  • x: Center x-coordinate (default: 0)
  • y: Center y-coordinate (default: 0)

Returns

A TensorBSpline{2} representing a disk patch

source

Rings and Annuli

TinyGismo.createNurbsQuarterAnnulus — Function
createNurbsQuarterAnnulus(r0=1, r1=2)

Create a quarter annulus (ring) NURBS patch.

Arguments

  • r0: Inner radius (default: 1)
  • r1: Outer radius (default: 2)

Returns

A TensorNurbs{2} representing a quarter annulus

source
TinyGismo.createNurbsAnnulus — Function
createNurbsAnnulus(r0=1, r1=2)

Create a full annulus (ring) NURBS patch.

Arguments

  • r0: Inner radius (default: 1)
  • r1: Outer radius (default: 2)

Returns

A TensorNurbs{2} representing a complete annulus

source

Organic and Custom Shapes

TinyGismo.createBSplineAmoeba — Function
createBSplineAmoeba(r=1, x=0, y=0)

Create an amoeba-shaped B-spline patch.

Arguments

  • r: Radius/scale factor (default: 1)
  • x: Center x-coordinate (default: 0)
  • y: Center y-coordinate (default: 0)

Returns

A TensorBSpline{2} representing an amoeba shape

Details

Creates an organic, blob-like shape useful for testing and demonstrations.

source
TinyGismo.createBSplineAmoebaBig — Function
createBSplineAmoebaBig(r=1, x=0, y=0)

Create a larger amoeba-shaped B-spline patch with more detail.

Arguments

  • r: Radius/scale factor (default: 1)
  • x: Center x-coordinate (default: 0)
  • y: Center y-coordinate (default: 0)

Returns

A TensorBSpline{2} representing a larger amoeba shape

source
TinyGismo.createBSplineAmoeba3degree — Function
createBSplineAmoeba3degree(r=1, x=0, y=0)

Create a cubic (degree 3) amoeba-shaped B-spline patch.

Arguments

  • r: Radius/scale factor (default: 1)
  • x: Center x-coordinate (default: 0)
  • y: Center y-coordinate (default: 0)

Returns

A TensorBSpline{2} representing an amoeba shape with cubic basis functions

source
TinyGismo.createBSplineFish — Function
createBSplineFish(r=1, x=0, y=0)

Create a fish-shaped B-spline patch.

Arguments

  • r: Radius/scale factor (default: 1)
  • x: Center x-coordinate (default: 0)
  • y: Center y-coordinate (default: 0)

Returns

A TensorBSpline{2} representing a fish shape

source
TinyGismo.createBSplineAustria — Function
createBSplineAustria(r=1, x=0, y=0)

Create an Austria-shaped B-spline patch.

Arguments

  • r: Radius/scale factor (default: 1)
  • x: Center x-coordinate (default: 0)
  • y: Center y-coordinate (default: 0)

Returns

A TensorBSpline{2} representing the outline of Austria

source
TinyGismo.createNurbsAmoebaFull — Function
createNurbsAmoebaFull(r=1, x=0, y=0)

Create a full amoeba-shaped NURBS patch.

Arguments

  • r: Radius/scale factor (default: 1)
  • x: Center x-coordinate (default: 0)
  • y: Center y-coordinate (default: 0)

Returns

A TensorNurbs{2} representing a full amoeba shape

source
TinyGismo.createNurbsBean — Function
createNurbsBean(r=1, x=0, y=0)

Create a bean-shaped NURBS patch.

Arguments

  • r: Radius/scale factor (default: 1)
  • x: Center x-coordinate (default: 0)
  • y: Center y-coordinate (default: 0)

Returns

A TensorNurbs{2} representing a bean shape

source
TinyGismo.createBSplineE — Function
createBSplineE(r=1, x=0, y=0)

Create a capital E-shaped B-spline patch.

Arguments

  • r: Radius/scale factor (default: 1)
  • x: Center x-coordinate (default: 0)
  • y: Center y-coordinate (default: 0)

Returns

A TensorBSpline{2} representing the letter E

source

3D Shapes

Volumes

TinyGismo.createBSplineCube — Function
createBSplineCube(r=1, x=0, y=0, z=0)

Create a cube B-spline volume.

Arguments

  • r: Radius/scale factor (default: 1)
  • x: Center x-coordinate (default: 0)
  • y: Center y-coordinate (default: 0)
  • z: Center z-coordinate (default: 0)

Returns

A TensorBSpline{3} representing a cubic volume

source
TinyGismo.createBSplineHalfCube — Function
createBSplineHalfCube(r=1, x=0, y=0, z=0)

Create a half-cube B-spline volume.

Arguments

  • r: Radius/scale factor (default: 1)
  • x: Center x-coordinate (default: 0)
  • y: Center y-coordinate (default: 0)
  • z: Center z-coordinate (default: 0)

Returns

A TensorBSpline{3} representing a half-cubic volume

source
TinyGismo.createNurbsCube — Function
createNurbsCube(r=1, x=0, y=0, z=0)

Create a cube NURBS volume.

Arguments

  • r: Radius/scale factor (default: 1)
  • x: Center x-coordinate (default: 0)
  • y: Center y-coordinate (default: 0)
  • z: Center z-coordinate (default: 0)

Returns

A TensorNurbs{3} representing a cubic volume

source
TinyGismo.createNurbsSphere — Function
createNurbsSphere(r=1, x=0, y=0, z=0)

Create a NURBS sphere.

Arguments

  • r: Radius (default: 1)
  • x: Center x-coordinate (default: 0)
  • y: Center y-coordinate (default: 0)
  • z: Center z-coordinate (default: 0)

Returns

A TensorNurbs{2} representing a sphere — a surface, so parDim == 2 and targetDim == 3

source

Curves

TinyGismo.createNurbsCurve1 — Function
createNurbsCurve1(r=1, x=0, y=0)

Create a NURBS curve (variant 1).

Arguments

  • r: Radius/scale factor (default: 1)
  • x: Center x-coordinate (default: 0)
  • y: Center y-coordinate (default: 0)

Returns

A Nurbs curve

source
TinyGismo.createNurbsCurve2 — Function
createNurbsCurve2(r=1, x=0, y=0)

Create a NURBS curve (variant 2).

Arguments

  • r: Radius/scale factor (default: 1)
  • x: Center x-coordinate (default: 0)
  • y: Center y-coordinate (default: 0)

Returns

A Nurbs curve

source

Engineering Benchmarks

TinyGismo.createNurbsQrtPlateWHoleC0 — Function
createNurbsQrtPlateWHoleC0()

Create a quarter plate with a hole (C0 continuity).

Returns

A TensorNurbs{2} representing a quarter of a plate with a circular hole

Details

This benchmark geometry is commonly used for testing structural mechanics problems, particularly for plates with stress concentrations.

source