Public Member Functions | List of all members
Sketch Class Reference

Sketch Class
The commands in the Sketch Sketch are described below.
. More...

Inherits ItemObject.

Public Member Functions

virtual void AddPropertyByReference (String &name, ReferenceObject *value)
 Adds ReferenceObject object to a specified variable. More...
 
void CloseSketch ()
 Finishes editing the sketch.
 
SketchArcCreateArc (double center_x, double center_y, double start_x, double start_y, double end_x, double end_y)
 Creates an arc by specifying the center point, start point, and end point. More...
 
SketchArcCreateArcWithCoordinateItem (double center_x, double center_y, ReferenceObject *centerCoordRef, double start_x, double start_y, ReferenceObject *startCoordRef, double end_x, double end_y, ReferenceObject *endCoordRef)
 Creates an arc by specifying the center point, start point, end point and coordinate system. More...
 
ConstraintObjectCreateBiConstraint (Variant &value, ReferenceObject *ref, ReferenceObject *ref2)
 Specifies constraint to basic shape (constraint with 2 targets). More...
 
RegionBooleanCreateBoolean ()
 Runs Boolean for regions in a sketch. More...
 
SketchCircleCreateCircle (double x, double y, double radius)
 Creates a circle by specifying the center point and radius. More...
 
SketchCircleCreateCircleBy2LinesRadius (ReferenceObject *ref1, ReferenceObject *ref2, double radius, double x, double y)
 Creates a circle by specifying two lines tangent to the circle and a radius. More...
 
SketchCircleCreateCircleBy2LinesRadiusWithCoordinateItem (ReferenceObject *ref1, ReferenceObject *ref2, double radius, double x, double y, ReferenceObject *coordRef)
 Creates a circle by specifying two lines tangent to the circle, the radius, and the coordinate system. More...
 
SketchCircleCreateCircleBy2PointsRadius (double point1_x, double point1_y, double point2_x, double point2_y, double radius, bool right_side)
 Creates a circle by specifying two points on a circumference and a radius. More...
 
SketchCircleCreateCircleBy2PointsRadiusWithCoordinateItem (double point1_x, double point1_y, double point2_x, double point2_y, ReferenceObject *coordRef, double radius, bool right_side)
 Creates a circle by specifying two points on a circumference, radius and coordinate system. More...
 
SketchCircleCreateCircleBy3Line (ReferenceObject *ref1, ReferenceObject *ref2, ReferenceObject *ref3)
 Creates a circle by specifying three lines that are all connected to a circle. More...
 
SketchCircleCreateCircleBy3Points (double point1_x, double point1_y, double point2_x, double point2_y, double point3_x, double point3_y)
 Creates a circle by specifying the three points on the circumference. More...
 
SketchCircleCreateCircleBy3PointsWithCoordinateItem (double point1_x, double point1_y, double point2_x, double point2_y, double point3_x, double point3_y, ReferenceObject *coordRef)
 Creates a circle by specifying the three points on the circumference and coordinate system. More...
 
SketchCircleCreateCircleByDiameter (double point1_x, double point1_y, double point2_x, double point2_y)
 Creates a circle by specifying two points that are positioned on the diameter of the circle. More...
 
SketchCircleCreateCircleByDiameterWithCoordinateItem (double point1_x, double point1_y, double point2_x, double point2_y, ReferenceObject *coordRef)
 Creates a circle by specifying two points and coordinate system that are positioned on the diameter of the circle. More...
 
SketchCircleCreateCircleWithCoordinateItem (double x, double y, ReferenceObject *coordRef, double radius)
 Creates a circle by specifying the center point, radius and coordinate system. More...
 
ConstraintObjectCreateConstraint (Variant &value)
 Specifies constraint to basic shape (constraint with multiple target). More...
 
RegionMergeNodeCreateDeleteDuplicatedNodes ()
 Deletes duplicated nodes in the sketch. More...
 
SketchEllipseCreateEllipse (double center_x, double center_y, double major_radius, double minor_radius, double major_angle)
 Creates an ellipse. More...
 
SketchEllipseCreateEllipseWithCoordinateItem (double center_x, double center_y, ReferenceObject *coordRef, double major_radius, double minor_radius, double major_angle)
 Creates an ellipse by specifying a coordinate system. More...
 
SketchEllipticalArcCreateEllipticalArc (double center_x, double center_y, double start_x, double start_y, double end_x, double end_y, double major_radius, double minor_radius, double major_angle)
 Creates an elliptical arc. More...
 
SketchEllipticalArcCreateEllipticalArcWithCoordinateItem (double center_x, double center_y, ReferenceObject *centerCoordRef, double start_x, double start_y, ReferenceObject *startCoordRef, double end_x, double end_y, ReferenceObject *endCoordRef, double major_radius, double minor_radius, double major_angle)
 Creates an elliptical arc by specifying a coordinate system. More...
 
SketchFunctionCurveCreateExplicitFunctionCurve (String &y, double start, double end)
 Creates a function curve by the type "y=f(x)". More...
 
ConstraintObjectCreateExternalConstraint (Variant &value, ReferenceObject *ref, ReferenceObject *exref)
 Specifies constraint to basic shape (Project Coincident). More...
 
SketchLineCreateLine (double sx, double sy, double ex, double ey)
 Creates a line. More...
 
SketchLineCreateLineByLengthAngle (double sx, double sy, double length, double angle)
 Creates a line. More...
 
SketchLineCreateLineByLengthAngleWithCoordinateItem (double sx, double sy, ReferenceObject *coordRef, double length, double angle)
 Creates a line by specifying a coordinate system. More...
 
SketchLineCreateLineWithCoordinateItem (double sx, double sy, ReferenceObject *startCoordRef, double ex, double ey, ReferenceObject *endCoordRef)
 Creates a line by specifying a coordinate system. More...
 
ConstraintObjectCreateMonoConstraint (Variant &value, ReferenceObject *ref)
 Specifies constraint to basic shape (constraint with 1 target). More...
 
void CreateOuterRegions ()
 Creates regions of outer loop by specifying lines and arcs.
 
void CreateOuterRegionsWithCleanup (double tolerance, bool addConstraint)
 Creates regions of outer loop by specifying lines and arcs.
Selected lines and arcs are applied healing with specifying tolerance. More...
 
SketchFunctionCurveCreateParametricFunctionCurve (String &x, String &y, double start, double end)
 Creates a function curve by the type "x=f(t), y=g(t)". More...
 
void CreateRectangle (double sx, double sy, double ex, double ey)
 Creates a line. More...
 
RegionChamferCreateRegionChamfer ()
 Chamfers the region. More...
 
RegionCircularPatternCreateRegionCircularPattern ()
 Creates the rotation copy of the region. More...
 
RegionEdgeMoveCreateRegionEdgeMove ()
 Moves region edges. More...
 
RegionEdgeOffsetCreateRegionEdgeOffset ()
 Offsets region edges. More...
 
RegionFilletCreateRegionFillet ()
 Fillets the region. More...
 
RegionLinearPatternCreateRegionLinearPattern ()
 Creates the copies of the region in the horizontal or vertical direction. More...
 
RegionMeshCreateRegionMesh ()
 Creates mesh to region. More...
 
RegionMirrorCopyCreateRegionMirrorCopy ()
 Creates the mirror copies of the region. More...
 
RegionMoveCreateRegionMove ()
 Moves regions. More...
 
RegionCircularPatternCreateRegionRadialPattern ()
 Creates the rotation copy of the region. More...
 
void CreateRegions ()
 Creates regions by specifying lines and arcs.
If regions include other region, they are added the inner loop.
 
void CreateRegionsWithCleanup (double tolerance, bool addConstraint=true)
 Creates regions by selected lines and arcs which applied healing with specifying tolerance.
If regions include other region, they are added the inner loop. More...
 
RegionScaleCreateScale ()
 Enlarges or shrinks regions. More...
 
SketchSplineCreateSpline (String array &points)
 Creates a spline. More...
 
UserDefinedRegionTemplateCreateUserDefinedRegionTemplate ()
 Creates a user defined region template. More...
 
SketchVertexCreateVertex (double x, double y)
 Creates a vertex. More...
 
SketchVertexCreateVertexWithCoordinateItem (double x, double y, ReferenceObject *coordRef)
 Creates a vertex by specifying a coordinate system. More...
 
WireTemplateCreateWireTemplate ()
 Creates a region for wire using wire templates. More...
 
ItemObjectGetItem (Variant &value)
 Returns an item displayed in the [Model Manager] tree such as assembly, part and sketch. Index is numbered in the order of the each items shown in the tree. More...
 
String GetName ()
 Returns a name. More...
 
virtual Variant GetProperty (String &name)
 Returns the value of the property with the specified name. More...
 
String GetScriptTypeName ()
 Returns the name of the object type as a string. More...
 
bool IsValid ()
 Returns True if an object is valid. More...
 
int NumItems ()
 Returns the number of items. More...
 
void OpenSketch ()
 Starts editing a sketch.
 
void SetColor (int red, int blue, int green)
 Specifies the region color in the sketch. More...
 
void SetName (String &name)
 Specifies a name. More...
 
virtual void SetProperty (String &name, Variant &value)
 Specifies a value of property. More...
 
virtual void SetPropertyByReference (String &name, ReferenceObject *value)
 Specifies the values in properties by ReferenceObject object. More...
 

Detailed Description

Sketch Class
The commands in the Sketch Sketch are described below.
.

The Sketch class includes the commands for the following operation.

For more information about the properties for this class, see here .

Member Function Documentation

void ItemObject::AddPropertyByReference ( String &  name,
ReferenceObject value 
)
virtualinherited

Adds ReferenceObject object to a specified variable.

Parameters
nameProperty name
valueReferenceObject object (target)
SketchArc * Sketch::CreateArc ( double  center_x,
double  center_y,
double  start_x,
double  start_y,
double  end_x,
double  end_y 
)

Creates an arc by specifying the center point, start point, and end point.

Parameters
center_xCenter point in the X coordinate
center_yCenter point in the Y coordinate
start_xStart point in the X coordinate
start_yStart point in the Y coordinate
end_xEnd point in the X coordinate
end_yEnd point in the Y coordinate
Returns
SketchArc object

An arc cannot be created if another arc is already created at the same position. In this case, the value of the existing arc is returned.

SketchArc * Sketch::CreateArcWithCoordinateItem ( double  center_x,
double  center_y,
ReferenceObject centerCoordRef,
double  start_x,
double  start_y,
ReferenceObject startCoordRef,
double  end_x,
double  end_y,
ReferenceObject endCoordRef 
)

Creates an arc by specifying the center point, start point, end point and coordinate system.

Parameters
center_xCenter point in the X coordinate
center_yCenter point in the Y coordinate
centerCoordRefCenter point in the coordinate system object
start_xStart point in the X coordinate
start_yStart point in the Y coordinate
startCoordRefStart point in the coordinate system object
end_xEnd point in the X coordinate
end_yEnd point in the Y coordinate
endCoordRefEnd point in the coordinate system object
Returns
SketchArc object

An arc cannot be created if another arc is already created at the same position. In this case, the value of the existing arc is returned.

ConstraintObject * Sketch::CreateBiConstraint ( Variant &  value,
ReferenceObject ref,
ReferenceObject ref2 
)

Specifies constraint to basic shape (constraint with 2 targets).

Parameters
value
Types of constraints
2="distance"
3="concentricity"
4="tangency"
5="angle"
6="parallelism"
8="perpendicularity"
10="coincident"
refReferenceObject object
ref2ReferenceObject object
Returns
ConstraintObject object

For more information about ConstraintObject properies, see " Properties for 2D Constraint ".

RegionBoolean * Sketch::CreateBoolean ( )

Runs Boolean for regions in a sketch.

Returns
RegionBoolean object
SketchCircle * Sketch::CreateCircle ( double  x,
double  y,
double  radius 
)

Creates a circle by specifying the center point and radius.

Parameters
xCenter point in the X coordinate
yCenter point in the Y coordinate
radiusRadius
Returns
SketchCircle object

A circle cannot be created if another circle already exists in the same position. The SketchCircle object for the circle that already exists is returned.

SketchCircle * Sketch::CreateCircleBy2LinesRadius ( ReferenceObject ref1,
ReferenceObject ref2,
double  radius,
double  x,
double  y 
)

Creates a circle by specifying two lines tangent to the circle and a radius.

Parameters
ref1Object for line
ref2Object for line
radiusRadius
xX-coordinate of support points
yY-coordinate of support points
Returns
SketchCircle object

A circle cannot be created if another circle already exists in the same position. The SketchCircle object for the circle that already exists is returned.

SketchCircle * Sketch::CreateCircleBy2LinesRadiusWithCoordinateItem ( ReferenceObject ref1,
ReferenceObject ref2,
double  radius,
double  x,
double  y,
ReferenceObject coordRef 
)

Creates a circle by specifying two lines tangent to the circle, the radius, and the coordinate system.

Parameters
ref1Object for line
ref2Object for line
radiusRadius
xX-coordinate of support points
yY-coordinate of support points
coordRefCoordinate system object
Returns
SketchCircle object

A circle cannot be created if another circle already exists in the same position. The SketchCircle object for the circle that already exists is returned.

SketchCircle * Sketch::CreateCircleBy2PointsRadius ( double  point1_x,
double  point1_y,
double  point2_x,
double  point2_y,
double  radius,
bool  right_side 
)

Creates a circle by specifying two points on a circumference and a radius.

Parameters
point1_xX-coordinate of Point1
point1_yY-coordinate of Point1
point2_xX-coordinate of Point2
point2_yY-coordinate of Point2
radiusRadius
right_side
True=on : Creates a radius on the right side of the line drawn toward point 2 from point 1
False=off : Creates a radius on the left side of the line drawn toward point 2 from point 1
Returns
SketchCircle object

A circle cannot be created if another circle already exists in the same position. The SketchCircle object for the circle that already exists is returned.

SketchCircle * Sketch::CreateCircleBy2PointsRadiusWithCoordinateItem ( double  point1_x,
double  point1_y,
double  point2_x,
double  point2_y,
ReferenceObject coordRef,
double  radius,
bool  right_side 
)

Creates a circle by specifying two points on a circumference, radius and coordinate system.

Parameters
point1_xX-coordinate of Point1
point1_yY-coordinate of Point1
point2_xX-coordinate of Point2
point2_yY-coordinate of Point2
coordRefCoordinate system object
radiusRadius
right_side
True=on : Creates a radius on the right side of the line drawn toward point 2 from point 1
False=off : Creates a radius on the left side of the line drawn toward point 2 from point 1
Returns
SketchCircle object

A circle cannot be created if another circle already exists in the same position. The SketchCircle object for the circle that already exists is returned.

SketchCircle * Sketch::CreateCircleBy3Line ( ReferenceObject ref1,
ReferenceObject ref2,
ReferenceObject ref3 
)

Creates a circle by specifying three lines that are all connected to a circle.

Parameters
ref1Line 1
ref2Line 2
ref3Line 3
Returns
SketchCircle object

A circle cannot be created if another circle already exists in the same position. The SketchCircle object for the circle that already exists is returned.

SketchCircle * Sketch::CreateCircleBy3Points ( double  point1_x,
double  point1_y,
double  point2_x,
double  point2_y,
double  point3_x,
double  point3_y 
)

Creates a circle by specifying the three points on the circumference.

Parameters
point1_xPoint 1 on the X coordinate
point1_yPoint 1 on the Y coordinate
point2_xPoint 2 on the X coordinate
point2_yPoint 2 on the Y coordinate
point3_xPoint 3 on the X coordinate
point3_yPoint 3 on the Y coordinate
Returns
SketchCircle object

A circle cannot be created if another circle already exists in the same position. The SketchCircle object for the circle that already exists is returned.

SketchCircle * Sketch::CreateCircleBy3PointsWithCoordinateItem ( double  point1_x,
double  point1_y,
double  point2_x,
double  point2_y,
double  point3_x,
double  point3_y,
ReferenceObject coordRef 
)

Creates a circle by specifying the three points on the circumference and coordinate system.

Parameters
point1_xPoint 1 on the X coordinate
point1_yPoint 1 on the Y coordinate
point2_xPoint 2 on the X coordinate
point2_yPoint 2 on the Y coordinate
point3_xPoint 3 on the X coordinate
point3_yPoint 3 on the Y coordinate
coordRefCoordinate system object
Returns
SketchCircle object

A circle cannot be created if another circle already exists in the same position. The SketchCircle object for the circle that already exists is returned.

SketchCircle * Sketch::CreateCircleByDiameter ( double  point1_x,
double  point1_y,
double  point2_x,
double  point2_y 
)

Creates a circle by specifying two points that are positioned on the diameter of the circle.

Parameters
point1_xX-coordinate of Point1
point1_yY-coordinate of Point1
point2_xX-coordinate of Point2
point2_yY-coordinate of Point2
Returns
SketchCircle object

A circle cannot be created if another circle already exists in the same position. The SketchCircle object for the circle that already exists is returned.

SketchCircle * Sketch::CreateCircleByDiameterWithCoordinateItem ( double  point1_x,
double  point1_y,
double  point2_x,
double  point2_y,
ReferenceObject coordRef 
)

Creates a circle by specifying two points and coordinate system that are positioned on the diameter of the circle.

Parameters
point1_xX-coordinate of Point1
point1_yY-coordinate of Point1
point2_xX-coordinate of Point2
point2_yY-coordinate of Point2
coordRefCoordinate system object
Returns
SketchCircle object

A circle cannot be created if another circle already exists in the same position. The SketchCircle object for the circle that already exists is returned.

SketchCircle * Sketch::CreateCircleWithCoordinateItem ( double  x,
double  y,
ReferenceObject coordRef,
double  radius 
)

Creates a circle by specifying the center point, radius and coordinate system.

Parameters
xCenter point in the X coordinate
yCenter point in the Y coordinate
coordRefCoordinate system object
radiusRadius
Returns
SketchCircle object

A circle cannot be created if another circle already exists in the same position. The SketchCircle object for the circle that already exists is returned.

ConstraintObject * Sketch::CreateConstraint ( Variant &  value)

Specifies constraint to basic shape (constraint with multiple target).

Parameters
value
Types of constraints
12 ="rigidset" : Relative fixation
Returns
ConstraintObject object

For more information about ConstraintObject properies, see " Properties for 2D Constraint ".

RegionMergeNode * Sketch::CreateDeleteDuplicatedNodes ( )

Deletes duplicated nodes in the sketch.

Returns
RegionMergeNode object
SketchEllipse * Sketch::CreateEllipse ( double  center_x,
double  center_y,
double  major_radius,
double  minor_radius,
double  major_angle 
)

Creates an ellipse.

Parameters
center_x
center_y
major_radius
minor_radius
major_angle
Returns
SketchEllipse object
SketchEllipse * Sketch::CreateEllipseWithCoordinateItem ( double  center_x,
double  center_y,
ReferenceObject coordRef,
double  major_radius,
double  minor_radius,
double  major_angle 
)

Creates an ellipse by specifying a coordinate system.

Parameters
center_x
center_y
coordRefCoordinate system object
major_radius
minor_radius
major_angle
Returns
SketchEllipse object
SketchEllipticalArc * Sketch::CreateEllipticalArc ( double  center_x,
double  center_y,
double  start_x,
double  start_y,
double  end_x,
double  end_y,
double  major_radius,
double  minor_radius,
double  major_angle 
)

Creates an elliptical arc.

Parameters
center_x
center_y
start_x
start_y
end_x
end_y
major_radius
minor_radius
major_angle
Returns
SketchEllipticalArc object
SketchEllipticalArc * Sketch::CreateEllipticalArcWithCoordinateItem ( double  center_x,
double  center_y,
ReferenceObject centerCoordRef,
double  start_x,
double  start_y,
ReferenceObject startCoordRef,
double  end_x,
double  end_y,
ReferenceObject endCoordRef,
double  major_radius,
double  minor_radius,
double  major_angle 
)

Creates an elliptical arc by specifying a coordinate system.

Parameters
center_xCen
center_y
centerCoordRefCenter point coordinate system object
start_x
start_y
startCoordRefStart point coordinate system object
end_x
end_y
endCoordRefEnd point coordinate system object
major_radius
minor_radius
major_angle
Returns
SketchEllipticalArc object
SketchFunctionCurve * Sketch::CreateExplicitFunctionCurve ( String &  y,
double  start,
double  end 
)

Creates a function curve by the type "y=f(x)".

Parameters
yequation y
startstart value
endend value
Returns
SketchFunctionCurve object
ConstraintObject * Sketch::CreateExternalConstraint ( Variant &  value,
ReferenceObject ref,
ReferenceObject exref 
)

Specifies constraint to basic shape (Project Coincident).

Parameters
value
Types of constraints
15="externalcoincident" :Project Coincident
Returns
Object for constraint

For more information about ConstraintObject properies, see " Properties for 2D Constraint ".

SketchLine * Sketch::CreateLine ( double  sx,
double  sy,
double  ex,
double  ey 
)

Creates a line.

Parameters
sxStart point in the X coordinate
syStart point in the Y coordinate
exEnd point in the X coordinate
eyEnd point in the Y coordinate
Returns
SketchLine object

A line cannot be created if another line is already created at the same position. In this case, the value of the existing line is returned.

SketchLine * Sketch::CreateLineByLengthAngle ( double  sx,
double  sy,
double  length,
double  angle 
)

Creates a line.

Parameters
sxStart point in the X coordinate
syStart point in the Y coordinate
lengthLength from the start point
angleAngle
Returns
SketchLine object

A line cannot be created if another line is already created at the same position. In this case, the value of the existing line is returned.

SketchLine * Sketch::CreateLineByLengthAngleWithCoordinateItem ( double  sx,
double  sy,
ReferenceObject coordRef,
double  length,
double  angle 
)

Creates a line by specifying a coordinate system.

Parameters
sxStart point in the X coordinate
syStart point in the Y coordinate
coordRefStart point in the coordinate system object
lengthLength from the start point
angleAngle
Returns
SketchLine object

A line cannot be created if another line is already created at the same position. In this case, the value of the existing line is returned.

SketchLine * Sketch::CreateLineWithCoordinateItem ( double  sx,
double  sy,
ReferenceObject startCoordRef,
double  ex,
double  ey,
ReferenceObject endCoordRef 
)

Creates a line by specifying a coordinate system.

Parameters
sxStart point in the X coordinate
syStart point in the Y coordinate
startCoordRefStart point in the coordinate system object
exEnd point in the X coordinate
eyEnd point in the Y coordinate
endCoordRefEnd point in the coordinate system object
Returns
SketchLine object

A line cannot be created if another line is already created at the same position. In this case, the value of the existing line is returned.

ConstraintObject * Sketch::CreateMonoConstraint ( Variant &  value,
ReferenceObject ref 
)

Specifies constraint to basic shape (constraint with 1 target).

Parameters
value
Types of constraints
1="fixture" : Fixture
2="distance" : Distance
7="horizontality" : Horizontality
9="verticality" : Verticality
11="radius" : Constraint (Radius/Diameter)
12="major_radius" : Constraint (Major Radius/Major Diameter)
13="minor_radius" : Constraint (Minor Radius/Minor Diameter)
refReferenceObject object
Returns
ConstraintObject object

For more information about ConstraintObject properies, see " Properties for 2D Constraint ".

void Sketch::CreateOuterRegionsWithCleanup ( double  tolerance,
bool  addConstraint 
)

Creates regions of outer loop by specifying lines and arcs.
Selected lines and arcs are applied healing with specifying tolerance.

Parameters
tolerance
SketchFunctionCurve * Sketch::CreateParametricFunctionCurve ( String &  x,
String &  y,
double  start,
double  end 
)

Creates a function curve by the type "x=f(t), y=g(t)".

Parameters
xequation x
yequation y
startstart value
endend value
Returns
SketchFunctionCurve object
void Sketch::CreateRectangle ( double  sx,
double  sy,
double  ex,
double  ey 
)

Creates a line.

Parameters
sxStart point in the X coordinate
syStart point in the Y coordinate
exEnd point in the X coordinate
eyEnd point in the Y coordinate
RegionChamfer * Sketch::CreateRegionChamfer ( )

Chamfers the region.

Returns
RegionChamfer object
RegionCircularPattern * Sketch::CreateRegionCircularPattern ( )

Creates the rotation copy of the region.

Returns
RegionCircularPattern object
RegionEdgeMove * Sketch::CreateRegionEdgeMove ( )

Moves region edges.

Returns
RegionEdgeMove object
RegionEdgeMove * Sketch::CreateRegionEdgeOffset ( )

Offsets region edges.

Returns
RegionEdgeOffset object
RegionFillet * Sketch::CreateRegionFillet ( )

