Closed j042 closed 1 year ago
This PR looks reasonable to me for non-rational splines. However I am not sure about the meaningfulness of the parametric view of rational splines. For example, consider the following spline:
import splinepy as sp
import numpy as np
# Create a nurbs
nurbs = sp.NURBS(
degrees=[2, 1],
knot_vectors=[
[0.0, 0.0, 0.0, 0.5, 1.0, 1.0, 1.0],
[0.0, 0.0, 1.0, 1.0],
],
control_points=[
[0.0, 0.0],
[1.0, 0.0],
[2.0, 0.0],
[3.0, 0.0],
[0.0, 1.0],
[1.0, 1.0],
[2.0, 1.0],
[3.0, 1.0],
],
weights=[1.0, 0.5, 1.0, 1.0, 1, 1, 0.5, 1],
)
nurbs.create.parametric_view(conform=True).show()
This will plot like so:
Is this what you intended?
This PR looks reasonable to me for non-rational splines. However I am not sure about the meaningfulness of the parametric view of rational splines. For example, consider the following spline:
import splinepy as sp import numpy as np # Create a nurbs nurbs = sp.NURBS( degrees=[2, 1], knot_vectors=[ [0.0, 0.0, 0.0, 0.5, 1.0, 1.0, 1.0], [0.0, 0.0, 1.0, 1.0], ], control_points=[ [0.0, 0.0], [1.0, 0.0], [2.0, 0.0], [3.0, 0.0], [0.0, 1.0], [1.0, 1.0], [2.0, 1.0], [3.0, 1.0], ], weights=[1.0, 0.5, 1.0, 1.0, 1, 1, 0.5, 1], ) nurbs.create.parametric_view(conform=True).show()
This will plot like so:
Is this what you intended?
not really, thanks for pointing this out!
The goal was to visualize boundary conditions in parametric view. but in this case, I see that knot lines are somewhat confusing
Overview
add conform flag to parametric_view. then resulting spline has conforming parametric space and cps are placed on parametric space "box". Expected use case is in interactive mode, where you can set boundary conditions based on difference in control point locations in parametric view. Added test Also fixes some errors in create
Addressed issues
from_bounds()
Checklists