Skip to content

Commit feb3a8c

Browse files
Merge branch 'feat/nurbs_surface_body_creation' of https://github.com/ansys/pyansys-geometry into feat/nurbs_surface_body_creation
2 parents 860d5e3 + 978d81f commit feb3a8c

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

src/ansys/geometry/core/_grpc/_services/v0/conversions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@
5555
TrimmedCurve as GRPCTrimmedCurve,
5656
TrimmedSurface as GRPCTrimmedSurface,
5757
)
58-
from ansys.geometry.core.shapes.surfaces.nurbs import NURBSSurface
5958
import pint
6059

6160
from ansys.geometry.core.errors import GeometryRuntimeError
6261
from ansys.geometry.core.misc.checks import graphics_required
62+
from ansys.geometry.core.shapes.surfaces.nurbs import NURBSSurface
6363

6464
if TYPE_CHECKING: # pragma: no cover
6565
import pyvista as pv

src/ansys/geometry/core/shapes/surfaces/nurbs.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,17 +119,17 @@ def knotvector_v(self) -> list[Real]:
119119
def weights(self) -> list[Real]:
120120
"""Get the weights of the control points."""
121121
return self._nurbs_surface.weights
122-
122+
123123
@property
124124
def origin(self) -> Point3D:
125125
"""Get the origin of the surface."""
126126
return self._origin
127-
127+
128128
@property
129129
def dir_x(self) -> UnitVector3D:
130130
"""Get the reference direction of the surface."""
131131
return self._reference
132-
132+
133133
@property
134134
def dir_z(self) -> UnitVector3D:
135135
"""Get the axis direction of the surface."""

tests/integration/test_design.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3247,10 +3247,14 @@ def test_surface_body_creation(modeler: Modeler):
32473247

32483248
# nurbs surface
32493249
points = [
3250-
Point3D([0, 0, 0]), Point3D([0, 1, 1]),
3251-
Point3D([0, 2, 0]), Point3D([1, 0, 1]),
3252-
Point3D([1, 1, 2]), Point3D([1, 2, 1]),
3253-
Point3D([2, 0, 0]), Point3D([2, 1, 1]),
3250+
Point3D([0, 0, 0]),
3251+
Point3D([0, 1, 1]),
3252+
Point3D([0, 2, 0]),
3253+
Point3D([1, 0, 1]),
3254+
Point3D([1, 1, 2]),
3255+
Point3D([1, 2, 1]),
3256+
Point3D([2, 0, 0]),
3257+
Point3D([2, 1, 1]),
32543258
Point3D([2, 2, 0]),
32553259
]
32563260
degree_u = 2

0 commit comments

Comments
 (0)