Version: 6.3.1
Home
Functions

Sketcher

Creating geometrical objects

Functions

def geompy.MakeSketcher
 Create a sketcher (wire or face), following the textual description, passed through theCommand argument.
def geompy.MakeSketcherOnPlane
 Create a sketcher (wire or face), following the textual description, passed through theCommand argument.
def geompy.Make3DSketcher
 Create a sketcher wire, following the numerical description, passed through theCoordinates argument.

Function Documentation

def geompy.MakeSketcher (   self,
  theCommand,
  theWorkingPlane = [0 
)

Create a sketcher (wire or face), following the textual description, passed through theCommand argument.


Edges of the resulting wire or face will be arcs of circles and/or linear segments.
Format of the description string have to be the following:

"Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"

Where:

  • x1, y1 are coordinates of the first sketcher point (zero by default),
  • CMD is one of
    • "R angle" : Set the direction by angle
    • "D dx dy" : Set the direction by DX & DY

    • "TT x y" : Create segment by point at X & Y
    • "T dx dy" : Create segment by point with DX & DY
    • "L length" : Create segment by direction & Length
    • "IX x" : Create segment by direction & Intersect. X
    • "IY y" : Create segment by direction & Intersect. Y

    • "C radius length" : Create arc by direction, radius and length(in degree)
    • "AA x y": Create arc by point at X & Y
    • "A dx dy" : Create arc by point with DX & DY
    • "A dx dy" : Create arc by point with DX & DY
    • "UU x y radius flag1": Create arc by point at X & Y with given radiUs
    • "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
    • "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
    • "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates

    • "WW" : Close Wire (to finish)
    • "WF" : Close Wire and build face (to finish)

  • Flag1 (= reverse) is 0 or 2 ...
    • if 0 the drawn arc is the one of lower angle (< Pi)
    • if 2 the drawn arc ius the one of greater angle (> Pi)

  • Flag2 (= control tolerance) is 0 or 1 ...
    • if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
    • if 1 the wire is built only if the end point is on the arc with a tolerance of 10^-7 on the distance else the creation fails
Parameters:
theCommandString, defining the sketcher in local coordinates of the working plane.
theWorkingPlaneNine double values, defining origin, OZ and OX directions of the working plane.
Returns:
New GEOM_Object, containing the created wire.

Example

def geompy.MakeSketcherOnPlane (   self,
  theCommand,
  theWorkingPlane 
)

Create a sketcher (wire or face), following the textual description, passed through theCommand argument.


For format of the description string see the previous method.

Parameters:
theCommandString, defining the sketcher in local coordinates of the working plane.
theWorkingPlanePlanar Face or LCS(Marker) of the working plane.
Returns:
New GEOM_Object, containing the created wire.

Example

def geompy.Make3DSketcher (   self,
  theCoordinates 
)

Create a sketcher wire, following the numerical description, passed through theCoordinates argument.


Parameters:
theCoordinatesdouble values, defining points to create a wire, passing from it.
Returns:
New GEOM_Object, containing the created wire.

Example

 All Data Structures Namespaces Files Functions Variables
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS