geom_primitive
Creates COMSOL geometry primitives such as blocks, cylinders, spheres, and polygons from size, position, and orientation inputs to simplify model setup and feature creation.
Instructions
Create a primitive geometry object with ergonomic aliases.
Args:
kind: Block | Cylinder | Sphere | Cone | Torus | Pyramid | Hexahedron |
Tetrahedron | Ellipsoid | Helix | Point | LineSegment | Polygon |
Rectangle | Square | Circle | Ellipse | Interval
(aliases: box, ball, rect, disk, line...).
size: size expressions; Block [l,w,h], Rectangle [w,h], Square/Interval
scalar. Units follow the geometry length unit, e.g. ["0.1","0.05","0.02"].
pos: position [x,y] or [x,y,z] (base point; see base property).
r: radius (Cylinder/Sphere/Cone/Circle/Torus major radius).
h: height (Cylinder/Cone).
axis: axis direction vector (3 values) or "x"/"y"/"z".
rot: rotation angle in degrees (about pos / z-axis).
rmin: minor radius (Torus/Helix).
rmaj: major radius (Torus/Helix; overrides r for those kinds).
semiaxes: Ellipsoid semi-axes [a,b,c] (overrides r).
turns: Helix number of turns.
points: Hexahedron 3x8 / Tetrahedron 3x4 coordinate matrix (rows x,y,z)
or LineSegment endpoints [[x1,y1(,z1)],[x2,y2(,z2)]].
connames: LineSegment coordinate overrides {"coord1": [...], "coord2": [...]}.
properties: extra/override COMSOL properties, e.g. {"base": "center"}.
tag: feature tag (None = automatic, e.g. blk1).
label: display label.
build: build after creation (default true).
geometry: geometry sequence tag (default "geom1").
component: component tag (None = auto).
model: model name/tag (None = current model).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"kind": "<kind>"
},
"name": "geom_primitive"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| h | No | ||
| r | No | ||
| pos | No | ||
| rot | No | ||
| tag | No | ||
| axis | No | ||
| kind | Yes | ||
| rmaj | No | ||
| rmin | No | ||
| size | No | ||
| build | No | ||
| label | No | ||
| model | No | ||
| turns | No | ||
| points | No | ||
| connames | No | ||
| geometry | No | geom1 | |
| semiaxes | No | ||
| component | No | ||
| properties | No |