-
Notifications
You must be signed in to change notification settings - Fork 18
pydim.create_radial_dimension
fabian-flassig edited this page Jul 31, 2026
·
1 revision
Creates a radius, diameter, center or arc-length dimension from three points on an arc.
Similar to the Dimensions -> Radius / Diameter / Center / Arc length functions in the PYTHA user interface. The dimension is anchored to existing part points and follows the parts when they are modified.
pydim.create_radial_dimension(point1, point2, point3 [,options])| Parameter | Type | Description |
|---|---|---|
point1 |
{{x,y,z} [,element]} |
Start of the arc: the coordinate at index 1 and, optionally, a part or group element handle at index 2. The coordinate must coincide with an existing point; reference points take priority over part points (see pydim). |
point2 |
{{x,y,z} [,element]} |
A point on the arc between start and end, same form as point1. |
point3 |
{{x,y,z} [,element]} |
End of the arc, same form as point1. |
options |
{...} |
Optional: a table that may contain the following options: |
options.type |
string |
Dimension type: "radius" (default), "diameter", "center" or "arc_length". |
options.view |
string |
The view in which the dimension is displayed: "xy", "-xy", "xz", "-xz", "yz", "-yz" or "axo" (default "axo"). |
options.angle |
number |
Angular position of the dimension around the arc in degrees, relative to the direction of point2 (default 0). |
options.length |
number |
Length of the dimension line as a factor of the radius: 1 ends exactly on the arc, larger values place arrow and text outside (default 1). |
options.style_file |
path handle |
A dimension style file (as saved from the dimension attributes dialog) loaded as the base style. |
options.style |
{...} |
Individual style settings applied on top; the keys are listed at pydim.create_linear_dimension. |
| Type | Description |
|---|---|
element_handle |
An element handle of type "dimension" for the new dimension — or nil if one of the coordinates does not match a part point or the three points are collinear. |
Radius of a cylinder base circle (three points on the circle at 0°, 90° and 180°):
local cyl = pytha.create_cylinder(350, 150, {1000, 200, 0}, {segments = 24})
pydim.create_radial_dimension(
{{1150, 200, 0}, cyl},
{{1000, 350, 0}, cyl},
{{850, 200, 0}, cyl},
{type = "radius", view = "xy", angle = 45})- The three points must lie on the arc and must not be collinear.
-
"center"marks the center of the circle;options.anglehas no effect on it. - Style values that are not specified are taken from the current default dimension style.
- Dimensions are created in the model, not on plot sheets.
Minimum PYTHA Version: V27
pydim, create_linear_dimension, element handles, Path Handles, delete_element