X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGEOM_SWIG%2FGEOM_TestAll.py;h=3610dde3b14683ed6ab4cb006b4adfca7ab8c55c;hb=7b10bbe78fbedb06dc73f01984e6d26a5e5dcb08;hp=e4125406dfbfa5e5782f3df2831dac2345d11e7a;hpb=a60fa47bca426b8755e181538844464e54934db8;p=modules%2Fgeom.git diff --git a/src/GEOM_SWIG/GEOM_TestAll.py b/src/GEOM_SWIG/GEOM_TestAll.py index e4125406d..3610dde3b 100644 --- a/src/GEOM_SWIG/GEOM_TestAll.py +++ b/src/GEOM_SWIG/GEOM_TestAll.py @@ -1,6 +1,7 @@ -# GEOM GEOM_SWIG : binding of C++ omplementaion with Python +# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE # -# Copyright (C) 2003 CEA +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -18,17 +19,16 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -# +# GEOM GEOM_SWIG : binding of C++ omplementaion with Python # File : GEOM_usinggeom.py # Author : Damien COQUERET, Open CASCADE # Module : GEOM # $Header$ - # ! Please, if you edit this example file, update also # ! GEOM_SRC/doc/salome/gui/GEOM/input/tui_test_all.doc # ! as some sequences of symbols from this example are used during # ! documentation generation to identify certain places of this file - +# def TestAll (geompy, math): #Create base Variables @@ -184,12 +184,21 @@ def TestAll (geompy, math): TranslVectD = geompy.MakeTranslationVectorDistance(Box, vxyz, 50.0) #(2 GEOM_Object_ptr)->GEOM_Object_ptr Rotation = geompy.MakeRotation(Box, vz, angle1) #(2 GEOM_Object_ptr, Double)->GEOM_Object_ptr RotatPnt = geompy.MakeRotationThreePoints(Box, px, py, pz) #(4 GEOM_Object_ptr)->GEOM_Object_ptr - Scale = geompy.MakeScaleTransform(Box, p0, factor) # - Mirror = geompy.MakeMirrorByPlane(Box, Plane) #(2 GEOM_Object_ptr)->GEOM_Object_ptr - MirrorAxis = geompy.MakeMirrorByAxis(Box, Line1) # - MirrorPnt = geompy.MakeMirrorByPoint(Box, p200) # - Position = geompy.MakePosition(Box, cs1, cs2) #(3 GEOM_Object_ptr)->GEOM_Object_ptr - Offset = geompy.MakeOffset(Box, 10.) #(GEOM_Object_ptr, Double)->GEOM_Object_ptr + + #Scale by factor relatively given point + Scale1 = geompy.MakeScaleTransform(Box, pxyz, factor) #(2 GEOM_Object_ptr, Double)->GEOM_Object_ptr + #Scale by factor relatively the origin of global CS + Scale2 = geompy.MakeScaleTransform(Box, None, factor) # + #Scale along axes of global CS by different factors. Scale relatively given point + Scale3 = geompy.MakeScaleAlongAxes(Box, pxyz, 1.5, 0.5, 3) #(2 GEOM_Object_ptr, 3 Doubles)->GEOM_Object_ptr + #Scale along axes of global CS by different factors. Scale relatively the origin of global CS + Scale4 = geompy.MakeScaleAlongAxes(Box, None, 1.5, 0.5, 3) # + + Mirror = geompy.MakeMirrorByPlane(Box, Plane) #(2 GEOM_Object_ptr)->GEOM_Object_ptr + MirrorAxis = geompy.MakeMirrorByAxis(Box, Line1) # + MirrorPnt = geompy.MakeMirrorByPoint(Box, p200) # + Position = geompy.MakePosition(Box, cs1, cs2) #(3 GEOM_Object_ptr)->GEOM_Object_ptr + Offset = geompy.MakeOffset(Box, 10.) #(GEOM_Object_ptr, Double)->GEOM_Object_ptr Orientation = geompy.ChangeOrientation(Box) #IDList for Fillet/Chamfer @@ -338,7 +347,10 @@ def TestAll (geompy, math): id_TranslVectD = geompy.addToStudy(TranslVectD, "Translation along vector with defined distance") id_Rotation = geompy.addToStudy(Rotation, "Rotation") id_RotatPnt = geompy.addToStudy(RotatPnt, "Rotation by three points") - id_Scale = geompy.addToStudy(Scale, "Scale") + id_Scale1 = geompy.addToStudy(Scale1, "Scale1") + id_Scale2 = geompy.addToStudy(Scale2, "Scale2") + id_Scale3 = geompy.addToStudy(Scale3, "Scale3") + id_Scale4 = geompy.addToStudy(Scale4, "Scale4") id_Mirror = geompy.addToStudy(Mirror, "Mirror by Plane") id_MirrorAxis = geompy.addToStudy(MirrorAxis, "Mirror by Axis") id_MirrorPnt = geompy.addToStudy(MirrorPnt, "Mirror by Point")