From 9b61608b07eb9bc4ba1f8b161a8e474082094226 Mon Sep 17 00:00:00 2001 From: Scott Davidson Date: Mon, 15 Jan 2024 08:48:50 -0800 Subject: [PATCH] updated for RHino 8 --- rhinopython/SampleBoxSpaceMorph.py | 2 +- rhinopython/SampleCurvature.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rhinopython/SampleBoxSpaceMorph.py b/rhinopython/SampleBoxSpaceMorph.py index 0b10403b..ed21e33e 100644 --- a/rhinopython/SampleBoxSpaceMorph.py +++ b/rhinopython/SampleBoxSpaceMorph.py @@ -37,7 +37,7 @@ def MorphPoint(self, point): def SampleBoxSpaceMorph(): obj_id = rs.GetObject("Select surface or polysurface", rs.filter.surface and rs.filter.polysurface) - if None == obj_id: return + if obj_id is None: return brep = rs.coercebrep(obj_id) if brep is None: return diff --git a/rhinopython/SampleCurvature.py b/rhinopython/SampleCurvature.py index 39742c2e..11a21ac0 100644 --- a/rhinopython/SampleCurvature.py +++ b/rhinopython/SampleCurvature.py @@ -51,7 +51,7 @@ def SampleCurvature(): go.GeometryFilter = Rhino.DocObjects.ObjectType.Curve go.SubObjectSelect = False go.Get() - if go.CommandResult() <> Rhino.Commands.Result.Success: + if go.CommandResult() != Rhino.Commands.Result.Success: return go.CommandResult() curve = go.Object(0).Curve() @@ -62,7 +62,7 @@ def SampleCurvature(): gp = SampleGetCurvaturePoint(curve) gp.SetCommandPrompt("Select point on curve for curvature measurement") gp.Get() - if gp.CommandResult() <> Rhino.Commands.Result.Success: + if gp.CommandResult() != Rhino.Commands.Result.Success: return gp.CommandResult() # One final curvature calculation