-
Notifications
You must be signed in to change notification settings - Fork 18
pydim.create_perpendicular_dimension
fabian-flassig edited this page Jul 31, 2026
·
1 revision
Creates a perpendicular dimension from a part point onto a part edge.
Similar to the Dimensions -> Perpendicular function in the PYTHA user interface.
pydim.create_perpendicular_dimension(point, edge_point1, edge_point2 [,options])| Parameter | Type | Description |
|---|---|---|
point |
{{x,y,z} [,element]} |
The point the perpendicular starts from: 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). |
edge_point1 |
{{x,y,z} [,part]} |
First end of the edge the perpendicular is dropped onto. The two edge coordinates are resolved to an existing part edge; an edge always lies completely within one part. |
edge_point2 |
{{x,y,z} [,part]} |
Second end of the edge. If both edge points carry a part handle, it must be the same part. |
options |
{...} |
Optional: a table that may contain the following options: |
options.view |
string |
The view in which the dimension is displayed: "xy", "-xy", "xz", "-xz", "yz", "-yz" or "axo" (default "axo"). |
options.style_file |
path handle |
A dimension style file used as base style, see pydim.create_linear_dimension. |
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 the point or the edge is not found or the perpendicular has length 0. |
Perpendicular from the tip of a triangular plate onto its base edge:
local tri = pytha.create_polygon({{2100, 0, 0}, {2600, 0, 0}, {2600, 300, 0}})
pydim.create_perpendicular_dimension(
{{2600, 300, 0}, tri},
{{2100, 0, 0}, tri}, {{2600, 0, 0}, tri},
{view = "xy"})- The position of the dimension is determined by the foot of the perpendicular; there is no
distanceoption. - Dimensions are created in the model, not on plot sheets.
Minimum PYTHA Version: V27
pydim, element handles, create_linear_dimension, create_angular_dimension