Version: 9.16.0
Home
Loading...
Searching...
No Matches

Functions

 MakeSketcher (self, theCommand, theWorkingPlane=[0, 0, 0, 0, 0, 1, 1, 0, 0], theName=None)
 Create a sketcher (wire or face), following the textual description, passed through theCommand argument.
 
 MakeSketcherOnPlane (self, theCommand, theWorkingPlane, theName=None)
 Create a sketcher (wire or face), following the textual description, passed through theCommand argument.
 
 Sketcher2D (self)
 Obtain a 2D sketcher interface.
 
 Make3DSketcher (self, theCoordinates, theName=None)
 Create a sketcher wire, following the numerical description, passed through theCoordinates argument.
 
 Sketcher3D (self)
 Obtain a 3D sketcher interface.
 
 Polyline2D (self)
 Obtain a 2D polyline creation interface.
 

Detailed Description

Function Documentation

◆ MakeSketcher()

MakeSketcher (   self,
  theCommand,
  theWorkingPlane = [0,0,0, 0,0,1, 1,0,0],
  theName = None 
)

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
    • "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.
theNameObject name; when specified, this parameter is used for result publication in the study. Otherwise, if automatic publication is switched on, default value is used for result name.
Returns
New GEOM.GEOM_Object, containing the created wire.

Example

References geomBuilder._autoPublish(), geomBuilder.CurvesOp, geomBuilder.MakeSketcher(), geomBuilder.ParseSketcherCommand(), and geomBuilder.RaiseIfFailed().

◆ MakeSketcherOnPlane()

MakeSketcherOnPlane (   self,
  theCommand,
  theWorkingPlane,
  theName = None 
)

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


For format of the description string see MakeSketcher() method.

Parameters
theCommandString, defining the sketcher in local coordinates of the working plane.
theWorkingPlanePlanar Face or LCS(Marker) of the working plane.
theNameObject name; when specified, this parameter is used for result publication in the study. Otherwise, if automatic publication is switched on, default value is used for result name.
Returns
New GEOM.GEOM_Object, containing the created wire.

Example

References geomBuilder._autoPublish(), geomBuilder.CurvesOp, geomBuilder.MakeSketcherOnPlane(), geomBuilder.ParseSketcherCommand(), and geomBuilder.RaiseIfFailed().

◆ Sketcher2D()

Sketcher2D (   self)

Obtain a 2D sketcher interface.

Returns
An instance of Sketcher2D interface

◆ Make3DSketcher()

Make3DSketcher (   self,
  theCoordinates,
  theName = None 
)

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


Parameters
theCoordinatesdouble values, defining points to create a wire, passing from it.
theNameObject name; when specified, this parameter is used for result publication in the study. Otherwise, if automatic publication is switched on, default value is used for result name.
Returns
New GEOM.GEOM_Object, containing the created wire.

Example

References geomBuilder._autoPublish(), geomBuilder.CurvesOp, geomBuilder.Make3DSketcher(), geomBuilder.ParseParameters(), and geomBuilder.RaiseIfFailed().

◆ Sketcher3D()

Sketcher3D (   self)

Obtain a 3D sketcher interface.

Returns
An instance of Sketcher3D interface

Example

◆ Polyline2D()

Polyline2D (   self)

Obtain a 2D polyline creation interface.

Returns
An instance of Polyline2D interface

Example