create_object
Generate new 3D objects in FreeCAD by specifying document name, object type (e.g., Part, Draft), and properties like dimensions and colors.
Instructions
Create a new object in FreeCAD.
Args:
doc_name: The name of the document to create the object in.
obj_type: The type of the object to create (e.g. 'Part::Box', 'Part::Cylinder', 'Draft::Circle', 'PartDesign::Body', etc.).
obj_name: The name of the object to create.
obj_properties: The properties of the object to create.
Returns:
A message indicating the success or failure of the object creation and a screenshot of the object.
Examples:
If you want to create a cylinder with a height of 30 and a radius of 10, you can use the following data.
```json
{
"doc_name": "MyCylinder",
"obj_name": "Cylinder",
"obj_type": "Part::Cylinder",
"obj_properties": {
"Height": 30,
"Radius": 10,
"Placement": {
"Base": {
"x": 10,
"y": 10,
"z": 0
},
"Rotation": {
"Axis": {
"x": 0,
"y": 0,
"z": 1
},
"Angle": 45
}
},
"ViewObject": {
"ShapeColor": [0.5, 0.5, 0.5, 1.0]
}
}
}
```
If you want to create a circle with a radius of 10, you can use the following data.
```json
{
"doc_name": "MyCircle",
"obj_name": "Circle",
"obj_type": "Draft::Circle",
}
```
If you want to create a FEM analysis, you can use the following data.
```json
{
"doc_name": "MyFEMAnalysis",
"obj_name": "FEMAnalysis",
}
```
Input Schema
Name | Required | Description | Default |
---|---|---|---|
doc_name | Yes | ||
obj_name | Yes | ||
obj_properties | No | ||
obj_type | Yes |
Input Schema (JSON Schema)
{
"properties": {
"doc_name": {
"title": "Doc Name",
"type": "string"
},
"obj_name": {
"title": "Obj Name",
"type": "string"
},
"obj_properties": {
"default": null,
"title": "Obj Properties",
"type": "object"
},
"obj_type": {
"title": "Obj Type",
"type": "string"
}
},
"required": [
"doc_name",
"obj_type",
"obj_name"
],
"title": "create_objectArguments",
"type": "object"
}