Version: 8.3.0
Home
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
gsketcher - Wrapper to help the creation of simple sketches

Data Structures

class  Sketcher3D
 An interface to build a 3D Sketcher step-by-step. More...
 
class  Sketcher2D
 An interface to build a 2D Sketcher step-by-step. More...
 
class  Polyline2D
 An interface to build a 2D polyline step-by-step. More...
 

Detailed Description

This module provides the user with a simple python API to realize various sketches from the GEOM text user interface.
Example:

1 import GEOM
2 from salome.geom import geomBuilder
3 geompy = geomBuilder.New(salome.myStudy)
4 
5 # create a wire for sketcher
6 geomObj_1 = geompy.MakeMarker(0, 0, 0, 1, 0, 0, 0, 1, 0)
7 
8 # Create the sketch
9 sk = geompy.Sketcher2D()
10 sk.addPoint(0.000000, 0.000000)
11 sk.addSegmentAbsolute(50.000000, 50.000000)
12 sk.addSegmentPerpY(0.000000)
13 sk.addArcAbsolute(0.000000, 0.000000)
14 sk.close()
15 Sketch_1 = sk.wire(geomObj_1)
16 
17 # add objects in the study
18 geompy.addToStudy( Sketch_1, 'Sketch_1' )
19 
20 # update object browser
21 salome.sg.updateObjBrowser(True)


Additionnal examples can be found as unit tests in the source code.