Coordinates and geometry
Look up Numeric operations for coordinates and geometry, including accepted types, units, and shapes for geometric data.
Numerical computing, models, statistics, and Datasets with Python
Reference frames and ordering
Keep the same axis order and metric units when comparing distances or applying a transform. In polar coordinates, check the origin, quadrant, and angular unit. Preserve the original point indices before permuting a sequence. Mesh operations that take numeric vertices and faces have a different contract from operations on host-owned files and paths.
Operation reference
Jump to an operation
positive_translation
- Access
- Registered in the Python Job
- Arguments
- finite numeric values, optional mode and delta
- Units
- Units follow NUMERIC_API_v1 operation contract
- Result
- mapped values, exact additive constants, bounds and algorithm identity
- Effect
- Resolve an explicit reversible additive positive-axis mapping
- Types
- scalar,vector,matrix
- Declared shape
- same_as_input
- Options
- mode=auto,manual,off;delta=finite_number
- Nonfinite values
- error
- Units rule
- preserve
gxtxt_api_call("NUMERIC_API_v1", "positive_translation", args)Recorded result · positive_translation
Download the example script (ZIP).
Example operands, preview
[
{
"shape": [
4
],
"dtype": "float64",
"values": [
-4.0,
-3.0,
-2.0,
-1.0
]
}
]Result, preview
{
"values": {
"shape": [
4,
1
],
"dtype": "float64",
"values": [
2.842170943040401e-14,
1.0000000000000284,
2.0000000000000284,
3.0000000000000284
]
},
"mode": "auto",
"delta": 4.000000000000028,
"margin": 2.842170943040401e-14,
"original_bounds": {
"shape": [
1,
2
],
"dtype": "float64",
"values": [
-4.0,
-1.0
]
},
"transformed_bounds": {
"shape": [
1,
2
],
"dtype": "float64",
"values": [
2.842170943040401e-14,
3.0000000000000284
]
},
"algorithm": "additive_positive_v1",
"forward": "fit=original+delta",
"inverse": "physical=fit-delta"
}polar_coordinates
- Access
- Registered in the Python Job
- Arguments
- X, Y, optional frame options
- Units
- Units follow NUMERIC_API_v1 operation contract
- Result
- theta, radius, undefined-angle mask and frame
- Effect
- Convert physical coordinates through an explicit polar frame and angular branch
- Types
- vector
- Declared shape
- paired_vectors
- Options
- origin=finite_pair;theta_zero=finite_radians;clockwise=boolean;angle_unit=rad,deg;unwrap_policy=cut,continuous;angle_cut=finite_angle;radius_derivative=cartesian_only_aligned_vector
- Nonfinite values
- error
- Units rule
- explicit_frame
gxtxt_api_call("NUMERIC_API_v1", "polar_coordinates", args)Recorded result · polar_coordinates
Download the example script (ZIP).
Example operands, preview
[
{
"shape": [
4
],
"dtype": "float64",
"values": [
1.0,
2.0,
3.0,
4.0
]
},
{
"shape": [
4
],
"dtype": "float64",
"values": [
1.0,
1.0,
2.0,
2.0
]
}
]Result, preview
{
"theta": {
"shape": [
4,
1
],
"dtype": "float64",
"values": [
0.7853981633974483,
0.4636476090008061,
0.5880026035475675,
0.4636476090008061
]
},
"radius": {
"shape": [
4,
1
],
"dtype": "float64",
"values": [
1.4142135623730951,
2.23606797749979,
3.605551275463989,
4.47213595499958
]
},
"points": {
"shape": [
4,
2
],
"dtype": "float64",
"values": [
0.7853981633974483,
0.4636476090008061,
0.5880026035475675,
0.4636476090008061,
1.4142135623730951,
2.23606797749979,
3.605551275463989,
4.47213595499958
]
},
"angle_undefined": {
"shape": [
4,
1
],
"dtype": "bool",
"values": [
false,
false,
false,
false
]
},
"frame": {
"origin": {
"shape": [
1,
2
],
"dtype": "float64",
"values": [
0.0,
0.0
]
},
"theta_zero": 0.0,
"clockwise": false,
"angle_unit": "rad",
"unwrap_policy": "cut",
"angle_cut": 0.0
},
"period": 6.283185307179586
}cartesian_coordinates
- Access
- Registered in the Python Job
- Arguments
- theta, radius, optional frame options
- Units
- Units follow NUMERIC_API_v1 operation contract
- Result
- physical X/Y and frame
- Effect
- Convert physical coordinates through an explicit polar frame and angular branch
- Types
- vector
- Declared shape
- paired_vectors
- Options
- origin=finite_pair;theta_zero=finite_radians;clockwise=boolean;angle_unit=rad,deg;unwrap_policy=cut,continuous;angle_cut=finite_angle;radius_derivative=cartesian_only_aligned_vector
- Nonfinite values
- error
- Units rule
- explicit_frame
gxtxt_api_call("NUMERIC_API_v1", "cartesian_coordinates", args)Recorded result · cartesian_coordinates
Download the example script (ZIP).
Example operands, preview
[
{
"shape": [
4
],
"dtype": "float64",
"values": [
1.0,
2.0,
3.0,
4.0
]
},
{
"shape": [
4
],
"dtype": "float64",
"values": [
1.0,
1.0,
2.0,
2.0
]
}
]Result, preview
{
"x": {
"shape": [
4,
1
],
"dtype": "float64",
"values": [
0.5403023058681398,
-0.4161468365471424,
-1.9799849932008908,
-1.3072872417272239
]
},
"y": {
"shape": [
4,
1
],
"dtype": "float64",
"values": [
0.8414709848078965,
0.9092974268256817,
0.2822400161197344,
-1.5136049906158564
]
},
"points": {
"shape": [
4,
2
],
"dtype": "float64",
"values": [
0.5403023058681398,
-0.4161468365471424,
-1.9799849932008908,
-1.3072872417272239,
0.8414709848078965,
0.9092974268256817,
0.2822400161197344,
-1.5136049906158564
]
},
"frame": {
"origin": {
"shape": [
1,
2
],
"dtype": "float64",
"values": [
0.0,
0.0
]
},
"theta_zero": 0.0,
"clockwise": false,
"angle_unit": "rad",
"unwrap_policy": "cut",
"angle_cut": 0.0
}
}curve_model_project
- Access
- Registered in the Python Job
- Arguments
- model state, X, Y
- Units
- Units follow NUMERIC_API_v1 operation contract
- Result
- projected points, parameters and distances
- Effect
- Project paired points to the nearest arc or Bezier location
- Types
- struct,vector
- Declared shape
- paired_vectors
- Nonfinite values
- error
- Units rule
- caller_owned
gxtxt_api_call("NUMERIC_API_v1", "curve_model_project", args)Recorded result · curve_model_project
Download the example script (ZIP).
Example operands, preview
[
{
"model": "parametric_polynomial",
"parametric": true,
"topology": "open",
"requested_topology": "auto",
"parameterization": "row_order",
"parameter_start": 0.0,
"parameter_end": 1.0,
"closure_tolerance": 2.5495097567963926e-08,
"source_endpoint_distance": 25.495097567963924,
"repeated_endpoint_removed": false,
"source_count": 6.0,
"parameters": {
"shape": [
6,
1
],
"dtype": "float64",
"values": [
-8.941051885355887e-16,
5.0,
0.0,
24.999999999999954,
4.973799150320701e-14,
-1.0658141036401503e-14
]
},
"coefficients": {
"shape": [
3,
2
],
"dtype": "float64",
"values": [
-8.941051885355887e-16,
5.0,
0.0,
24.999999999999954,
4.973799150320701e-14,
-1.0658141036401503e-14
]
},
"degree": 2.0
},
[
1.5,
3.0
],
[
2.5,
8.0
]
]Result, preview
{
"x": {
"shape": [
2,
1
],
"dtype": "float64",
"values": [
1.5737151168488772,
2.833612467041376
]
},
"y": {
"shape": [
2,
1
],
"dtype": "float64",
"values": [
2.476579268998676,
8.02935961337232
]
},
"parameter": {
"shape": [
2,
1
],
"dtype": "float64",
"values": [
0.31474302336977544,
0.5667224934082753
]
},
"distance": {
"shape": [
2,
1
],
"dtype": "float64",
"values": [
0.07734629333510434,
0.16895797708729035
]
},
"points": {
"shape": [
2,
2
],
"dtype": "float64",
"values": [
1.5737151168488772,
2.833612467041376,
2.476579268998676,
8.02935961337232
]
},
"projection_search": "exact_stationary_roots_with_control_hull_pruning"
}curve_model_residual
- Access
- Registered in the Python Job
- Arguments
- model state, X, Y
- Units
- Units follow NUMERIC_API_v1 operation contract
- Result
- projected points, signed distances and geometric metrics
- Effect
- Signed geometric projection distance and complete XY dispersion residual metrics
- Types
- struct,vector
- Declared shape
- paired_vectors
- Nonfinite values
- error
- Units rule
- caller_owned
gxtxt_api_call("NUMERIC_API_v1", "curve_model_residual", args)Recorded result · curve_model_residual
Download the example script (ZIP).
Example operands, preview
[
{
"model": "parametric_polynomial",
"parametric": true,
"topology": "open",
"requested_topology": "auto",
"parameterization": "row_order",
"parameter_start": 0.0,
"parameter_end": 1.0,
"closure_tolerance": 2.5495097567963926e-08,
"source_endpoint_distance": 25.495097567963924,
"repeated_endpoint_removed": false,
"source_count": 6.0,
"parameters": {
"shape": [
6,
1
],
"dtype": "float64",
"values": [
-8.941051885355887e-16,
5.0,
0.0,
24.999999999999954,
4.973799150320701e-14,
-1.0658141036401503e-14
]
},
"coefficients": {
"shape": [
3,
2
],
"dtype": "float64",
"values": [
-8.941051885355887e-16,
5.0,
0.0,
24.999999999999954,
4.973799150320701e-14,
-1.0658141036401503e-14
]
},
"degree": 2.0
},
{
"shape": [
6
],
"dtype": "float64",
"values": [
0.0,
1.0,
2.0,
3.0,
4.0,
5.0
]
},
{
"shape": [
6
],
"dtype": "float64",
"values": [
0.0,
1.0,
4.0,
9.0,
16.0,
25.0
]
}
]Result, preview
{
"x": {
"shape": [
6,
1
],
"dtype": "float64",
"values": [
0.0,
1.0000000000000016,
1.9999999999999991,
3.000000000000001,
3.999999999999996,
4.999999999999999
]
},
"y": {
"shape": [
6,
1
],
"dtype": "float64",
"values": [
-1.0658141036401503e-14,
1.0000000000000007,
3.9999999999999982,
9.000000000000012,
15.999999999999973,
24.999999999999993
]
},
"parameter": {
"shape": [
6,
1
],
"dtype": "float64",
"values": [
0.0,
0.20000000000000032,
0.3999999999999998,
0.6000000000000003,
0.7999999999999994,
1.0
]
},
"distance": {
"shape": [
6,
1
],
"dtype": "float64",
"values": [
1.0658141036401503e-14,
1.6910413304902302e-15,
1.9860273225978185e-15,
1.246617817651181e-14,
2.694344536301243e-14,
7.160723346098895e-15
]
},
"signed_residual": {
"shape": [
6,
1
],
"dtype": "float64",
"values": [
1.0658141036401503e-14,
1.6910413304902302e-15,
-1.9860273225978185e-15,
-1.246617817651181e-14,
-2.694344536301243e-14,
-7.160723346098895e-15
]
},
"n": 6.0,
"sse": 1.0530307008568981e-27,
"rmse": 1.3247834419613004e-14,
"mae": 1.0150926095852114e-14,
"max_abs_error": 2.694344536301243e-14,
"r2": 1.0,
"residual_convention": "geometric_distance_signed_left_of_oriented_tangent",
"zero_normal_sign_policy": "unsigned_distance_at_zero_cross_product",
"r2_convention": "one_minus_squared_projection_distance_over_xy_centroid_dispersion"
}point_sequence_order
- Access
- Listed in the service catalog. Check the selector and whether the call matches or is rejected.
- Arguments
- points
- Shape
- Nx2_or_Nx3_2_to_4096
- Units
- caller_owned_metric
- Result
- permutation_and_exact_points
- Effect
- Propose a deterministic bijective processing sequence with explicit ambiguity diagnostics
- Types
- matrix
- Declared shape
- Nx2_or_Nx3_2_to_4096
- Options
- policy=x_monotone,geometry_auto;start_index=nonnegative_integer
- Nonfinite values
- error
- Units rule
- caller_owned_metric
gxtxt_api_call("NUMERIC_API_v1", "callOperation", ["point_sequence_order", operands])Recorded result · call:point_sequence_order
Download the example script (ZIP).
Example operands, preview
[
"point_sequence_order",
[
{
"kind": "array",
"shape": [
3,
2
],
"real": [
2.0,
0.0,
1.0,
0.0,
0.0,
1.0
]
}
],
{
"kind": "struct",
"fields": {
"policy": {
"kind": "text",
"value": "x_monotone"
}
}
}
]Result, preview
{
"permutation": {
"shape": [
3,
1
],
"dtype": "float64",
"values": [
1.0,
2.0,
0.0
]
},
"inverse_permutation": {
"shape": [
3,
1
],
"dtype": "float64",
"values": [
2.0,
0.0,
1.0
]
},
"points": {
"shape": [
3,
2
],
"dtype": "float64",
"values": [
0.0,
1.0,
2.0,
0.0,
1.0,
0.0
]
},
"policy": "x_monotone",
"algorithm": "stable_x_or_greedy_nearest_v2",
"changed_count": 3.0,
"closed_endpoint_preserved": false,
"start_index": 0.0,
"distance_scale": 1.0,
"segment_starts": 0.0,
"ambiguous_positions": {
"shape": [
0,
0
],
"dtype": "float64",
"values": []
},
"warnings": [],
"review_required": false
}