SketchManager Class
The commands in the SketchManager class are described below.
.
More...
Public Member Functions | |
| void | BreakAtIntersection () |
| Breaks a sketch at an intersection. | |
| void | Connect2Lines () |
| Connects two basic shapes. | |
| void | Connect2LinesByPatternId (int pattern_id) |
| Connects two basic shapes. This function is used when there are multiple patterns of connection. More... | |
| void | CreateChamfer (double length, double angle, bool reverse) |
| Creates chamfering for basic shapes. More... | |
| void | CreateChamferByPatternId (double length, double angle, bool reverse, int pattern_id) |
| Creates chamfering for basic shapes. This function is used when there are multiple creation patterns. More... | |
| ConvertToRegionFillet * | CreateConvertToRegionFilletParameter () |
| Converts to the fillet feature. More... | |
| void | CreateFillet (double radius) |
| Creates fillets for basic shapes. More... | |
| void | CreateFilletByPatternId (double radius, int pattern_id) |
| Creates fillets for basic shapes. This function is used when there are multiple patterns of connection. More... | |
| void | DefineConstraints (String array &allowedTypes) |
| Creates constraints from geometries. More... | |
| void | DeleteDuplication (double tolerance) |
| Deletes multiple duplicated vertices to merge into one. More... | |
| void | Divide (int division, bool reverse_ratio, String array &ratio_list) |
| Divides basic shapes. More... | |
| void | Execute (ParameterObject *param) |
| Executes parameter. | |
| void | JointLine () |
| Creates joints for basic shapes. | |
| void | MergeLines () |
| Merges basic shapes. | |
| void | MirrorCopy (double x, double y, double angle, bool keep_constraints) |
| Creates mirror copies of a basic shape by defining an axis of symmetry. More... | |
| void | Move (double x, double y, bool keep_constraints) |
| Moves the sketch in a parallel direction by specifying a distance in displacement. More... | |
| void | ParallelCopy (double x, double y, int instance, bool keep_constraints) |
| Creates parallel copies of basic shape by specifying position of a copy destination. More... | |
| void | ParallelLines (double distance, bool reverse) |
| Specifies a distance, and then creates a parallel line from the selected line. More... | |
| void | Rotate (double x, double y, double angle, bool keep_constraints) |
| Moves the sketch in a rotational direction by specifying an angle in displacement. More... | |
| void | RotateCopy (double x, double y, double angle, int instance, bool keep_constraints) |
| Creates rotation copy of basic shape by defining center of rotation. More... | |
| void | Scale (double xFactor, double yFactor, double xCenter, double yCenter, bool keep_constraints) |
| Enlarges or shrinks basic shapes. More... | |
| void | SketchTrim (double x, double y) |
| Trims sketches. More... | |
| void | TangentLine () |
| Creates a line connecting the selected vertex and circle (or arc). | |
| void | VerticalLine () |
| Creates a vertical line connecting the selected vertex and line. | |
SketchManager Class
The commands in the SketchManager class are described below.
.
The SketchManager class includes the commands for the following operation.
| void SketchManager::Connect2LinesByPatternId | ( | int | pattern_id | ) |
Connects two basic shapes. This function is used when there are multiple patterns of connection.
| pattern_id | Connection pattern ID |
| void SketchManager::CreateChamfer | ( | double | length, |
| double | angle, | ||
| bool | reverse | ||
| ) |
Creates chamfering for basic shapes.
| length | Length |
| angle | Angle |
| reverse | True=on : Reverse
False=off : Do not reverse
|
| void SketchManager::CreateChamferByPatternId | ( | double | length, |
| double | angle, | ||
| bool | reverse, | ||
| int | pattern_id | ||
| ) |
Creates chamfering for basic shapes. This function is used when there are multiple creation patterns.
| length | Length |
| angle | Angle |
| reverse | True=on : Reverse
False=off : Do not reverse
|
| pattern_id | Connection pattern ID |
| ConvertToRegionFillet * SketchManager::CreateConvertToRegionFilletParameter | ( | ) |
Converts to the fillet feature.
For more information about ConvertToRegionFillet, see " ConvertToRegionFillet ".
| void SketchManager::CreateFillet | ( | double | radius | ) |
Creates fillets for basic shapes.
| radius | Fillet radius |
| void SketchManager::CreateFilletByPatternId | ( | double | radius, |
| int | pattern_id | ||
| ) |
Creates fillets for basic shapes. This function is used when there are multiple patterns of connection.
| radius | Fillet radius |
| pattern_id | Connection pattern ID |
| void SketchManager::DefineConstraints | ( | String array & | allowedTypes | ) |
Creates constraints from geometries.
| allowedTypes | Types of constraints
"distance" : Distance
"angle" : Angle
"radius" : Radius/Diameter
"fixture" : Fixation
"horizontality" : Horizontality
"verticality" : Verticality
"parallelism" : Parallel
"perpendicularity" : Perpendicular
"concentricity" : Concentric circle
"tangency" : Tangent circle
"coincident" : Coincident
|
The following example displays how to transfer string array using commands.
| void SketchManager::DeleteDuplication | ( | double | tolerance | ) |
Deletes multiple duplicated vertices to merge into one.
| tolerance | Tolerance |
| void SketchManager::Divide | ( | int | division, |
| bool | reverse_ratio, | ||
| String array & | ratio_list | ||
| ) |
Divides basic shapes.
| division | Number of divisions |
| reverse_ratio | True=on : Reverse direction of the division ratio
False=off : Do not reverse direction of the division ratio
|
| ratio_list | Division ratio list |
| void SketchManager::MirrorCopy | ( | double | x, |
| double | y, | ||
| double | angle, | ||
| bool | keep_constraints | ||
| ) |
Creates mirror copies of a basic shape by defining an axis of symmetry.
| x | X-coordinate of center point of axis |
| y | Y-coordinate of center point of axis |
| angle | Axis direction angle (X-coordinate) |
| keep_constraints | True=1 : Keep constraints
False=0 : Do not keep constraints
|
| void SketchManager::Move | ( | double | x, |
| double | y, | ||
| bool | keep_constraints | ||
| ) |
Moves the sketch in a parallel direction by specifying a distance in displacement.
| x | Displacement in X-direction |
| y | Displacement in Y-direction |
| keep_constraints | True=1 : Keep constraints
False=0 : Do not keep constraints
|
| void SketchManager::ParallelCopy | ( | double | x, |
| double | y, | ||
| int | instance, | ||
| bool | keep_constraints | ||
| ) |
Creates parallel copies of basic shape by specifying position of a copy destination.
| x | Displacement of X-direction per instance |
| y | Displacement of Y-direction per instance |
| instance | Number of instance |
| keep_constraints | True=1 : Keep constraints
False=0 : Do not keep constraints
|
| void SketchManager::ParallelLines | ( | double | distance, |
| bool | reverse | ||
| ) |
Specifies a distance, and then creates a parallel line from the selected line.
| distance | Distance |
| reverse | True=1 : Reverses the position to create a parallel.
False=0 : Do not reverse the position to create a parallel.
|
The right side is the true direction of the line based on the start and end point for the position to create a parallel.
| void SketchManager::Rotate | ( | double | x, |
| double | y, | ||
| double | angle, | ||
| bool | keep_constraints | ||
| ) |
Moves the sketch in a rotational direction by specifying an angle in displacement.
| x | Center of rotation in X coordinate |
| y | Center of rotation in Y coordinate |
| angle | Angle |
| keep_constraints | True=1 : Keep constraints
False=0 : Do not keep constraints
|
| void SketchManager::RotateCopy | ( | double | x, |
| double | y, | ||
| double | angle, | ||
| int | instance, | ||
| bool | keep_constraints | ||
| ) |
Creates rotation copy of basic shape by defining center of rotation.
| x | Rotation center of X-coordinate of rotation center |
| y | Rotation center of Y-coordinate of rotation center |
| angle | Angle |
| instance | Number of instance |
| keep_constraints | True=1 : Keep constraints
False=0 : Do not keep constraints
|
| void SketchManager::Scale | ( | double | xFactor, |
| double | yFactor, | ||
| double | xCenter, | ||
| double | yCenter, | ||
| bool | keep_constraints | ||
| ) |
Enlarges or shrinks basic shapes.
| xFactor | Factor of X-axis direction |
| yFactor | Factor of Y-axis direction |
| xCenter | X-coordinate of center point of the scale |
| yCenter | Y-coordinate of center point of the scale |
| keep_constraints | True=1 : Keep constraints
False=0 : Do not keep constraints
|
| void SketchManager::SketchTrim | ( | double | x, |
| double | y | ||
| ) |
Trims sketches.
| x | Line (circle, arc, or spline) is trimmed on a point on X coordinate |
| y | Line (circle, arc, or spline) is trimmed on a point on Y coordinate |
The value for X and Y coordinates are specified when the pointer is clicked on a position for a target in the work plane.