An interface to build a 2D Sketcher step-by-step. More...
Public Member Functions | |
def | __init__ |
def | addPoint |
Add one point. More... | |
def | addAngle |
Add angle. More... | |
def | addSegmentParalX |
Add segment, which sequentially connects the previous point with a point lying on a line parallel to the axis Ox and the value x = param x. More... | |
def | addSegmentParalXToZero |
Add segment, which sequentially connects the previous point with a point lying on a line parallel to the axis Ox and the value x = 0 The current point will be the previous value to the coordinate y. More... | |
def | addSegmentParalY |
Add segment, which sequentially connects the previous point with a point lying on a line parallel to the axis Oy and the value y = param y. More... | |
def | addSegmentParalYToZero |
Add segment, which sequentially connects the previous point with a point lying on a line parallel to the axis Ox and the value x = 0 The current point will be the previous value to the coordinate y. More... | |
def | addSegmentAbsolute |
Add segment, which sequentially connects the given point with previous point. More... | |
def | addSegmentRelative |
Add segment, which sequentially connects the given point with previous point Coordinates are considered relative to the previous point. More... | |
def | addSegmentAngleLength |
Add one straight segment, defined by angle and length. More... | |
def | addSegmentAngleX |
Add one straight segment, defined by angle and intersect straight x= param x. More... | |
def | addSegmentAngleY |
Add one straight segment, defined by angle and intersect straight y= param y. More... | |
def | addSegmentPerpLength |
Add one straight segment, defined by perpendicular(angle=90) and length. More... | |
def | addSegmentPerpX |
Add one straight segment, defined by perpendicular(angle=90) and intersect straight x= param x. More... | |
def | addSegmentPerpY |
Add one straight segment, defined by perpendicular(angle=90) and intersect straight y= param y. More... | |
def | addSegmentLength |
Add one straight segment, defined by previous direction and length. More... | |
def | addSegmentX |
Add one straight segment, defined by previous direction and intersect straight x= param x. More... | |
def | addSegmentY |
Add one straight segment, defined by previous direction and intersect straight y= param y. More... | |
def | addSegmentDirectionLength |
Add one straight segment, defined by direction and length. More... | |
def | addSegmentDirectionX |
Add one straight segment, defined by direction and intersect straight x= param x. More... | |
def | addSegmentDirectionY |
Add one straight segment, defined by direction and intersect straight y= param y. More... | |
def | addArcAbsolute |
Add arc, which connects the given point with previous point Coordinates are considered as absolute. More... | |
def | addArcRelative |
Add arc, which connects the given point with previous point Coordinates are considered relative to the previous point. More... | |
def | addArcRadiusAbsolute |
Add arc, defined by radius and coordinates of next point. More... | |
def | addArcRadiusRelative |
Add arc, defined by radius and coordinates of next point. More... | |
def | addArcCenterAbsolute |
Add arc, defined by coordinates of next point and coordinates of center. More... | |
def | addArcCenterRelative |
Add arc, defined by coordinates of next point and coordinates of center. More... | |
def | addArcAngleRadiusLength |
Add arc, defined by angle, radius and length. More... | |
def | addArcPerpRadiusLength |
Add arc, defined by perpendicular(angle=90), radius and length. More... | |
def | addArcRadiusLength |
Add arc, defined by previous direction, radius and length. More... | |
def | addArcDirectionRadiusLength |
Add arc, defined by direction, radius and length. More... | |
def | close |
Set to close the wire. More... | |
def | wire |
Obtain the sketcher result as a wire. More... | |
def | face |
Obtain the sketcher result as a face. More... | |
Data Fields | |
geompyD | |
myCommand | |
closed | |
An interface to build a 2D Sketcher step-by-step.
Use geompy.Sketcher2D() method to obtain an instance of this class.
def __init__ | ( | self, | |
geompyD | |||
) |
def addPoint | ( | self, | |
x, | |||
y | |||
) |
Add one point.
Used to set the starting point
x,y | - Coordinates of point |
References Sketcher3D.myCommand, Sketcher2D.myCommand, and gsketcher.printVar().
def addAngle | ( | self, | |
angle | |||
) |
Add angle.
Used to set the angle for further building
angle | - angle in a plane |
References Sketcher3D.myCommand, Sketcher2D.myCommand, and gsketcher.printVar().
def addSegmentParalX | ( | self, | |
x | |||
) |
Add segment, which sequentially connects the previous point with a point lying on a line parallel to the axis Ox and the value x = param x.
The current point will be the previous value to the coordinate y and new value to the coordinate x. Coordinate is considered relative to the previous point.
x | - Coordinate of point on axis Ox |
References Sketcher3D.myCommand, Sketcher2D.myCommand, and gsketcher.printVar().
def addSegmentParalXToZero | ( | self | ) |
Add segment, which sequentially connects the previous point with a point lying on a line parallel to the axis Ox and the value x = 0 The current point will be the previous value to the coordinate y.
References Sketcher3D.myCommand, and Sketcher2D.myCommand.
def addSegmentParalY | ( | self, | |
y | |||
) |
Add segment, which sequentially connects the previous point with a point lying on a line parallel to the axis Oy and the value y = param y.
The current point will be the previous value to the coordinate x and new value to the coordinate y. Coordinate is considered relative to the previous point.
y | - Coordinate of point on axis Oy |
References Sketcher3D.myCommand, Sketcher2D.myCommand, and gsketcher.printVar().
def addSegmentParalYToZero | ( | self | ) |
Add segment, which sequentially connects the previous point with a point lying on a line parallel to the axis Ox and the value x = 0 The current point will be the previous value to the coordinate y.
References Sketcher3D.myCommand, and Sketcher2D.myCommand.
def addSegmentAbsolute | ( | self, | |
x, | |||
y | |||
) |
Add segment, which sequentially connects the given point with previous point.
Coordinates are considered as absolute.
x,y | - Coordinates of point |
References Sketcher3D.myCommand, Sketcher2D.myCommand, and gsketcher.printVar().
def addSegmentRelative | ( | self, | |
dx, | |||
dy | |||
) |
Add segment, which sequentially connects the given point with previous point Coordinates are considered relative to the previous point.
If the first point of sketcher is not yet defined, the origin (0, 0) will become the first sketcher point.
dx,dy | - Coordinates of point relative a previous point |
References Sketcher3D.myCommand, Sketcher2D.myCommand, and gsketcher.printVar().
def addSegmentAngleLength | ( | self, | |
angle, | |||
length | |||
) |
Add one straight segment, defined by angle and length.
If the first point of sketcher is not yet defined, the origin (0, 0) will become the first sketcher point. The angle and length coordinates are defined in a local coordinate system which origin is the last point of the sketch
angle | - angle in a plane |
length | - length of the segment |
References Sketcher3D.myCommand, Sketcher2D.myCommand, and gsketcher.printVar().
def addSegmentAngleX | ( | self, | |
angle, | |||
x | |||
) |
Add one straight segment, defined by angle and intersect straight x= param x.
If the first point of sketcher is not yet defined, the origin (0, 0) will become the first sketcher point. The angle and point's coordinates are defined in a local coordinate system which origin is the last point of the sketch
angle | - angle in a plane |
x | - value on the axis Ox |
References Sketcher3D.myCommand, Sketcher2D.myCommand, and gsketcher.printVar().
def addSegmentAngleY | ( | self, | |
angle, | |||
y | |||
) |
Add one straight segment, defined by angle and intersect straight y= param y.
If the first point of sketcher is not yet defined, the origin (0, 0) will become the first sketcher point. The angle and point's coordinates are defined in a local coordinate system which origin is the last point of the sketch
angle | - angle in a plane |
y | - value on the axis Oy |
References Sketcher3D.myCommand, Sketcher2D.myCommand, and gsketcher.printVar().
def addSegmentPerpLength | ( | self, | |
length | |||
) |
Add one straight segment, defined by perpendicular(angle=90) and length.
If the first point of sketcher is not yet defined, the origin (0, 0) will become the first sketcher point. The length coordinates are defined in a local coordinate system which origin is the last point of the sketch
length | - length of the segment |
References Sketcher3D.myCommand, Sketcher2D.myCommand, and gsketcher.printVar().
def addSegmentPerpX | ( | self, | |
x | |||
) |
Add one straight segment, defined by perpendicular(angle=90) and intersect straight x= param x.
If the first point of sketcher is not yet defined, the origin (0, 0) will become the first sketcher point. The point's coordinates are defined in a local coordinate system which origin is the last point of the sketch
x | - value on the axis Ox |
References Sketcher3D.myCommand, Sketcher2D.myCommand, and gsketcher.printVar().
def addSegmentPerpY | ( | self, | |
y | |||
) |
Add one straight segment, defined by perpendicular(angle=90) and intersect straight y= param y.
If the first point of sketcher is not yet defined, the origin (0, 0) will become the first sketcher point. The point's coordinates are defined in a local coordinate system which origin is the last point of the sketch
y | - value on the axis Oy |
References Sketcher3D.myCommand, Sketcher2D.myCommand, and gsketcher.printVar().
def addSegmentLength | ( | self, | |
length | |||
) |
Add one straight segment, defined by previous direction and length.
If the first point of sketcher is not yet defined, the origin (0, 0) will become the first sketcher point. The length coordinates are defined in a local coordinate system which origin is the last point of the sketch
length | - length of the segment |
References Sketcher3D.myCommand, Sketcher2D.myCommand, and gsketcher.printVar().
def addSegmentX | ( | self, | |
x | |||
) |
Add one straight segment, defined by previous direction and intersect straight x= param x.
If the first point of sketcher is not yet defined, the origin (0, 0) will become the first sketcher point. The point's coordinates are defined in a local coordinate system which origin is the last point of the sketch
x | - value on the axis Ox |
References Sketcher3D.myCommand, Sketcher2D.myCommand, and gsketcher.printVar().
def addSegmentY | ( | self, | |
y | |||
) |
Add one straight segment, defined by previous direction and intersect straight y= param y.
If the first point of sketcher is not yet defined, the origin (0, 0) will become the first sketcher point. The point's coordinates are defined in a local coordinate system which origin is the last point of the sketch
y | - value on the axis Oy |
References Sketcher3D.myCommand, Sketcher2D.myCommand, and gsketcher.printVar().
def addSegmentDirectionLength | ( | self, | |
dx, | |||
dy, | |||
length | |||
) |
Add one straight segment, defined by direction and length.
If the first point of sketcher is not yet defined, the origin (0, 0) will become the first sketcher point. The direction and length coordinates are defined in a local coordinate system which origin is the last point of the sketch
dx,dy | - direction of the segment |
length | - length of the segment |
References Sketcher3D.myCommand, Sketcher2D.myCommand, and gsketcher.printVar().
def addSegmentDirectionX | ( | self, | |
dx, | |||
dy, | |||
x | |||
) |
Add one straight segment, defined by direction and intersect straight x= param x.
If the first point of sketcher is not yet defined, the origin (0, 0) will become the first sketcher point. The direction and point's coordinates are defined in a local coordinate system which origin is the last point of the sketch
dx,dy | - direction of the segment |
x | - value on the axis Ox |
References Sketcher3D.myCommand, Sketcher2D.myCommand, and gsketcher.printVar().
def addSegmentDirectionY | ( | self, | |
dx, | |||
dy, | |||
y | |||
) |
Add one straight segment, defined by direction and intersect straight y= param y.
If the first point of sketcher is not yet defined, the origin (0, 0) will become the first sketcher point. The direction and point's coordinates are defined in a local coordinate system which origin is the last point of the sketch
dx,dy | - direction of the segment |
y | - value on the axis Oy |
References Sketcher3D.myCommand, Sketcher2D.myCommand, and gsketcher.printVar().
def addArcAbsolute | ( | self, | |
x, | |||
y | |||
) |
Add arc, which connects the given point with previous point Coordinates are considered as absolute.
If the first point of sketcher is not yet defined, the origin (0, 0) will become the first sketcher point.
x,y | - Coordinates of second point of arc |
References Sketcher3D.myCommand, Sketcher2D.myCommand, and gsketcher.printVar().
def addArcRelative | ( | self, | |
dx, | |||
dy | |||
) |
Add arc, which connects the given point with previous point Coordinates are considered relative to the previous point.
dx,dy | - Coordinates of second point of arc relative to the previous point |
References Sketcher3D.myCommand, Sketcher2D.myCommand, and gsketcher.printVar().
def addArcRadiusAbsolute | ( | self, | |
x, | |||
y, | |||
radius, | |||
flag | |||
) |
Add arc, defined by radius and coordinates of next point.
Coordinates are considered as absolute. If the first point of sketcher is not yet defined, the origin (0, 0) will become the first sketcher point.
x,y | - Coordinates of second point of arc |
radius | - radius of arc |
flag | - is 0 or 2 if 0 the drawn arc is the one of lower angle (<Pi) if 2 the drawn arc is the one of greater angle (>Pi) |
References Sketcher3D.myCommand, Sketcher2D.myCommand, and gsketcher.printVar().
def addArcRadiusRelative | ( | self, | |
dx, | |||
dy, | |||
radius, | |||
flag | |||
) |
Add arc, defined by radius and coordinates of next point.
Coordinates are considered relative to the previous point.
dx,dy | - Coordinates of second point of arc |
radius | - radius of arc |
flag | - is 0 or 2 if 0 the drawn arc is the one of lower angle (<Pi) if 2 the drawn arc is the one of greater angle (>Pi) |
References Sketcher3D.myCommand, Sketcher2D.myCommand, and gsketcher.printVar().
def addArcCenterAbsolute | ( | self, | |
x, | |||
y, | |||
xc, | |||
yc, | |||
flag1, | |||
flag2 | |||
) |
Add arc, defined by coordinates of next point and coordinates of center.
Coordinates are considered as absolute. If the first point of sketcher is not yet defined, the origin (0, 0) will become the first sketcher point.
x,y | - Coordinates of second point of arc |
xc,yc | - Coordinates of center |
flag1 | - (reverse) is 0 or 2 if 0 the drawn arc is the one of lower angle (<Pi) if 2 the drawn arc is 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 |
References Sketcher3D.myCommand, Sketcher2D.myCommand, and gsketcher.printVar().
def addArcCenterRelative | ( | self, | |
dx, | |||
dy, | |||
xc, | |||
yc, | |||
flag1, | |||
flag2 | |||
) |
Add arc, defined by coordinates of next point and coordinates of center.
Coordinates are considered relative to the previous point.
dx,dy | - Coordinates of second point of arc |
xc,yc | - Coordinates of center |
flag1 | - (reverse) is 0 or 2 if 0 the drawn arc is the one of lower angle (<Pi) if 2 the drawn arc is 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 |
References Sketcher3D.myCommand, Sketcher2D.myCommand, and gsketcher.printVar().
def addArcAngleRadiusLength | ( | self, | |
angle, | |||
radius, | |||
length | |||
) |
Add arc, defined by angle, radius and length.
If the first point of sketcher is not yet defined, the origin (0, 0) will become the first sketcher point.
angle | - angle in a plane |
radius | - radius of the arc |
length | - length of the arc |
References Sketcher3D.myCommand, Sketcher2D.myCommand, and gsketcher.printVar().
def addArcPerpRadiusLength | ( | self, | |
radius, | |||
length | |||
) |
Add arc, defined by perpendicular(angle=90), radius and length.
If the first point of sketcher is not yet defined, the origin (0, 0) will become the first sketcher point.
radius | - radius of the arc |
length | - length of the arc |
References Sketcher3D.myCommand, Sketcher2D.myCommand, and gsketcher.printVar().
def addArcRadiusLength | ( | self, | |
radius, | |||
length | |||
) |
Add arc, defined by previous direction, radius and length.
If the first point of sketcher is not yet defined, the origin (0, 0) will become the first sketcher point.
radius | - radius of the arc |
length | - length of the arc |
References Sketcher3D.myCommand, Sketcher2D.myCommand, and gsketcher.printVar().
def addArcDirectionRadiusLength | ( | self, | |
dx, | |||
dy, | |||
radius, | |||
length | |||
) |
Add arc, defined by direction, radius and length.
If the first point of sketcher is not yet defined, the origin (0, 0) will become the first sketcher point.
dx,dy | - direction of the arc |
radius | - radius of the arc |
length | - length of the arc |
References Sketcher3D.myCommand, Sketcher2D.myCommand, and gsketcher.printVar().
def close | ( | self | ) |
Set to close the wire.
References Sketcher2D.closed.
def wire | ( | self, | |
WorkingPlane = [0 , |
|||
theName = None |
|||
) |
Obtain the sketcher result as a wire.
WorkingPlane | - current Working Plane used for this 2DSketcher |
theName | Object 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. |
References Sketcher2D.closed, Sketcher3D.myCommand, Sketcher2D.myCommand, geomBuilder.ParseSketcherCommand(), and geomBuilder.RaiseIfFailed().
def face | ( | self, | |
WorkingPlane = [0 , |
|||
theName = None |
|||
) |
Obtain the sketcher result as a face.
WorkingPlane | - current Working Plane used for this 2DSketcher |
theName | Object 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. |
References Sketcher2D.closed, Sketcher3D.myCommand, Sketcher2D.myCommand, geomBuilder.ParseSketcherCommand(), and geomBuilder.RaiseIfFailed().
geompyD |
myCommand |
closed |