@@ -170,7 +170,7 @@ def fix(li, _type):
170170 if interp .IsDone ():
171171 return interp .Curve ()
172172 except RuntimeError :
173- print 'FAILED TO INTERPOLATE THE SHOWN POINTS'
173+ print ( "Failed to interpolate the shown points" )
174174
175175
176176def interpolate_points_vectors_to_spline (list_of_points , list_of_vectors , vector_mask = [], tolerance = TOLERANCE ):
@@ -239,7 +239,6 @@ def fix(li, _type):
239239# --- RANDOMNESS ---
240240#===========================================================================
241241
242-
243242def random_vec ():
244243 import random
245244 x , y , z = [random .uniform (- 1 , 1 ) for i in range (3 )]
@@ -250,7 +249,7 @@ def random_colored_material_aspect():
250249 import random
251250 clrs = [i for i in dir (Graphic3d ) if i .startswith ('Graphic3d_NOM_' )]
252251 color = random .sample (clrs , 1 )[0 ]
253- print ' color' , color
252+ print ( " color" , color )
254253 return Graphic3d .Graphic3d_MaterialAspect (getattr (Graphic3d , color ))
255254
256255
@@ -319,7 +318,7 @@ def point_in_solid(solid, pnt, tolerance=1e-5):
319318 from OCC .BRepClass3d import BRepClass3d_SolidClassifier
320319 from OCC .TopAbs import TopAbs_ON , TopAbs_OUT , TopAbs_IN
321320 _in_solid = BRepClass3d_SolidClassifier (solid , pnt , tolerance )
322- print 'STATE' , _in_solid .State ()
321+ print ( "State" , _in_solid .State () )
323322 if _in_solid .State () == TopAbs_ON :
324323 return None , 'on'
325324 if _in_solid .State () == TopAbs_OUT :
@@ -433,7 +432,7 @@ def resample_curve_with_uniform_deflection(curve, deflection=0.5, degreeMin=3, d
433432 crv = to_adaptor_3d (curve )
434433 defl = GCPnts_UniformDeflection (crv , deflection )
435434 with assert_isdone (defl , 'failed to compute UniformDeflection' ):
436- print 'number of points:' , defl .NbPoints ()
435+ print ( "Number of points:" , defl .NbPoints () )
437436 sampled_pnts = [defl .Value (i ) for i in xrange (1 , defl .NbPoints ())]
438437 resampled_curve = GeomAPI_PointsToBSpline (point_list_to_TColgp_Array1OfPnt (sampled_pnts ), degreeMin , degreeMax , continuity , tolerance )
439438 return resampled_curve .Curve ().GetObject ()
0 commit comments