Source code for nurbspy

# Import geometry modules
from .nurbs_basis_functions    import *
from .nurbs_curve              import *
from .nurbs_curve_circular_arc import *
from .nurbs_surface            import *
from .nurbs_surface_bilinear   import *
from .nurbs_surface_ruled      import *
from .nurbs_surface_extruded   import *
from .nurbs_surface_revolution import *
from .nurbs_surface_coons      import *

from .graphics import *

# Package info
__version__ = "1.2.2"
PACKAGE_NAME = "nurbspy"
URL_GITHUB = "https://github.com/turbo-sim/nurbspy"
URL_DOCS = "https://turbo-sim.github.io/nurbspy/"
# URL_DTU = "https://thermalpower.dtu.dk/"
BREAKLINE = 80 * "-"




    # https://manytools.org/hacker-tools/ascii-banner/
    # Style: Slant





# NURBS curve minimal working example
[docs] def minimal_example(): # Import packages import numpy as np import matplotlib.pyplot as plt from .nurbs_curve import NurbsCurve print_package_info() # Define the array of control points P = np.zeros((2,5)) P[:, 0] = [0.20, 0.50] P[:, 1] = [0.40, 0.70] P[:, 2] = [0.80, 0.60] P[:, 3] = [0.80, 0.40] P[:, 4] = [0.40, 0.20] # Create and plot the Bezier curve bezierCurve = NurbsCurve(control_points=P) bezierCurve.plot() plt.show()
print_package_info() set_plot_options()