Skip to content

Commit

Permalink
Hacking
Browse files Browse the repository at this point in the history
  • Loading branch information
danieldresser-ie committed Nov 12, 2024
1 parent 92bee1a commit 6dd3407
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/IECoreScene/MeshAlgoSplitTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,8 @@ def accumulateInPython2( iterable ):
return result

def testCanSplitUsingIntegerPrimvar( self ) :
self.maxDiff = None

mesh = IECoreScene.MeshPrimitive.createPlane( imath.Box2f( imath.V2f( 0 ), imath.V2f( 2 ) ), imath.V2i( 2 ) )

mesh["s"] = IECoreScene.PrimitiveVariable( interp.Uniform, IECore.IntVectorData( [0, 0, 1, 1] ) )
Expand Down Expand Up @@ -286,6 +288,7 @@ def testCanSplitUsingIntegerPrimvar( self ) :
self.assertEqual( s1["P"].data, IECore.V3fVectorData( [p01, p11, p21, p02, p12, p22], IECore.GeometricData.Interpretation.Point ) )

def testSplitsFully( self ) :
self.maxDiff = None
mesh = IECoreScene.MeshPrimitive.createPlane( imath.Box2f( imath.V2f( 0 ), imath.V2f( 2 ) ), imath.V2i( 2 ) )

# checkerboard pattern to segment
Expand Down Expand Up @@ -337,6 +340,7 @@ def testSplitUsingIndexedPrimitiveVariable( self ) :

# Test some a decent sized with different sized random splits, which should exercise just about everything
def testSplitRandomUnindexed( self ) :
self.maxDiff = None
random.seed( 42 )

mesh = IECoreScene.MeshPrimitive.createSphere( 1, divisions = imath.V2i( 20 ) )
Expand All @@ -361,6 +365,7 @@ def testSplitRandomUnindexed( self ) :

# Now take the random test and incorporate indexed primitive variables
def testSplitRandomIndexed( self ) :
self.maxDiff = None
random.seed( 43 )

mesh = IECoreScene.MeshPrimitive.createSphere( 1, divisions = imath.V2i( 20 ) )
Expand Down

0 comments on commit 6dd3407

Please sign in to comment.