CAD kit command
constraint.addGeometric
Geometric Constraint
Adds a geometric constraint of a given type between points or objects and re-solves the drawing's constraints.
- Kit
- CAD 0.1.0 (.dxf)
- Changes the document
- yes
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
h1 | string | no | |
h2 | string | no | |
h3 | string | no | |
p1 | string | number[] | no | |
p2 | string | number[] | no | |
p3 | string | number[] | no | |
type | "coincident" | "collinear" | "concentric" | "fix" | "parallel" | "perpendicular" | "horizontal" | "vertical" | "tangent" | "smooth" | "symmetric" | "equal" | no |
Call through cad_run
text
cad_run {
"path": "<file>.dxf",
"steps": [{ "command": "constraint.addGeometric" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: h1, h2, h3, p1, p2, p3, type. cad_run answers the step’s result in completed[i].result.
Result
The kit gives no result schema for this command.
Parameter schema
json
{
"additionalProperties": false,
"properties": {
"h1": {
"type": "string",
"x-khp-types": [
"Entity"
]
},
"h2": {
"type": "string",
"x-khp-types": [
"Entity"
]
},
"h3": {
"type": "string",
"x-khp-types": [
"Entity"
]
},
"p1": {
"oneOf": [
{
"type": "string"
},
{
"items": {
"type": "number"
},
"type": "array"
}
]
},
"p2": {
"oneOf": [
{
"type": "string"
},
{
"items": {
"type": "number"
},
"type": "array"
}
]
},
"p3": {
"oneOf": [
{
"type": "string"
},
{
"items": {
"type": "number"
},
"type": "array"
}
]
},
"type": {
"enum": [
"coincident",
"collinear",
"concentric",
"fix",
"parallel",
"perpendicular",
"horizontal",
"vertical",
"tangent",
"smooth",
"symmetric",
"equal"
],
"type": "string"
}
},
"type": "object"
}Generated from the command list of @kition/[email protected] and the kit itself (cad_commands through @kition/[email protected], built from KitionAI/kition-cad@1ec542d). As data: commands.jsonl.