From 9b15df25fd29dbb86a3bdf2a9f36575cc1a724dc Mon Sep 17 00:00:00 2001 From: akl Date: Wed, 13 Feb 2013 14:21:21 +0000 Subject: [PATCH] Move into standalone group scripts that depend on plugins. This group is not used during 'make check'. --- doc/salome/examples/Makefile.am | 46 +++++++++---------- doc/salome/examples/filters_ex13.py | 2 +- doc/salome/examples/filters_ex14.py | 2 +- doc/salome/examples/filters_ex31.py | 4 +- doc/salome/examples/modifying_meshes_ex10.py | 27 +++++------ doc/salome/examples/quality_controls_ex01.py | 2 +- doc/salome/examples/quality_controls_ex02.py | 2 +- doc/salome/examples/quality_controls_ex03.py | 2 +- .../examples/transforming_meshes_ex04.py | 2 +- doc/salome/examples/viewing_meshes_ex02.py | 2 +- 10 files changed, 46 insertions(+), 45 deletions(-) diff --git a/doc/salome/examples/Makefile.am b/doc/salome/examples/Makefile.am index 930edd9fc..fe7f58414 100644 --- a/doc/salome/examples/Makefile.am +++ b/doc/salome/examples/Makefile.am @@ -26,16 +26,34 @@ include $(top_srcdir)/adm_local/unix/make_common_starter.am pyexamplesdir = $(docdir)/examples/SMESH -BAD_TESTS = +BAD_TESTS = \ + 3dmesh.py \ + creating_meshes_ex01.py \ + creating_meshes_ex03.py \ + creating_meshes_ex05.py \ + defining_hypotheses_ex06.py \ + defining_hypotheses_ex09.py \ + defining_hypotheses_ex17.py \ + filters_ex02.py \ + filters_ex08.py \ + filters_ex23.py \ + filters_ex24.py \ + filters_ex25.py \ + filters_ex32.py \ + filters_ex35.py \ + generate_flat_elements.py \ + modifying_meshes_ex26.py \ + notebook_smesh.py \ + quality_controls_ex06.py \ + quality_controls_ex20.py \ + quality_controls_ex21.py \ + quality_controls_ex22.py \ + viewing_meshes_ex01.py GOOD_TESTS = \ - 3dmesh.py \ cartesian_algo.py \ - creating_meshes_ex01.py \ creating_meshes_ex02.py \ - creating_meshes_ex03.py \ creating_meshes_ex04.py \ - creating_meshes_ex05.py \ creating_meshes_ex06.py \ creating_meshes_ex07.py \ creating_meshes_ex08.py \ @@ -44,10 +62,8 @@ GOOD_TESTS = \ defining_hypotheses_ex03.py \ defining_hypotheses_ex04.py \ defining_hypotheses_ex05.py \ - defining_hypotheses_ex06.py \ defining_hypotheses_ex07.py \ defining_hypotheses_ex08.py \ - defining_hypotheses_ex09.py \ defining_hypotheses_ex10.py \ defining_hypotheses_ex11.py \ defining_hypotheses_ex12.py \ @@ -55,15 +71,12 @@ GOOD_TESTS = \ defining_hypotheses_ex14.py \ defining_hypotheses_ex15.py \ defining_hypotheses_ex16.py \ - defining_hypotheses_ex17.py \ filters_ex01.py \ - filters_ex02.py \ filters_ex03.py \ filters_ex04.py \ filters_ex05.py \ filters_ex06.py \ filters_ex07.py \ - filters_ex08.py \ filters_ex09.py \ filters_ex10.py \ filters_ex11.py \ @@ -78,21 +91,15 @@ GOOD_TESTS = \ filters_ex20.py \ filters_ex21.py \ filters_ex22.py \ - filters_ex23.py \ - filters_ex24.py \ - filters_ex25.py \ filters_ex26.py \ filters_ex27.py \ filters_ex28.py \ filters_ex29.py \ filters_ex30.py \ filters_ex31.py \ - filters_ex32.py \ filters_ex33.py \ filters_ex34.py \ - filters_ex35.py \ filters_ex36.py \ - generate_flat_elements.py \ grouping_elements_ex01.py \ grouping_elements_ex02.py \ grouping_elements_ex03.py \ @@ -128,15 +135,12 @@ GOOD_TESTS = \ modifying_meshes_ex23.py \ modifying_meshes_ex24.py \ modifying_meshes_ex25.py \ - modifying_meshes_ex26.py \ - notebook_smesh.py \ prism_3d_algo.py \ quality_controls_ex01.py \ quality_controls_ex02.py \ quality_controls_ex03.py \ quality_controls_ex04.py \ quality_controls_ex05.py \ - quality_controls_ex06.py \ quality_controls_ex07.py \ quality_controls_ex08.py \ quality_controls_ex09.py \ @@ -150,9 +154,6 @@ GOOD_TESTS = \ quality_controls_ex17.py \ quality_controls_ex18.py \ quality_controls_ex19.py \ - quality_controls_ex20.py \ - quality_controls_ex21.py \ - quality_controls_ex22.py \ transforming_meshes_ex01.py \ transforming_meshes_ex02.py \ transforming_meshes_ex03.py \ @@ -167,7 +168,6 @@ GOOD_TESTS = \ transforming_meshes_ex12.py \ transforming_meshes_ex13.py \ use_existing_faces.py \ - viewing_meshes_ex01.py \ viewing_meshes_ex02.py pyexamples_SCRIPTS = $(BAD_TESTS) $(GOOD_TESTS) diff --git a/doc/salome/examples/filters_ex13.py b/doc/salome/examples/filters_ex13.py index d5415e20a..e20937d1b 100644 --- a/doc/salome/examples/filters_ex13.py +++ b/doc/salome/examples/filters_ex13.py @@ -3,7 +3,7 @@ # create mesh from SMESH_mechanic import * # remove some faces to have faces with bare borders -mesh.RemoveElements( mesh.GetElementsByType(FACE)[0:5] ) +mesh.RemoveElements( mesh.GetElementsByType(smesh.FACE)[0:5] ) # get all faces bare borders filter = smesh.GetFilter(smesh.FACE, smesh.FT_BareBorderFace) ids = mesh.GetIdsFromFilter(filter) diff --git a/doc/salome/examples/filters_ex14.py b/doc/salome/examples/filters_ex14.py index 45c356cdf..01ea27ab9 100644 --- a/doc/salome/examples/filters_ex14.py +++ b/doc/salome/examples/filters_ex14.py @@ -2,7 +2,7 @@ # create mesh from SMESH_mechanic import * -faceID = mesh.GetElementsByType(FACE)[0] +faceID = mesh.GetElementsByType(smesh.FACE)[0] # get all faces co-planar to the first face with tolerance 5 degrees filter = smesh.GetFilter(smesh.FACE, smesh.FT_CoplanarFaces,faceID,Tolerance=5.0) ids = mesh.GetIdsFromFilter(filter) diff --git a/doc/salome/examples/filters_ex31.py b/doc/salome/examples/filters_ex31.py index a20f7d708..4a2acbfa8 100644 --- a/doc/salome/examples/filters_ex31.py +++ b/doc/salome/examples/filters_ex31.py @@ -3,9 +3,9 @@ # create mesh from SMESH_mechanic import * # get nodes with identifiers [5-10] and [15-30] -criterion1 = smesh.GetCriterion(smesh.NODE, smesh.FT_RangeOfIds, Treshold="5-10",\ +criterion1 = smesh.GetCriterion(smesh.NODE, smesh.FT_RangeOfIds, Threshold="5-10",\ BinaryOp=smesh.FT_LogicalOR) -criterion2 = smesh.GetCriterion(smesh.NODE, smesh.FT_RangeOfIds, Treshold="15-30") +criterion2 = smesh.GetCriterion(smesh.NODE, smesh.FT_RangeOfIds, Threshold="15-30") filter = smesh.CreateFilterManager().CreateFilter() filter.SetCriteria([criterion1,criterion2]) ids = mesh.GetIdsFromFilter(filter) diff --git a/doc/salome/examples/modifying_meshes_ex10.py b/doc/salome/examples/modifying_meshes_ex10.py index 7f36728c1..1d1af1942 100644 --- a/doc/salome/examples/modifying_meshes_ex10.py +++ b/doc/salome/examples/modifying_meshes_ex10.py @@ -1,6 +1,7 @@ # Add Polyhedron import salome +import smesh import math # create an empty mesh structure @@ -39,18 +40,18 @@ for i in range(5): pass # Create a polyhedral volume (12-hedron with pentagonal faces) -MeshEditor.AddPolyhedralVolume([dd[0], dd[1], dd[2], dd[3], dd[4], # top - dd[0], cc[0], bb[1], cc[1], dd[1], # - - dd[1], cc[1], bb[2], cc[2], dd[2], # - - dd[2], cc[2], bb[3], cc[3], dd[3], # - below top - dd[3], cc[3], bb[4], cc[4], dd[4], # - - dd[4], cc[4], bb[0], cc[0], dd[0], # - - aa[4], bb[4], cc[4], bb[0], aa[0], # . - aa[3], bb[3], cc[3], bb[4], aa[4], # . - aa[2], bb[2], cc[2], bb[3], aa[3], # . above bottom - aa[1], bb[1], cc[1], bb[2], aa[2], # . - aa[0], bb[0], cc[0], bb[1], aa[1], # . - aa[0], aa[1], aa[2], aa[3], aa[4]], # bottom - [5,5,5,5,5,5,5,5,5,5,5,5]) +mesh.GetMeshEditor().AddPolyhedralVolume([dd[0], dd[1], dd[2], dd[3], dd[4], # top + dd[0], cc[0], bb[1], cc[1], dd[1], # - + dd[1], cc[1], bb[2], cc[2], dd[2], # - + dd[2], cc[2], bb[3], cc[3], dd[3], # - below top + dd[3], cc[3], bb[4], cc[4], dd[4], # - + dd[4], cc[4], bb[0], cc[0], dd[0], # - + aa[4], bb[4], cc[4], bb[0], aa[0], # . + aa[3], bb[3], cc[3], bb[4], aa[4], # . + aa[2], bb[2], cc[2], bb[3], aa[3], # . above bottom + aa[1], bb[1], cc[1], bb[2], aa[2], # . + aa[0], bb[0], cc[0], bb[1], aa[1], # . + aa[0], aa[1], aa[2], aa[3], aa[4]], # bottom + [5,5,5,5,5,5,5,5,5,5,5,5]) salome.sg.updateObjBrowser(1) diff --git a/doc/salome/examples/quality_controls_ex01.py b/doc/salome/examples/quality_controls_ex01.py index ed4dc244e..f411d2e61 100644 --- a/doc/salome/examples/quality_controls_ex01.py +++ b/doc/salome/examples/quality_controls_ex01.py @@ -35,7 +35,7 @@ for i in range(len(anIds)): print "" # create a group -aGroup = mesh.CreateGroup(SMESH.EDGE, "Free borders") +aGroup = mesh.GetMesh().CreateGroup(smesh.EDGE, "Free borders") aGroup.Add(anIds) salome.sg.updateObjBrowser(1) diff --git a/doc/salome/examples/quality_controls_ex02.py b/doc/salome/examples/quality_controls_ex02.py index 7b1f55e6f..5373c4d6f 100644 --- a/doc/salome/examples/quality_controls_ex02.py +++ b/doc/salome/examples/quality_controls_ex02.py @@ -38,7 +38,7 @@ for i in range(len(anIds)): print "" # create a group -aGroup = mesh.CreateGroup(SMESH.EDGE, "Borders at multi-connections") +aGroup = mesh.GetMesh().CreateGroup(smesh.EDGE, "Borders at multi-connections") aGroup.Add(anIds) salome.sg.updateObjBrowser(1) diff --git a/doc/salome/examples/quality_controls_ex03.py b/doc/salome/examples/quality_controls_ex03.py index 8cb409866..eaa607b94 100644 --- a/doc/salome/examples/quality_controls_ex03.py +++ b/doc/salome/examples/quality_controls_ex03.py @@ -37,7 +37,7 @@ for i in range(len(anIds)): print "" # create a group -aGroup = mesh.CreateGroup(SMESH.EDGE, "Edges with length > " + `length_margin`) +aGroup = mesh.GetMesh().CreateGroup(smesh.EDGE, "Edges with length > " + `length_margin`) aGroup.Add(anIds) salome.sg.updateObjBrowser(1) diff --git a/doc/salome/examples/transforming_meshes_ex04.py b/doc/salome/examples/transforming_meshes_ex04.py index ea7c72f54..0bfea6188 100644 --- a/doc/salome/examples/transforming_meshes_ex04.py +++ b/doc/salome/examples/transforming_meshes_ex04.py @@ -8,6 +8,6 @@ smesh = SMESH_mechanic.smesh mesh = SMESH_mechanic.mesh # create a symmetrical copy of the mesh mirrored through a point -axis = SMESH.AxisStruct(0, 0, 0, 0, 0, 0) +axis = smesh.AxisStruct(0, 0, 0, 0, 0, 0) mesh.Mirror([], axis, smesh.POINT, 1) diff --git a/doc/salome/examples/viewing_meshes_ex02.py b/doc/salome/examples/viewing_meshes_ex02.py index de345e8a3..cd096ca76 100644 --- a/doc/salome/examples/viewing_meshes_ex02.py +++ b/doc/salome/examples/viewing_meshes_ex02.py @@ -8,7 +8,7 @@ import SMESH box = geompy.MakeBoxDXDYDZ(100,100,100) # Create a mesh -mesh = Mesh(box,"Mesh") +mesh = smesh.Mesh(box,"Mesh") mesh.AutomaticHexahedralization() mesh.Compute() -- 2.39.2