Salome HOME
Merge from V6_main 11/02/2013
[modules/geom.git] / doc / salome / gui / GEOM / input / tui_center_of_mass.doc
index 9c9b6f6595d80169beb9a920a70697586d080853..49eb49538b4188ddec2dbf424b43c9e27266de12 100644 (file)
@@ -1,25 +1,7 @@
 /*!
 
 \page tui_center_of_mass_page Center of masses
-
-\code
-import geompy
-import math
-
-# create a box
-box = geompy.MakeBoxDXDYDZ(100,30,100)
-cm = geompy.MakeCDG(box)
-if cm is None:
-    raise RuntimeError, "MakeCDG(box) failed"
-else:
-    print "\nCentre of gravity of box has been successfully obtained:"
-    coords = geompy.PointCoordinates(cm)
-    print "(", coords[0], ", ", coords[1], ", ", coords[2], ")"
-    dx = math.sqrt((coords[0] - 50)*(coords[0] - 50))
-    dy = math.sqrt((coords[1] - 15)*(coords[1] - 15))
-    dz = math.sqrt((coords[2] - 50)*(coords[2] - 50))
-    if dx > 1e-7 or dy > 1e-7 or dz > 1e-7:
-        print "But must be (50, 15, 50)"
-\endcode
+\include center_of_mass.py
+<a href="../../examples/GEOM/center_of_mass.py">Download this script</a>
 
 */