Fillets the region.

Returns
RegionFillet object
RegionLinearPattern * Sketch::CreateRegionLinearPattern ( )

Creates the copies of the region in the horizontal or vertical direction.

Returns
RegionLinearPattern object
RegionMesh * Sketch::CreateRegionMesh ( )

Creates mesh to region.

Returns
RegionMesh object
RegionMirrorCopy * Sketch::CreateRegionMirrorCopy ( )

Creates the mirror copies of the region.

Returns
RegionMirrorCopy object
RegionMove * Sketch::CreateRegionMove ( )

Moves regions.

Returns
RegionMove object
RegionCircularPattern * Sketch::CreateRegionRadialPattern ( )

Creates the rotation copy of the region.

Returns
RegionCircularPattern object
Deprecated:
Use CreateRegionCircularPattern() instead.
void Sketch::CreateRegionsWithCleanup ( double  tolerance,
bool  addConstraint = true 
)

Creates regions by selected lines and arcs which applied healing with specifying tolerance.
If regions include other region, they are added the inner loop.

Parameters
tolerance
RegionScale Sketch::CreateScale ( )

Enlarges or shrinks regions.

Returns
RegionScale object
SketchSpline * Sketch::CreateSpline ( String array &  points)

Creates a spline.

Parameters
pointsPoint sequence displaying the coordinate value of the control point configuring a spline
Returns
SketchSpline object

Error occurs in the following cases.

  • Only one point is specified in the point sequence.
  • The multiple points specified in the point sequence are on the same coordinate.
  • The number of points specified in the point sequence is an odd number.
UserDefinedRegionTemplate * Sketch::CreateUserDefinedRegionTemplate ( )

Creates a user defined region template.

Returns
UserDefinedRegionTemplate object
SketchVertex * Sketch::CreateVertex ( double  x,
double  y 
)

Creates a vertex.

Parameters
xVertex on the X coordinate
yVertex on the Y coordinate
Returns
SketchVertex object

A vertex cannot be created if another vertex is already created at the same position. In this case, the value of the existing vertex is returned.

SketchVertex * Sketch::CreateVertexWithCoordinateItem ( double  x,
double  y,
ReferenceObject coordRef 
)

Creates a vertex by specifying a coordinate system.

Parameters
xVertex on the X coordinate
yVertex on the Y coordinate
coordRefCoordinate system object
Returns
SketchVertex object

A vertex cannot be created if another vertex is already created at the same position. In this case, the value of the existing vertex is returned.

WireTemplate * Sketch::CreateWireTemplate ( )

Creates a region for wire using wire templates.

Returns
WireTemplate object
ItemObject * ItemObject::GetItem ( Variant &  value)
inherited

Returns an item displayed in the [Model Manager] tree such as assembly, part and sketch. Index is numbered in the order of the each items shown in the tree.

Parameters
valueItem name or index
Returns
ItemObject object
String ItemObject::GetName ( )
inherited

Returns a name.

Returns
Item name
Variant ItemObject::GetProperty ( String &  name)
virtualinherited

Returns the value of the property with the specified name.

Parameters
nameProperty name
Returns
Value of properties
String ItemObject::GetScriptTypeName ( )
inherited

Returns the name of the object type as a string.

Returns
Type name of object
bool Sketch::IsValid ( )
virtual

Returns True if an object is valid.

Returns
Whether or not the object are valid

Reimplemented from ItemObject.

int ItemObject::NumItems ( )
inherited

Returns the number of items.

Returns
Item count
void Sketch::SetColor ( int  red,
int  blue,
int  green 
)

Specifies the region color in the sketch.

Parameters
redRed (0 - 255)
blueBlue (0 - 255)
greenGreen (0 - 255)
void ItemObject::SetName ( String &  name)
inherited

Specifies a name.

Parameters
nameItem name
void ItemObject::SetProperty ( String &  name,
Variant &  value 
)
virtualinherited

Specifies a value of property.

Parameters
nameProperty name
valueValue of properties

Reimplemented in SketchItem.

void ItemObject::SetPropertyByReference ( String &  name,
ReferenceObject value 
)
virtualinherited

Specifies the values in properties by ReferenceObject object.

Parameters
nameProperty name
valueReferenceObject object (target)