API Reference
Sketch (High-Level)
- class planegcs.Sketch
A 2D constraint sketch.
Provides a convenient Pythonic API on top of
SketchSolver. Geometry is added withadd_*methods which return typed IDs. Constraints are added with descriptive methods. Callsolve()to find a configuration satisfying all constraints.Example:
s = Sketch() p1 = s.add_fixed_point(0, 0) p2 = s.add_point(5, 0) p3 = s.add_point(2.5, 4) l1 = s.add_line(p1, p2) l2 = s.add_line(p2, p3) l3 = s.add_line(p3, p1) s.equal_length(l1, l2) s.equal_length(l2, l3) s.horizontal(l1) s.set_p2p_distance(p1, p2, 5.0) status = s.solve() assert status == SolveStatus.Success
- property solver: SketchSolver
Access the underlying
SketchSolver.
- property constraints: dict[ConstraintTag, ConstraintInfo]
All constraints registered in this sketch, keyed by tag.
This is a read-only view of the constraint metadata recorded when constraints are added via the
SketchAPI.
- get_constraint_info(tag: ConstraintTag) ConstraintInfo | None
Look up constraint metadata by tag.
Returns
Noneif the tag is not found (e.g. internal constraints created by the solver itself).
- get_entity(entity_id: int) EntityInfo | None
Look up an entity by its numeric ID.
Returns an
EntityInfowith the entity’s type and current solver value, orNoneif the ID is not recognised (e.g. an internal solver ID that was never registered via the Sketch API).This is the primary way to understand the opaque integer IDs that appear in
ConstraintInfo.entities.Example:
line = sketch.add_line(p1, p2) info = sketch.get_entity(line) assert info.type == "line" assert isinstance(info.value, LineInfo)
- add_param(value: float = 0.0, *, fixed: bool = False) ParamId
Allocate a standalone parameter.
By default the parameter is free — the solver may change it. For driving-constraint values that the solver should not touch, use
add_fixed_param()or passfixed=True.- Parameters:
value – Initial value.
fixed – If True, the solver treats this as a constant. Defaults to False (free unknown).
- Returns:
Parameter ID.
- add_fixed_param(value: float) ParamId
Allocate a fixed parameter with the given value.
This is a convenience shorthand for
add_param(value, fixed=True).- Parameters:
value – The fixed value for the parameter.
- Returns:
Parameter ID.
- add_point_from_params(px_id: ParamId, py_id: ParamId) PointId
Add a point from existing parameter IDs for x and y.
Unlike
add_point(), which creates fresh parameters internally, this lets you supply parameters you already control — useful when you need to apply parameter-level constraints (e.g.difference(),equal()) to the coordinates, or when you want to share a parameter between multiple points.
- get_point(point_id: PointId) PointInfo
Get current (x, y) of a point.
- get_point_param_ids(point_id: PointId) tuple[ParamId, ParamId]
Get the (x_param_id, y_param_id) for a point.
Useful when you need to apply parameter-level constraints (e.g.
difference(),equal(),proportional()) to individual coordinates of a point.
- add_fixed_point(x: float, y: float, *, driving: bool = True) PointId
Add a point and fix it at (x, y) in one step.
This is a convenience method equivalent to calling
add_point()followed byfix_point().- Parameters:
x – X coordinate.
y – Y coordinate.
driving – Whether the fix constraints are driving.
- Returns:
Point ID.
- add_line(p1_id: PointId, p2_id: PointId) LineId
Add a line between two existing points. Returns line ID.
- add_line_xy(x1: float, y1: float, x2: float, y2: float) LineId
Add a line with endpoint coordinates. Returns line ID.
- get_line(line_id: LineId) LineInfo
Get all properties of a line.
Returns a
LineInfodataclass withp1andp2fields.
- add_circle(center_id: PointId, radius_id: ParamId) CircleId
Add a circle. Returns circle ID.
- get_circle(circle_id: CircleId) CircleInfo
Get all properties of a circle.
Returns a
CircleInfodataclass withcenterandradiusfields.
- add_arc(center_id: PointId, start_id: PointId, end_id: PointId, radius_id: ParamId, start_angle_id: ParamId, end_angle_id: ParamId) ArcId
Add an arc from explicit points and angle/radius parameters.
The caller supplies all six components that define an arc: three points (center, start, end) and three scalar parameters (radius, start angle, end angle).
Angle convention: angles are in radians, measured counterclockwise (CCW) from the positive x-axis. The arc traces from start_angle to end_angle:
end_angle > start_angle→ CCW arc.end_angle < start_angle→ CW arc.
Arc rules are added automatically so that start and end points satisfy
point = center + radius * (cos θ, sin θ). The radius should be positive.No hidden geometry or parameters are created.
Note
FreeCAD always uses CCW arcs (
end_angle >= start_angle). If you are reproducing a FreeCAD sketch, keepend_angle >= start_angle.- Parameters:
center_id – Center point of the arc.
start_id – Start point of the arc (at start_angle).
end_id – End point of the arc (at end_angle).
radius_id – Parameter for the radius (should be positive).
start_angle_id – Parameter for the start angle (radians, CCW from +x).
end_angle_id – Parameter for the end angle (radians, CCW from +x).
- Returns:
Arc ID.
- add_arc_cse(center_id: PointId, start_id: PointId, end_id: PointId, radius: float, start_angle: float, end_angle: float) ArcId
Add an arc from points and initial scalar values.
Like
add_arc(), but creates the radius and angle parameters automatically. Center, start, and end must be existing points (created byadd_point()).“CSE” stands for Center–Start–End.
Angle convention: angles are in radians, measured counterclockwise (CCW) from the positive x-axis. A positive sweep (
end_angle > start_angle) gives a CCW arc; a negative sweep gives a CW arc. SeeArcInfofor details.- Parameters:
center_id – Center point of the arc.
start_id – Start point of the arc.
end_id – End point of the arc.
radius – Initial radius value (should be positive).
start_angle – Initial start angle (radians, CCW from +x).
end_angle – Initial end angle (radians, CCW from +x).
- Returns:
Arc ID.
- add_arc3p(center: tuple[float, float], radius: float, start_angle: float, end_angle: float) ArcId
Add a fully self-contained arc from center coords and angles.
Creates center, start, and end points plus radius/angle parameters internally. Start and end point coordinates are computed from the parametric equation
center + radius * (cos θ, sin θ).Useful for quick prototyping when you don’t need direct access to the individual points or parameters.
Angle convention: angles are in radians, measured counterclockwise (CCW) from the positive x-axis. A positive sweep (
end_angle > start_angle) gives a CCW arc; a negative sweep gives a CW arc. SeeArcInfofor details.- Parameters:
center –
(x, y)of the arc center.radius – Arc radius (should be positive).
start_angle – Start angle in radians (CCW from +x).
end_angle – End angle in radians (CCW from +x).
- Returns:
Arc ID.
- get_arc(arc_id: ArcId) ArcInfo
Get all properties of an arc.
Returns an
ArcInfodataclass withcenter,radius,start_angle,end_angle,start_point, andend_pointfields.
- add_ellipse(center_id: PointId, focus1_id: PointId, radmin: float) EllipseId
Add an ellipse. Returns ellipse ID.
- get_ellipse(ellipse_id: EllipseId) EllipseInfo
Get all properties of an ellipse.
Returns an
EllipseInfodataclass withcenter,focus1, andradminfields.
- add_arc_of_ellipse(center_id: PointId, focus1_id: PointId, radmin: float, start_angle: float, end_angle: float, start_id: PointId, end_id: PointId) ArcOfEllipseId
Add an arc of ellipse.
The arc is defined by an ellipse (center, focus, semi-minor radius) and angular parameters. Start/end points must be provided and are constrained to the ellipse parametric curve via arc-of-ellipse rules (added automatically).
- Parameters:
center_id – Ellipse center point.
focus1_id – First focus point.
radmin – Semi-minor axis radius.
start_angle – Start angle in radians.
end_angle – End angle in radians.
start_id – Start point of the arc.
end_id – End point of the arc.
- Returns:
ArcOfEllipseId.
- get_arc_of_ellipse(aoe_id: ArcOfEllipseId) ArcOfEllipseInfo
Get all properties of an arc of ellipse.
- add_hyperbola(center_id: PointId, focus1_id: PointId, radmin: float) HyperbolaId
Add a hyperbola.
Defined by center, first focus, and semi-minor axis radius. The major radius is derived:
radmaj = sqrt(dist(center, focus1)² - radmin²).
- get_hyperbola(hyperbola_id: HyperbolaId) HyperbolaInfo
Get all properties of a hyperbola.
- add_arc_of_hyperbola(center_id: PointId, focus1_id: PointId, radmin: float, start_angle: float, end_angle: float, start_id: PointId, end_id: PointId) ArcOfHyperbolaId
Add an arc of hyperbola.
Start/end points are constrained to the hyperbola parametric curve via arc-of-hyperbola rules (added automatically).
- get_arc_of_hyperbola(ahid: ArcOfHyperbolaId) ArcOfHyperbolaInfo
Get all properties of an arc of hyperbola.
- add_parabola(vertex_id: PointId, focus1_id: PointId) ParabolaId
Add a parabola.
Defined by vertex and focus. The focal length is
dist(vertex, focus).
- get_parabola(parabola_id: ParabolaId) ParabolaInfo
Get all properties of a parabola.
- add_arc_of_parabola(vertex_id: PointId, focus1_id: PointId, start_angle: float, end_angle: float, start_id: PointId, end_id: PointId) ArcOfParabolaId
Add an arc of parabola.
Start/end points are constrained to the parabola parametric curve via arc-of-parabola rules (added automatically).
- get_arc_of_parabola(apid: ArcOfParabolaId) ArcOfParabolaInfo
Get all properties of an arc of parabola.
- add_bspline(start_id: PointId, end_id: PointId, pole_ids: list[PointId], weight_ids: list[ParamId], knot_ids: list[ParamId], mult: list[int], degree: int, periodic: bool = False) BSplineId
Add a B-spline curve.
- Parameters:
start_id – Start point of the spline.
end_id – End point of the spline.
pole_ids – Control point IDs (as
PointId).weight_ids – Weight parameter IDs (one per pole).
knot_ids – Knot parameter IDs.
mult – Multiplicity vector (one per knot).
degree – Spline degree.
periodic – Whether the spline is periodic.
- Returns:
BSplineId.
- get_bspline(bspline_id: BSplineId) BSplineInfo
Get all properties of a B-spline.
- coincident(pt1_id: PointId, pt2_id: PointId, *, driving: bool = True) ConstraintTag
Make two points coincident. Returns constraint tag.
- coordinate_x(pt_id: PointId, x_id: ParamId, *, driving: bool = True) ConstraintTag
Fix the X coordinate of a point to a parameter value.
- coordinate_y(pt_id: PointId, y_id: ParamId, *, driving: bool = True) ConstraintTag
Fix the Y coordinate of a point to a parameter value.
- fix_point(pt_id: PointId, x: float, y: float, *, driving: bool = True) tuple[ConstraintTag, ConstraintTag]
Fix a point to (x, y). Returns (tag_x, tag_y).
Convenience method that creates parameters internally and calls
coordinate_x()andcoordinate_y().
- horizontal(line_id: LineId, *, driving: bool = True) ConstraintTag
Constrain a line to be horizontal.
- horizontal_points(p1_id: PointId, p2_id: PointId, *, driving: bool = True) ConstraintTag
Constrain two points to be at the same Y.
- vertical_points(p1_id: PointId, p2_id: PointId, *, driving: bool = True) ConstraintTag
Constrain two points to be at the same X.
- p2p_distance(pt1_id: PointId, pt2_id: PointId, distance_id: ParamId, *, driving: bool = True) ConstraintTag
Constrain point-to-point distance using a parameter.
For a simpler API that takes a float directly, see
set_p2p_distance().
- set_p2p_distance(pt1_id: PointId, pt2_id: PointId, distance: float, *, driving: bool = True) ConstraintTag
Constrain point-to-point distance to a value.
Convenience method that creates the parameter internally. To use an explicit parameter (e.g. to read back the solved value or share it between constraints), use
p2p_distance()withadd_param().
- p2p_angle(pt1_id: PointId, pt2_id: PointId, angle_id: ParamId, *, driving: bool = True) ConstraintTag
Constrain the angle of the line from pt1 to pt2.
For a simpler API that takes a float directly, see
set_p2p_angle().
- set_p2p_angle(pt1_id: PointId, pt2_id: PointId, angle: float, *, driving: bool = True) ConstraintTag
Constrain the angle of the line from pt1 to pt2 to a value (radians).
Convenience method that creates the parameter internally. To use an explicit parameter, use
p2p_angle()withadd_param().
- p2l_distance(pt_id: PointId, line_id: LineId, distance_id: ParamId, *, driving: bool = True) ConstraintTag
Constrain point-to-line distance using a parameter.
For a simpler API that takes a float directly, see
set_p2l_distance().
- set_p2l_distance(pt_id: PointId, line_id: LineId, distance: float, *, driving: bool = True) ConstraintTag
Constrain point-to-line distance to a value.
Convenience method that creates the parameter internally. To use an explicit parameter, use
p2l_distance()withadd_param().
- point_on_line(pt_id: PointId, line_id: LineId, *, driving: bool = True) ConstraintTag
Constrain point on line.
- point_on_perp_bisector(pt_id: PointId, line_id: LineId, *, driving: bool = True) ConstraintTag
Constrain point to lie on the perpendicular bisector of a line.
- parallel(l1_id: LineId, l2_id: LineId, *, driving: bool = True) ConstraintTag
Constrain lines to be parallel.
- perpendicular(l1_id: LineId, l2_id: LineId, *, driving: bool = True) ConstraintTag
Constrain lines to be perpendicular.
- equal_length(l1_id: LineId, l2_id: LineId, *, driving: bool = True) ConstraintTag
Constrain two lines to equal length.
- equal(param1_id: ParamId, param2_id: ParamId, *, driving: bool = True) ConstraintTag
Constrain two parameters to be equal.
- equal_radius_cc(c1_id: CircleId, c2_id: CircleId, *, driving: bool = True) ConstraintTag
Constrain two circles to have equal radius.
- equal_radius_ca(circle_id: CircleId, arc_id: ArcId, *, driving: bool = True) ConstraintTag
Constrain a circle and an arc to have equal radius.
- equal_radius_aa(a1_id: ArcId, a2_id: ArcId, *, driving: bool = True) ConstraintTag
Constrain two arcs to have equal radius.
- equal_radii_ee(e1_id: EllipseId, e2_id: EllipseId, *, driving: bool = True) ConstraintTag
Constrain two ellipses to have equal major radii.
- equal_radii_hh(h1_id: ArcOfHyperbolaId, h2_id: ArcOfHyperbolaId, *, driving: bool = True) ConstraintTag
Constrain two arcs of hyperbola to have equal major radii.
- equal_focus_pp(p1_id: ArcOfParabolaId, p2_id: ArcOfParabolaId, *, driving: bool = True) ConstraintTag
Constrain two arcs of parabola to have equal focal distance.
- l2l_angle(l1_id: LineId, l2_id: LineId, angle_id: ParamId, *, driving: bool = True) ConstraintTag
Constrain angle between two lines using a parameter.
For a simpler API that takes a float directly, see
set_l2l_angle().
- set_l2l_angle(l1_id: LineId, l2_id: LineId, angle: float, *, driving: bool = True) ConstraintTag
Constrain angle between two lines to a value (in radians).
Convenience method that creates the parameter internally. To use an explicit parameter, use
l2l_angle()withadd_param().
- point_on_circle(pt_id: PointId, circle_id: CircleId, *, driving: bool = True) ConstraintTag
Constrain point on circle.
- point_on_arc(pt_id: PointId, arc_id: ArcId, *, driving: bool = True) ConstraintTag
Constrain point to lie on arc.
- point_on_ellipse(pt_id: PointId, ellipse_id: EllipseId, *, driving: bool = True) ConstraintTag
Constrain point to lie on ellipse.
- point_on_hyperbolic_arc(pt_id: PointId, arc_id: ArcOfHyperbolaId, *, driving: bool = True) ConstraintTag
Constrain point to lie on an arc of hyperbola.
- point_on_parabolic_arc(pt_id: PointId, arc_id: ArcOfParabolaId, *, driving: bool = True) ConstraintTag
Constrain point to lie on an arc of parabola.
- point_on_bspline(pt_id: PointId, bspline_id: BSplineId, u_id: ParamId, *, driving: bool = True) ConstraintTag
Constrain point to lie on a B-spline at parameter u.
- circle_radius(circle_id: CircleId, radius_id: ParamId, *, driving: bool = True) ConstraintTag
Constrain circle radius using a parameter.
For a simpler API that takes a float directly, see
set_circle_radius().
- set_circle_radius(circle_id: CircleId, radius: float, *, driving: bool = True) ConstraintTag
Constrain circle radius to a value.
Convenience method that creates the parameter internally. To use an explicit parameter, use
circle_radius()withadd_param().
- circle_diameter(circle_id: CircleId, diameter_id: ParamId, *, driving: bool = True) ConstraintTag
Constrain circle diameter using a parameter.
For a simpler API that takes a float directly, see
set_circle_diameter().
- set_circle_diameter(circle_id: CircleId, diameter: float, *, driving: bool = True) ConstraintTag
Constrain circle diameter to a value.
Convenience method that creates the parameter internally.
- arc_radius(arc_id: ArcId, radius_id: ParamId, *, driving: bool = True) ConstraintTag
Constrain arc radius using a parameter.
For a simpler API that takes a float directly, see
set_arc_radius().
- set_arc_radius(arc_id: ArcId, radius: float, *, driving: bool = True) ConstraintTag
Constrain arc radius to a value.
Convenience method that creates the parameter internally.
- arc_diameter(arc_id: ArcId, diameter_id: ParamId, *, driving: bool = True) ConstraintTag
Constrain arc diameter using a parameter.
For a simpler API that takes a float directly, see
set_arc_diameter().
- set_arc_diameter(arc_id: ArcId, diameter: float, *, driving: bool = True) ConstraintTag
Constrain arc diameter to a value.
Convenience method that creates the parameter internally.
- arc_angle(arc_id: ArcId, angle_id: ParamId, *, driving: bool = True) ConstraintTag
Constrain the angular sweep of an arc using a parameter.
The sweep is
end_angle - start_angle: positive for CCW arcs, negative for CW arcs. Internally this uses an L2LAngle (line-to-line angle) constraint on the two radii of the arc, the same approach FreeCAD’s Sketcher uses.For a simpler API that takes a float directly, see
set_arc_angle().
- set_arc_angle(arc_id: ArcId, angle: float, *, driving: bool = True) ConstraintTag
Constrain the angular sweep of an arc to a value (in radians).
Positive values constrain a CCW sweep, negative values a CW sweep.
Convenience method that creates the parameter internally. To use an explicit parameter (e.g. to read back the solved value or share it between constraints), use
arc_angle()withadd_param().
- tangent_line_circle(line_id: LineId, circle_id: CircleId, *, driving: bool = True) ConstraintTag
Line tangent to circle.
- tangent_circle_circle(c1_id: CircleId, c2_id: CircleId, *, driving: bool = True) ConstraintTag
Circle tangent to circle.
- tangent_line_arc(line_id: LineId, arc_id: ArcId, *, driving: bool = True) ConstraintTag
Line tangent to arc.
- tangent_line_ellipse(line_id: LineId, ellipse_id: EllipseId, *, driving: bool = True) ConstraintTag
Line tangent to ellipse.
- tangent_arc_arc(a1_id: ArcId, a2_id: ArcId, *, driving: bool = True) ConstraintTag
Arc tangent to arc.
- tangent_circle_arc(circle_id: CircleId, arc_id: ArcId, *, driving: bool = True) ConstraintTag
Circle tangent to arc.
- tangent_circumf(p1_id: PointId, p2_id: PointId, rd1_id: ParamId, rd2_id: ParamId, *, internal: bool = False, driving: bool = True) ConstraintTag
Tangent circumference constraint.
- symmetric_line(p1_id: PointId, p2_id: PointId, line_id: LineId, *, driving: bool = True) ConstraintTag
Constrain points symmetric about a line.
- symmetric_point(p1_id: PointId, p2_id: PointId, center_id: PointId, *, driving: bool = True) ConstraintTag
Constrain points symmetric about a center point.
- p2c_distance(pt_id: PointId, circle_id: CircleId, distance_id: ParamId, *, driving: bool = True) ConstraintTag
Constrain point-to-circle distance using a parameter.
For a simpler API that takes a float directly, see
set_p2c_distance().
- set_p2c_distance(pt_id: PointId, circle_id: CircleId, distance: float, *, driving: bool = True) ConstraintTag
Constrain point-to-circle distance to a value.
Convenience method that creates the parameter internally.
- c2c_distance(c1_id: CircleId, c2_id: CircleId, dist_id: ParamId, *, driving: bool = True) ConstraintTag
Constrain circle-to-circle distance using a parameter.
For a simpler API that takes a float directly, see
set_c2c_distance().
- set_c2c_distance(c1_id: CircleId, c2_id: CircleId, distance: float, *, driving: bool = True) ConstraintTag
Constrain circle-to-circle distance to a value.
Convenience method that creates the parameter internally.
- c2l_distance(circle_id: CircleId, line_id: LineId, dist_id: ParamId, *, driving: bool = True) ConstraintTag
Constrain circle-to-line distance using a parameter.
For a simpler API that takes a float directly, see
set_c2l_distance().
- set_c2l_distance(circle_id: CircleId, line_id: LineId, distance: float, *, driving: bool = True) ConstraintTag
Constrain circle-to-line distance to a value.
Convenience method that creates the parameter internally.
- p2a_distance(pt_id: PointId, arc_id: ArcId, distance_id: ParamId, *, driving: bool = True) ConstraintTag
Constrain point-to-arc distance using a parameter.
This measures the shortest distance from the point to the arc’s underlying circle (center and radius). It is the arc analogue of
p2c_distance().For a simpler API that takes a float directly, see
set_p2a_distance().
- set_p2a_distance(pt_id: PointId, arc_id: ArcId, distance: float, *, driving: bool = True) ConstraintTag
Constrain point-to-arc distance to a value.
Convenience method that creates the parameter internally.
- a2l_distance(arc_id: ArcId, line_id: LineId, dist_id: ParamId, *, driving: bool = True) ConstraintTag
Constrain arc-to-line distance using a parameter.
This measures the distance between the arc’s underlying circle and the line. It is the arc analogue of
c2l_distance().For a simpler API that takes a float directly, see
set_a2l_distance().
- set_a2l_distance(arc_id: ArcId, line_id: LineId, distance: float, *, driving: bool = True) ConstraintTag
Constrain arc-to-line distance to a value.
Convenience method that creates the parameter internally.
- c2a_distance(circle_id: CircleId, arc_id: ArcId, dist_id: ParamId, *, driving: bool = True) ConstraintTag
Constrain circle-to-arc distance using a parameter.
Measures the distance between the outer edges of the circle and the arc’s underlying circle. It is the arc analogue of
c2c_distance().For a simpler API that takes a float directly, see
set_c2a_distance().
- set_c2a_distance(circle_id: CircleId, arc_id: ArcId, distance: float, *, driving: bool = True) ConstraintTag
Constrain circle-to-arc distance to a value.
Convenience method that creates the parameter internally.
- a2a_distance(a1_id: ArcId, a2_id: ArcId, dist_id: ParamId, *, driving: bool = True) ConstraintTag
Constrain arc-to-arc distance using a parameter.
Measures the distance between the outer edges of the two arcs’ underlying circles. It is the arc analogue of
c2c_distance().For a simpler API that takes a float directly, see
set_a2a_distance().
- set_a2a_distance(a1_id: ArcId, a2_id: ArcId, distance: float, *, driving: bool = True) ConstraintTag
Constrain arc-to-arc distance to a value.
Convenience method that creates the parameter internally.
- arc_length(arc_id: ArcId, length_id: ParamId, *, driving: bool = True) ConstraintTag
Constrain arc length using a parameter.
For a simpler API that takes a float directly, see
set_arc_length().
- set_arc_length(arc_id: ArcId, length: float, *, driving: bool = True) ConstraintTag
Constrain arc length to a value.
Convenience method that creates the parameter internally.
- arc_rules(arc_id: ArcId, *, driving: bool = True) ConstraintTag
Add arc rules (start/end points tied to center, radius, angles).
Arc rules constrain the start and end points to satisfy:
start = center + radius * (cos(start_angle), sin(start_angle)) end = center + radius * (cos(end_angle), sin(end_angle))
These are added automatically by
add_arc(), so you normally do not need to call this directly.
- proportional(param1_id: ParamId, param2_id: ParamId, ratio: float, *, driving: bool = True) ConstraintTag
Constrain param1 = ratio * param2.
- difference(param1_id: ParamId, param2_id: ParamId, diff_id: ParamId, *, driving: bool = True) ConstraintTag
Constrain param2 - param1 = diff.
All three arguments are parameter IDs (from
add_param()). Useget_point_param_ids()to obtain the x/y parameter IDs for a point.
- internal_alignment_point2ellipse(ellipse_id: EllipseId, pt_id: PointId, alignment_type: InternalAlignmentType, *, driving: bool = True) ConstraintTag
Internal alignment: constrain a point relative to an ellipse.
The alignment_type specifies which feature of the ellipse the point is aligned to (e.g. major axis endpoint, focus, etc.).
- internal_alignment_ellipse_major_diameter(ellipse_id: EllipseId, p1_id: PointId, p2_id: PointId, *, driving: bool = True) ConstraintTag
Internal alignment: tie line endpoints to ellipse major diameter.
- internal_alignment_ellipse_minor_diameter(ellipse_id: EllipseId, p1_id: PointId, p2_id: PointId, *, driving: bool = True) ConstraintTag
Internal alignment: tie line endpoints to ellipse minor diameter.
- internal_alignment_ellipse_focus1(ellipse_id: EllipseId, pt_id: PointId, *, driving: bool = True) ConstraintTag
Internal alignment: constrain point to ellipse focus 1.
- internal_alignment_ellipse_focus2(ellipse_id: EllipseId, pt_id: PointId, *, driving: bool = True) ConstraintTag
Internal alignment: constrain point to ellipse focus 2.
- internal_alignment_point2hyperbola(hyperbola_id: HyperbolaId, pt_id: PointId, alignment_type: InternalAlignmentType, *, driving: bool = True) ConstraintTag
Internal alignment: constrain a point relative to a hyperbola.
- internal_alignment_hyperbola_major_diameter(hyperbola_id: HyperbolaId, p1_id: PointId, p2_id: PointId, *, driving: bool = True) ConstraintTag
Internal alignment: tie line endpoints to hyperbola major diameter.
- internal_alignment_hyperbola_minor_diameter(hyperbola_id: HyperbolaId, p1_id: PointId, p2_id: PointId, *, driving: bool = True) ConstraintTag
Internal alignment: tie line endpoints to hyperbola minor diameter.
- internal_alignment_hyperbola_focus(hyperbola_id: HyperbolaId, pt_id: PointId, *, driving: bool = True) ConstraintTag
Internal alignment: constrain point to hyperbola focus.
- internal_alignment_parabola_focus(parabola_id: ParabolaId, pt_id: PointId, *, driving: bool = True) ConstraintTag
Internal alignment: constrain point to parabola focus.
- internal_alignment_bspline_control_point(bspline_id: BSplineId, circle_id: CircleId, pole_index: int, *, driving: bool = True) ConstraintTag
Internal alignment: B-spline control point.
Ties a circle (center = pole, radius = weight) to a control point.
- internal_alignment_knot_point(bspline_id: BSplineId, pt_id: PointId, knot_index: int, *, driving: bool = True) ConstraintTag
Internal alignment: constrain point to B-spline knot.
- tangent_at_bspline_knot(bspline_id: BSplineId, line_id: LineId, knot_index: int, *, driving: bool = True) ConstraintTag
Constrain a line to be tangent to a B-spline at a knot.
- midpoint_on_line(l1_id: LineId, l2_id: LineId, *, driving: bool = True) ConstraintTag
Constrain midpoint of l1 to lie on l2.
- angle_via_point(crv1_id: CurveId, crv2_id: CurveId, pt_id: PointId, angle_id: ParamId, *, driving: bool = True) ConstraintTag
Constrain angle between two curves at a shared point.
The angle is measured between the tangent directions of the two curves at the given point. This is the general-purpose angle constraint used by FreeCAD’s Sketcher for curve–curve angles.
- Parameters:
crv1_id – First curve (any geometry ID: line, circle, arc, ellipse, …).
crv2_id – Second curve.
pt_id – Point where the curves meet.
angle_id – Parameter ID for the angle value (radians).
driving – Whether this is a driving constraint.
- Returns:
Constraint tag.
- set_angle_via_point(crv1_id: CurveId, crv2_id: CurveId, pt_id: PointId, angle: float, *, driving: bool = True) ConstraintTag
Constrain angle between two curves at a point to a value (radians).
Convenience method that creates the angle parameter internally.
- angle_via_two_points(crv1_id: CurveId, crv2_id: CurveId, pt1_id: PointId, pt2_id: PointId, angle_id: ParamId, *, driving: bool = True) ConstraintTag
Constrain angle between two curves via two points.
Used when each curve passes through a different point.
- Parameters:
crv1_id – First curve.
crv2_id – Second curve.
pt1_id – Point on the first curve.
pt2_id – Point on the second curve.
angle_id – Parameter ID for the angle value (radians).
driving – Whether this is a driving constraint.
- Returns:
Constraint tag.
- set_angle_via_two_points(crv1_id: CurveId, crv2_id: CurveId, pt1_id: PointId, pt2_id: PointId, angle: float, *, driving: bool = True) ConstraintTag
Constrain angle between two curves via two points to a value (radians).
Convenience method that creates the angle parameter internally.
- angle_via_point_and_param(crv1_id: CurveId, crv2_id: CurveId, pt_id: PointId, cparam_id: ParamId, angle_id: ParamId, *, driving: bool = True) ConstraintTag
Constrain angle between two curves at a point with a curve parameter.
- Parameters:
crv1_id – First curve.
crv2_id – Second curve.
pt_id – Point where the curves meet.
cparam_id – Curve parameter for the second curve.
angle_id – Parameter ID for the angle value (radians).
driving – Whether this is a driving constraint.
- Returns:
Constraint tag.
- angle_via_point_and_two_params(crv1_id: CurveId, crv2_id: CurveId, pt_id: PointId, cparam1_id: ParamId, cparam2_id: ParamId, angle_id: ParamId, *, driving: bool = True) ConstraintTag
Constrain angle between two curves at a point with two curve parameters.
- Parameters:
crv1_id – First curve.
crv2_id – Second curve.
pt_id – Point where the curves meet.
cparam1_id – Curve parameter for the first curve.
cparam2_id – Curve parameter for the second curve.
angle_id – Parameter ID for the angle value (radians).
driving – Whether this is a driving constraint.
- Returns:
Constraint tag.
- curve_value(pt_id: PointId, curve_id: CurveId, u_id: ParamId, *, driving: bool = True) ConstraintTag
Constrain a point to lie on a curve at parameter u.
- Parameters:
pt_id – Point to constrain.
curve_id – Curve the point must lie on.
u_id – Parameter ID for the curve parameter u.
driving – Whether this is a driving constraint.
- Returns:
Constraint tag.
- snells_law(ray1_id: CurveId, ray2_id: CurveId, boundary_id: CurveId, pt_id: PointId, n1_id: ParamId, n2_id: ParamId, *, flipn1: bool = False, flipn2: bool = False, driving: bool = True) ConstraintTag
Add Snell’s law refraction constraint.
Constrains the angles of ray1 and ray2 relative to the boundary curve at point pt to satisfy Snell’s law with refractive indices n1 and n2.
- Parameters:
ray1_id – Incoming ray curve.
ray2_id – Outgoing ray curve.
boundary_id – Boundary curve.
pt_id – Refraction point.
n1_id – Parameter for refractive index of first medium.
n2_id – Parameter for refractive index of second medium.
flipn1 – Flip normal direction for ray1.
flipn2 – Flip normal direction for ray2.
driving – Whether this is a driving constraint.
- Returns:
Constraint tag.
- calculate_angle_via_point(crv1_id: CurveId, crv2_id: CurveId, pt_id: PointId) float
Calculate the current angle between two curves at a point.
This is a query, not a constraint — it returns the angle between the tangent directions without adding any constraint.
- Parameters:
crv1_id – First curve.
crv2_id – Second curve.
pt_id – Point where the angle is measured.
- Returns:
Angle in radians.
- calculate_angle_via_two_points(crv1_id: CurveId, crv2_id: CurveId, pt1_id: PointId, pt2_id: PointId) float
Calculate the current angle between two curves via two points.
- Parameters:
crv1_id – First curve.
crv2_id – Second curve.
pt1_id – Point on the first curve.
pt2_id – Point on the second curve.
- Returns:
Angle in radians.
- solve(algorithm: Algorithm = <Algorithm.DogLeg: 2>) SolveStatus
Solve the constraint system.
Returns
SolveStatusindicating result.
- diagnose(algorithm: Algorithm = <Algorithm.DogLeg: 2>) Diagnosis
Diagnose the constraint system.
Runs the solver’s diagnosis to determine the degrees of freedom and identify any conflicting or redundant constraints.
Returns a
Diagnosiswith:dof: Degrees of freedom (0 = fully constrained).conflicting: Over-constraining constraint tags.redundant: Redundant constraint tags.partially_redundant: Partially redundant constraint tags.Convenience properties:
is_fully_constrained,is_under_constrained,is_over_constrained.
Example:
s = Sketch() p1 = s.add_point(0, 0) p2 = s.add_point(5, 0) l = s.add_line(p1, p2) s.horizontal(l) diag = s.diagnose() print(diag.dof) # 3 (under-constrained) print(diag.is_under_constrained) # True
- dof() int
Return degrees of freedom of the constraint system.
Shorthand for
diagnose().dof. Returns 0 when fully constrained, positive when under-constrained.
- constraint_error(tag: ConstraintTag) float
Calculate the RMS error of all constraints with the given tag.
- to_image(*, width: int | None = None, height: int | None = None, scale: float | None = None, padding: int = 40, background: str = 'white', line_color: str = 'black', circle_color: str = 'blue', arc_color: str = 'red', ellipse_color: str = 'green', line_width: int = 2, point_radius: int = 3, point_color: str = 'gray') object
Render the sketch geometry to a Pillow image.
This is a convenience wrapper around
planegcs.graphics.sketch_to_image().Requires the
graphicsextra:pip install planegcs[graphics]
All keyword arguments are forwarded to
sketch_to_image().- Returns:
A
PIL.Image.Imageshowing the current sketch geometry.
Diagnosis
- class planegcs.Diagnosis(dof: int, conflicting: list[~planegcs.sketch.ConstraintTag], redundant: list[~planegcs.sketch.ConstraintTag], partially_redundant: list[~planegcs.sketch.ConstraintTag], conflicting_info: list[~planegcs.sketch.ConstraintInfo] = <factory>, redundant_info: list[~planegcs.sketch.ConstraintInfo] = <factory>, partially_redundant_info: list[~planegcs.sketch.ConstraintInfo] = <factory>)
Result of constraint system diagnosis.
Returned by
Sketch.diagnose().- dof: int
Degrees of freedom.
0: Fully constrained.> 0: Under-constrained (this many degrees of freedom remain).
- conflicting: list[ConstraintTag]
Tags of conflicting constraints.
Non-empty means the system is over-constrained. These are the constraint tags that conflict with each other.
- redundant: list[ConstraintTag]
Tags of redundant constraints.
Redundant constraints are satisfied but provide no additional information (they duplicate information already present).
- conflicting_info: list[ConstraintInfo]
Rich information about each conflicting constraint.
Same constraints as
conflicting, but asConstraintInfoobjects that include the constraint type and involved entities. Tags not found in the sketch’s constraint registry (e.g. internal constraints) are omitted.
- redundant_info: list[ConstraintInfo]
Rich information about each redundant constraint.
- partially_redundant_info: list[ConstraintInfo]
Rich information about each partially redundant constraint.
Constraint & Entity Info
- class planegcs.ConstraintInfo(tag: ConstraintTag, type_name: str, entities: tuple[int, ...], driving: bool)
Metadata about a constraint, recorded when it is added to a
Sketch.Provides human-readable information about what a constraint tag refers to, so diagnosis results can be understood without manually tracking tags.
- tag: ConstraintTag
The unique constraint tag (same value returned by the constraint method).
- type_name: str
Human-readable name of the constraint type (e.g.
"horizontal","p2p_distance","coincident").
- entities: tuple[int, ...]
IDs of the geometry/parameter entities involved in this constraint.
The meaning depends on
type_name. For example:"horizontal"→(line_id,)"p2p_distance"→(pt1_id, pt2_id, distance_param_id)"coincident"→(pt1_id, pt2_id)"fix_point_x"→(pt_id, x_param_id)
- get_entities(sketch: Sketch) list[EntityInfo]
Resolve each entity ID to an
EntityInfovia sketch.Returns a list in the same order as
entities. IDs that the sketch cannot resolve (e.g. internal solver IDs) are omitted.- Parameters:
sketch – The
Sketchthat owns this constraint.
Example:
diag = sketch.diagnose() for ci in diag.conflicting_info: for entity in ci.get_entities(sketch): print(entity.type, entity.value)
- class planegcs.EntityInfo(id: int, type: Literal['point', 'line', 'circle', 'arc', 'ellipse', 'arc_of_ellipse', 'hyperbola', 'arc_of_hyperbola', 'parabola', 'arc_of_parabola', 'bspline', 'param'], value: PointInfo | LineInfo | CircleInfo | ArcInfo | EllipseInfo | ArcOfEllipseInfo | HyperbolaInfo | ArcOfHyperbolaInfo | ParabolaInfo | ArcOfParabolaInfo | BSplineInfo | float)
Description of a geometric entity or parameter in a
Sketch.Returned by
Sketch.get_entity(). Gives the entity’s type and current solver value so that opaque integer IDs become meaningful.- type: Literal['point', 'line', 'circle', 'arc', 'ellipse', 'arc_of_ellipse', 'hyperbola', 'arc_of_hyperbola', 'parabola', 'arc_of_parabola', 'bspline', 'param']
"point","line","circle","arc","ellipse", or"param".- Type:
Kind of entity
- value: PointInfo | LineInfo | CircleInfo | ArcInfo | EllipseInfo | ArcOfEllipseInfo | HyperbolaInfo | ArcOfHyperbolaInfo | ParabolaInfo | ArcOfParabolaInfo | BSplineInfo | float
Current solver value.
The concrete type depends on
type:"point"→PointInfo(an(x, y)tuple)"line"→LineInfo"circle"→CircleInfo"arc"→ArcInfo"ellipse"→EllipseInfo"arc_of_ellipse"→ArcOfEllipseInfo"hyperbola"→HyperbolaInfo"arc_of_hyperbola"→ArcOfHyperbolaInfo"parabola"→ParabolaInfo"arc_of_parabola"→ArcOfParabolaInfo"bspline"→BSplineInfo"param"→float
SketchSolver (Low-Level)
- class planegcs.SketchSolver
- a2a_distance(self: planegcs._planegcs.SketchSolver, a1_id: SupportsInt | SupportsIndex, a2_id: SupportsInt | SupportsIndex, dist_id: SupportsInt | SupportsIndex, driving: bool = True) int
Add arc-to-arc distance constraint.
- a2l_distance(self: planegcs._planegcs.SketchSolver, arc_id: SupportsInt | SupportsIndex, line_id: SupportsInt | SupportsIndex, dist_id: SupportsInt | SupportsIndex, driving: bool = True) int
Add arc-to-line distance constraint.
- add_arc(self: planegcs._planegcs.SketchSolver, center_id: SupportsInt | SupportsIndex, start_id: SupportsInt | SupportsIndex, end_id: SupportsInt | SupportsIndex, radius_id: SupportsInt | SupportsIndex, start_angle_id: SupportsInt | SupportsIndex, end_angle_id: SupportsInt | SupportsIndex) int
Add an arc from explicit points and parameters. Automatically adds arc rules. Returns arc ID.
- add_arc_of_ellipse(self: planegcs._planegcs.SketchSolver, center_id: SupportsInt | SupportsIndex, focus1_id: SupportsInt | SupportsIndex, radmin: SupportsFloat | SupportsIndex, start_angle: SupportsFloat | SupportsIndex, end_angle: SupportsFloat | SupportsIndex, start_id: SupportsInt | SupportsIndex, end_id: SupportsInt | SupportsIndex) int
Add an arc of ellipse. Returns ID.
- add_arc_of_hyperbola(self: planegcs._planegcs.SketchSolver, center_id: SupportsInt | SupportsIndex, focus1_id: SupportsInt | SupportsIndex, radmin: SupportsFloat | SupportsIndex, start_angle: SupportsFloat | SupportsIndex, end_angle: SupportsFloat | SupportsIndex, start_id: SupportsInt | SupportsIndex, end_id: SupportsInt | SupportsIndex) int
Add an arc of hyperbola. Returns ID.
- add_arc_of_parabola(self: planegcs._planegcs.SketchSolver, vertex_id: SupportsInt | SupportsIndex, focus1_id: SupportsInt | SupportsIndex, start_angle: SupportsFloat | SupportsIndex, end_angle: SupportsFloat | SupportsIndex, start_id: SupportsInt | SupportsIndex, end_id: SupportsInt | SupportsIndex) int
Add an arc of parabola. Returns ID.
- add_bspline(self: planegcs._planegcs.SketchSolver, start_id: SupportsInt | SupportsIndex, end_id: SupportsInt | SupportsIndex, pole_ids: collections.abc.Sequence[SupportsInt | SupportsIndex], weight_ids: collections.abc.Sequence[SupportsInt | SupportsIndex], knot_ids: collections.abc.Sequence[SupportsInt | SupportsIndex], mult: collections.abc.Sequence[SupportsInt | SupportsIndex], degree: SupportsInt | SupportsIndex, periodic: bool) int
Add a B-spline. Returns ID.
- add_circle(self: planegcs._planegcs.SketchSolver, center_id: SupportsInt | SupportsIndex, radius_id: SupportsInt | SupportsIndex) int
Add a circle. Returns circle ID.
- add_ellipse(self: planegcs._planegcs.SketchSolver, center_id: SupportsInt | SupportsIndex, focus1_id: SupportsInt | SupportsIndex, radmin: SupportsFloat | SupportsIndex) int
Add an ellipse. Returns ellipse ID.
- add_hyperbola(self: planegcs._planegcs.SketchSolver, center_id: SupportsInt | SupportsIndex, focus1_id: SupportsInt | SupportsIndex, radmin: SupportsFloat | SupportsIndex) int
Add a hyperbola. Returns ID.
- add_line(*args, **kwargs)
Overloaded function.
add_line(self: planegcs._planegcs.SketchSolver, p1_id: typing.SupportsInt | typing.SupportsIndex, p2_id: typing.SupportsInt | typing.SupportsIndex) -> int
Add a line between two existing points. Returns line ID.
add_line(self: planegcs._planegcs.SketchSolver, x1: typing.SupportsFloat | typing.SupportsIndex, y1: typing.SupportsFloat | typing.SupportsIndex, x2: typing.SupportsFloat | typing.SupportsIndex, y2: typing.SupportsFloat | typing.SupportsIndex) -> int
Add a line with endpoint coordinates. Returns line ID.
- add_parabola(self: planegcs._planegcs.SketchSolver, vertex_id: SupportsInt | SupportsIndex, focus1_id: SupportsInt | SupportsIndex) int
Add a parabola. Returns ID.
- add_param(self: planegcs._planegcs.SketchSolver, value: SupportsFloat | SupportsIndex = 0.0, fixed: bool = False) int
Allocate a parameter. fixed=True for driving constraint values. Returns param ID.
- add_point(self: planegcs._planegcs.SketchSolver, x: SupportsFloat | SupportsIndex, y: SupportsFloat | SupportsIndex) int
Add a point. Returns point ID.
- add_point_from_params(self: planegcs._planegcs.SketchSolver, px_id: SupportsInt | SupportsIndex, py_id: SupportsInt | SupportsIndex) int
Add a point from existing parameter IDs for x and y. Returns point ID.
- angle_via_point(self: planegcs._planegcs.SketchSolver, crv1_id: SupportsInt | SupportsIndex, crv2_id: SupportsInt | SupportsIndex, pt_id: SupportsInt | SupportsIndex, angle_id: SupportsInt | SupportsIndex, driving: bool = True) int
Constrain angle between two curves at a point.
- angle_via_point_and_param(self: planegcs._planegcs.SketchSolver, crv1_id: SupportsInt | SupportsIndex, crv2_id: SupportsInt | SupportsIndex, pt_id: SupportsInt | SupportsIndex, cparam_id: SupportsInt | SupportsIndex, angle_id: SupportsInt | SupportsIndex, driving: bool = True) int
Constrain angle between two curves at a point with a curve parameter.
- angle_via_point_and_two_params(self: planegcs._planegcs.SketchSolver, crv1_id: SupportsInt | SupportsIndex, crv2_id: SupportsInt | SupportsIndex, pt_id: SupportsInt | SupportsIndex, cparam1_id: SupportsInt | SupportsIndex, cparam2_id: SupportsInt | SupportsIndex, angle_id: SupportsInt | SupportsIndex, driving: bool = True) int
Constrain angle between two curves at a point with two curve parameters.
- angle_via_two_points(self: planegcs._planegcs.SketchSolver, crv1_id: SupportsInt | SupportsIndex, crv2_id: SupportsInt | SupportsIndex, pt1_id: SupportsInt | SupportsIndex, pt2_id: SupportsInt | SupportsIndex, angle_id: SupportsInt | SupportsIndex, driving: bool = True) int
Constrain angle between two curves via two points.
- arc_angle(self: planegcs._planegcs.SketchSolver, arc_id: SupportsInt | SupportsIndex, angle_id: SupportsInt | SupportsIndex, driving: bool = True) int
Constrain the angular span (sweep) of an arc using a parameter.
- arc_diameter(self: planegcs._planegcs.SketchSolver, arc_id: SupportsInt | SupportsIndex, diameter_id: SupportsInt | SupportsIndex, driving: bool = True) int
Set arc diameter.
- arc_length(self: planegcs._planegcs.SketchSolver, arc_id: SupportsInt | SupportsIndex, dist_id: SupportsInt | SupportsIndex, driving: bool = True) int
Constrain arc length.
- arc_of_ellipse_rules(self: planegcs._planegcs.SketchSolver, aoe_id: SupportsInt | SupportsIndex, driving: bool = True) int
Add arc-of-ellipse rules (start/end tied to ellipse parametric equation).
- arc_of_hyperbola_rules(self: planegcs._planegcs.SketchSolver, aoh_id: SupportsInt | SupportsIndex, driving: bool = True) int
Add arc-of-hyperbola rules (start/end tied to hyperbola parametric equation).
- arc_of_parabola_rules(self: planegcs._planegcs.SketchSolver, aop_id: SupportsInt | SupportsIndex, driving: bool = True) int
Add arc-of-parabola rules (start/end tied to parabola parametric equation).
- arc_radius(self: planegcs._planegcs.SketchSolver, arc_id: SupportsInt | SupportsIndex, radius_id: SupportsInt | SupportsIndex, driving: bool = True) int
Set arc radius.
- arc_rules(self: planegcs._planegcs.SketchSolver, arc_id: SupportsInt | SupportsIndex, driving: bool = True) int
Add arc rules constraint (start/end computed from center+radius+angles).
- c2a_distance(self: planegcs._planegcs.SketchSolver, circle_id: SupportsInt | SupportsIndex, arc_id: SupportsInt | SupportsIndex, dist_id: SupportsInt | SupportsIndex, driving: bool = True) int
Add circle-to-arc distance constraint.
- c2c_distance(self: planegcs._planegcs.SketchSolver, c1_id: SupportsInt | SupportsIndex, c2_id: SupportsInt | SupportsIndex, dist_id: SupportsInt | SupportsIndex, driving: bool = True) int
Add circle-to-circle distance constraint.
- c2l_distance(self: planegcs._planegcs.SketchSolver, circle_id: SupportsInt | SupportsIndex, line_id: SupportsInt | SupportsIndex, dist_id: SupportsInt | SupportsIndex, driving: bool = True) int
Add circle-to-line distance constraint.
- calculate_angle_via_point(self: planegcs._planegcs.SketchSolver, crv1_id: SupportsInt | SupportsIndex, crv2_id: SupportsInt | SupportsIndex, pt_id: SupportsInt | SupportsIndex) float
Calculate the angle between two curves at a point (no constraint added).
- calculate_angle_via_two_points(self: planegcs._planegcs.SketchSolver, crv1_id: SupportsInt | SupportsIndex, crv2_id: SupportsInt | SupportsIndex, pt1_id: SupportsInt | SupportsIndex, pt2_id: SupportsInt | SupportsIndex) float
Calculate the angle between two curves via two points (no constraint added).
- circle_diameter(self: planegcs._planegcs.SketchSolver, circle_id: SupportsInt | SupportsIndex, diameter_id: SupportsInt | SupportsIndex, driving: bool = True) int
Set circle diameter.
- circle_radius(self: planegcs._planegcs.SketchSolver, circle_id: SupportsInt | SupportsIndex, radius_id: SupportsInt | SupportsIndex, driving: bool = True) int
Set circle radius.
- clear(self: planegcs._planegcs.SketchSolver) None
Clear all geometry, constraints, and parameters.
- clear_by_tag(self: planegcs._planegcs.SketchSolver, tag: SupportsInt | SupportsIndex) None
Clear all constraints with the given tag.
- coincident(self: planegcs._planegcs.SketchSolver, pt1_id: SupportsInt | SupportsIndex, pt2_id: SupportsInt | SupportsIndex, driving: bool = True) int
Add coincident constraint between two points.
- constraint_error(self: planegcs._planegcs.SketchSolver, tag: SupportsInt | SupportsIndex) float
Calculate RMS error of all constraints with given tag.
- coordinate_x(self: planegcs._planegcs.SketchSolver, pt_id: SupportsInt | SupportsIndex, x_id: SupportsInt | SupportsIndex, driving: bool = True) int
Fix the X coordinate of a point.
- coordinate_y(self: planegcs._planegcs.SketchSolver, pt_id: SupportsInt | SupportsIndex, y_id: SupportsInt | SupportsIndex, driving: bool = True) int
Fix the Y coordinate of a point.
- curve_value(self: planegcs._planegcs.SketchSolver, pt_id: SupportsInt | SupportsIndex, curve_id: SupportsInt | SupportsIndex, u_id: SupportsInt | SupportsIndex, driving: bool = True) int
Constrain a point to lie on a curve at parameter u.
- diagnose(self: planegcs._planegcs.SketchSolver, algorithm: planegcs._planegcs.Algorithm = <Algorithm.DogLeg: 2>) planegcs._planegcs.DiagnosisResult
Run full diagnosis. Returns DiagnosisResult with dof, conflicting, redundant, and partially_redundant constraint tags.
- difference(self: planegcs._planegcs.SketchSolver, param1_id: SupportsInt | SupportsIndex, param2_id: SupportsInt | SupportsIndex, diff_id: SupportsInt | SupportsIndex, driving: bool = True) int
Add difference constraint.
- dof(self: planegcs._planegcs.SketchSolver) int
Return degrees of freedom after running diagnosis. 0 = fully constrained, >0 = under-constrained.
- equal(self: planegcs._planegcs.SketchSolver, param1_id: SupportsInt | SupportsIndex, param2_id: SupportsInt | SupportsIndex, driving: bool = True) int
Add equality constraint between two parameters.
- equal_focus_pp(self: planegcs._planegcs.SketchSolver, p1_id: SupportsInt | SupportsIndex, p2_id: SupportsInt | SupportsIndex, driving: bool = True) int
Constrain two arcs of parabola to have equal focal distance.
- equal_length(self: planegcs._planegcs.SketchSolver, l1_id: SupportsInt | SupportsIndex, l2_id: SupportsInt | SupportsIndex, driving: bool = True) int
Constrain two lines to have equal length.
- equal_radii_ee(self: planegcs._planegcs.SketchSolver, e1_id: SupportsInt | SupportsIndex, e2_id: SupportsInt | SupportsIndex, driving: bool = True) int
Constrain two ellipses to have equal major radii.
- equal_radii_hh(self: planegcs._planegcs.SketchSolver, h1_id: SupportsInt | SupportsIndex, h2_id: SupportsInt | SupportsIndex, driving: bool = True) int
Constrain two arcs of hyperbola to have equal major radii.
- equal_radius_aa(self: planegcs._planegcs.SketchSolver, a1_id: SupportsInt | SupportsIndex, a2_id: SupportsInt | SupportsIndex, driving: bool = True) int
Constrain two arcs to have equal radius.
- equal_radius_ca(self: planegcs._planegcs.SketchSolver, circle_id: SupportsInt | SupportsIndex, arc_id: SupportsInt | SupportsIndex, driving: bool = True) int
Constrain circle and arc to have equal radius.
- equal_radius_cc(self: planegcs._planegcs.SketchSolver, c1_id: SupportsInt | SupportsIndex, c2_id: SupportsInt | SupportsIndex, driving: bool = True) int
Constrain two circles to have equal radius.
- get_arc_center(self: planegcs._planegcs.SketchSolver, arc_id: SupportsInt | SupportsIndex) tuple[float, float]
- get_arc_end_angle(self: planegcs._planegcs.SketchSolver, arc_id: SupportsInt | SupportsIndex) float
- get_arc_end_point(self: planegcs._planegcs.SketchSolver, arc_id: SupportsInt | SupportsIndex) tuple[float, float]
- get_arc_of_ellipse_center(self: planegcs._planegcs.SketchSolver, id: SupportsInt | SupportsIndex) tuple[float, float]
- get_arc_of_ellipse_end_angle(self: planegcs._planegcs.SketchSolver, id: SupportsInt | SupportsIndex) float
- get_arc_of_ellipse_end_point(self: planegcs._planegcs.SketchSolver, id: SupportsInt | SupportsIndex) tuple[float, float]
- get_arc_of_ellipse_focus1(self: planegcs._planegcs.SketchSolver, id: SupportsInt | SupportsIndex) tuple[float, float]
- get_arc_of_ellipse_radmin(self: planegcs._planegcs.SketchSolver, id: SupportsInt | SupportsIndex) float
- get_arc_of_ellipse_start_angle(self: planegcs._planegcs.SketchSolver, id: SupportsInt | SupportsIndex) float
- get_arc_of_ellipse_start_point(self: planegcs._planegcs.SketchSolver, id: SupportsInt | SupportsIndex) tuple[float, float]
- get_arc_of_hyperbola_center(self: planegcs._planegcs.SketchSolver, id: SupportsInt | SupportsIndex) tuple[float, float]
- get_arc_of_hyperbola_end_angle(self: planegcs._planegcs.SketchSolver, id: SupportsInt | SupportsIndex) float
- get_arc_of_hyperbola_end_point(self: planegcs._planegcs.SketchSolver, id: SupportsInt | SupportsIndex) tuple[float, float]
- get_arc_of_hyperbola_focus1(self: planegcs._planegcs.SketchSolver, id: SupportsInt | SupportsIndex) tuple[float, float]
- get_arc_of_hyperbola_radmin(self: planegcs._planegcs.SketchSolver, id: SupportsInt | SupportsIndex) float
- get_arc_of_hyperbola_start_angle(self: planegcs._planegcs.SketchSolver, id: SupportsInt | SupportsIndex) float
- get_arc_of_hyperbola_start_point(self: planegcs._planegcs.SketchSolver, id: SupportsInt | SupportsIndex) tuple[float, float]
- get_arc_of_parabola_end_angle(self: planegcs._planegcs.SketchSolver, id: SupportsInt | SupportsIndex) float
- get_arc_of_parabola_end_point(self: planegcs._planegcs.SketchSolver, id: SupportsInt | SupportsIndex) tuple[float, float]
- get_arc_of_parabola_focus1(self: planegcs._planegcs.SketchSolver, id: SupportsInt | SupportsIndex) tuple[float, float]
- get_arc_of_parabola_start_angle(self: planegcs._planegcs.SketchSolver, id: SupportsInt | SupportsIndex) float
- get_arc_of_parabola_start_point(self: planegcs._planegcs.SketchSolver, id: SupportsInt | SupportsIndex) tuple[float, float]
- get_arc_of_parabola_vertex(self: planegcs._planegcs.SketchSolver, id: SupportsInt | SupportsIndex) tuple[float, float]
- get_arc_radius(self: planegcs._planegcs.SketchSolver, arc_id: SupportsInt | SupportsIndex) float
- get_arc_start_angle(self: planegcs._planegcs.SketchSolver, arc_id: SupportsInt | SupportsIndex) float
- get_arc_start_point(self: planegcs._planegcs.SketchSolver, arc_id: SupportsInt | SupportsIndex) tuple[float, float]
- get_bspline_end_point(self: planegcs._planegcs.SketchSolver, id: SupportsInt | SupportsIndex) tuple[float, float]
- get_bspline_start_point(self: planegcs._planegcs.SketchSolver, id: SupportsInt | SupportsIndex) tuple[float, float]
- get_circle_center(self: planegcs._planegcs.SketchSolver, circle_id: SupportsInt | SupportsIndex) tuple[float, float]
- get_circle_radius(self: planegcs._planegcs.SketchSolver, circle_id: SupportsInt | SupportsIndex) float
- get_ellipse_center(self: planegcs._planegcs.SketchSolver, ellipse_id: SupportsInt | SupportsIndex) tuple[float, float]
- get_ellipse_focus1(self: planegcs._planegcs.SketchSolver, ellipse_id: SupportsInt | SupportsIndex) tuple[float, float]
- get_ellipse_radmin(self: planegcs._planegcs.SketchSolver, ellipse_id: SupportsInt | SupportsIndex) float
- get_hyperbola_center(self: planegcs._planegcs.SketchSolver, id: SupportsInt | SupportsIndex) tuple[float, float]
- get_hyperbola_focus1(self: planegcs._planegcs.SketchSolver, id: SupportsInt | SupportsIndex) tuple[float, float]
- get_hyperbola_radmin(self: planegcs._planegcs.SketchSolver, id: SupportsInt | SupportsIndex) float
- get_line_p1(self: planegcs._planegcs.SketchSolver, line_id: SupportsInt | SupportsIndex) tuple[float, float]
- get_line_p2(self: planegcs._planegcs.SketchSolver, line_id: SupportsInt | SupportsIndex) tuple[float, float]
- get_parabola_focus1(self: planegcs._planegcs.SketchSolver, id: SupportsInt | SupportsIndex) tuple[float, float]
- get_parabola_vertex(self: planegcs._planegcs.SketchSolver, id: SupportsInt | SupportsIndex) tuple[float, float]
- get_param(self: planegcs._planegcs.SketchSolver, param_id: SupportsInt | SupportsIndex) float
Get the current value of a parameter.
- get_point(self: planegcs._planegcs.SketchSolver, point_id: SupportsInt | SupportsIndex) tuple[float, float]
Get the (x, y) of a point.
- get_point_param_ids(self: planegcs._planegcs.SketchSolver, point_id: SupportsInt | SupportsIndex) tuple[int, int]
Get the (x_param_id, y_param_id) for a point.
- horizontal_line(self: planegcs._planegcs.SketchSolver, line_id: SupportsInt | SupportsIndex, driving: bool = True) int
Constrain line to be horizontal.
- horizontal_points(self: planegcs._planegcs.SketchSolver, p1_id: SupportsInt | SupportsIndex, p2_id: SupportsInt | SupportsIndex, driving: bool = True) int
Constrain two points to have same Y.
- internal_alignment_bspline_control_point(self: planegcs._planegcs.SketchSolver, bspline_id: SupportsInt | SupportsIndex, circle_id: SupportsInt | SupportsIndex, pole_index: SupportsInt | SupportsIndex, driving: bool = True) int
Internal alignment: B-spline control point.
- internal_alignment_ellipse_focus1(self: planegcs._planegcs.SketchSolver, ellipse_id: SupportsInt | SupportsIndex, pt_id: SupportsInt | SupportsIndex, driving: bool = True) int
Internal alignment: ellipse focus 1.
- internal_alignment_ellipse_focus2(self: planegcs._planegcs.SketchSolver, ellipse_id: SupportsInt | SupportsIndex, pt_id: SupportsInt | SupportsIndex, driving: bool = True) int
Internal alignment: ellipse focus 2.
- internal_alignment_ellipse_major_diameter(self: planegcs._planegcs.SketchSolver, ellipse_id: SupportsInt | SupportsIndex, p1_id: SupportsInt | SupportsIndex, p2_id: SupportsInt | SupportsIndex, driving: bool = True) int
Internal alignment: ellipse major diameter.
- internal_alignment_ellipse_minor_diameter(self: planegcs._planegcs.SketchSolver, ellipse_id: SupportsInt | SupportsIndex, p1_id: SupportsInt | SupportsIndex, p2_id: SupportsInt | SupportsIndex, driving: bool = True) int
Internal alignment: ellipse minor diameter.
- internal_alignment_hyperbola_focus(self: planegcs._planegcs.SketchSolver, hyperbola_id: SupportsInt | SupportsIndex, pt_id: SupportsInt | SupportsIndex, driving: bool = True) int
Internal alignment: hyperbola focus.
- internal_alignment_hyperbola_major_diameter(self: planegcs._planegcs.SketchSolver, hyperbola_id: SupportsInt | SupportsIndex, p1_id: SupportsInt | SupportsIndex, p2_id: SupportsInt | SupportsIndex, driving: bool = True) int
Internal alignment: hyperbola major diameter.
- internal_alignment_hyperbola_minor_diameter(self: planegcs._planegcs.SketchSolver, hyperbola_id: SupportsInt | SupportsIndex, p1_id: SupportsInt | SupportsIndex, p2_id: SupportsInt | SupportsIndex, driving: bool = True) int
Internal alignment: hyperbola minor diameter.
- internal_alignment_knot_point(self: planegcs._planegcs.SketchSolver, bspline_id: SupportsInt | SupportsIndex, pt_id: SupportsInt | SupportsIndex, knot_index: SupportsInt | SupportsIndex, driving: bool = True) int
Internal alignment: B-spline knot point.
- internal_alignment_parabola_focus(self: planegcs._planegcs.SketchSolver, parabola_id: SupportsInt | SupportsIndex, pt_id: SupportsInt | SupportsIndex, driving: bool = True) int
Internal alignment: parabola focus.
- internal_alignment_point2ellipse(self: planegcs._planegcs.SketchSolver, ellipse_id: SupportsInt | SupportsIndex, pt_id: SupportsInt | SupportsIndex, alignment_type: planegcs._planegcs.InternalAlignmentType, driving: bool = True) int
Internal alignment: point to ellipse.
- internal_alignment_point2hyperbola(self: planegcs._planegcs.SketchSolver, hyperbola_id: SupportsInt | SupportsIndex, pt_id: SupportsInt | SupportsIndex, alignment_type: planegcs._planegcs.InternalAlignmentType, driving: bool = True) int
Internal alignment: point to hyperbola.
- is_param_fixed(self: planegcs._planegcs.SketchSolver, param_id: SupportsInt | SupportsIndex) bool
Check if a parameter is fixed (not an unknown).
- l2l_angle(self: planegcs._planegcs.SketchSolver, l1_id: SupportsInt | SupportsIndex, l2_id: SupportsInt | SupportsIndex, angle_id: SupportsInt | SupportsIndex, driving: bool = True) int
Add line-to-line angle constraint.
- midpoint_on_line(self: planegcs._planegcs.SketchSolver, l1_id: SupportsInt | SupportsIndex, l2_id: SupportsInt | SupportsIndex, driving: bool = True) int
Constrain midpoint of l1 to lie on l2.
- p2a_distance(self: planegcs._planegcs.SketchSolver, pt_id: SupportsInt | SupportsIndex, arc_id: SupportsInt | SupportsIndex, distance_id: SupportsInt | SupportsIndex, driving: bool = True) int
Add point-to-arc distance constraint.
- p2c_distance(self: planegcs._planegcs.SketchSolver, pt_id: SupportsInt | SupportsIndex, circle_id: SupportsInt | SupportsIndex, distance_id: SupportsInt | SupportsIndex, driving: bool = True) int
Add point-to-circle distance constraint.
- p2l_distance(self: planegcs._planegcs.SketchSolver, pt_id: SupportsInt | SupportsIndex, line_id: SupportsInt | SupportsIndex, distance_id: SupportsInt | SupportsIndex, driving: bool = True) int
Add point-to-line distance constraint.
- p2p_angle(self: planegcs._planegcs.SketchSolver, pt1_id: SupportsInt | SupportsIndex, pt2_id: SupportsInt | SupportsIndex, angle_id: SupportsInt | SupportsIndex, driving: bool = True) int
Add point-to-point angle constraint.
- p2p_distance(self: planegcs._planegcs.SketchSolver, pt1_id: SupportsInt | SupportsIndex, pt2_id: SupportsInt | SupportsIndex, distance_id: SupportsInt | SupportsIndex, driving: bool = True) int
Add point-to-point distance constraint.
- parallel(self: planegcs._planegcs.SketchSolver, l1_id: SupportsInt | SupportsIndex, l2_id: SupportsInt | SupportsIndex, driving: bool = True) int
Add parallel constraint.
- perpendicular(self: planegcs._planegcs.SketchSolver, l1_id: SupportsInt | SupportsIndex, l2_id: SupportsInt | SupportsIndex, driving: bool = True) int
Add perpendicular constraint.
- point_on_arc(self: planegcs._planegcs.SketchSolver, pt_id: SupportsInt | SupportsIndex, arc_id: SupportsInt | SupportsIndex, driving: bool = True) int
Constrain point to lie on arc.
- point_on_bspline(self: planegcs._planegcs.SketchSolver, pt_id: SupportsInt | SupportsIndex, bspline_id: SupportsInt | SupportsIndex, u_id: SupportsInt | SupportsIndex, driving: bool = True) int
Constrain point to lie on B-spline at parameter u.
- point_on_circle(self: planegcs._planegcs.SketchSolver, pt_id: SupportsInt | SupportsIndex, circle_id: SupportsInt | SupportsIndex, driving: bool = True) int
Constrain point to lie on circle.
- point_on_ellipse(self: planegcs._planegcs.SketchSolver, pt_id: SupportsInt | SupportsIndex, ellipse_id: SupportsInt | SupportsIndex, driving: bool = True) int
Constrain point to lie on ellipse.
- point_on_hyperbolic_arc(self: planegcs._planegcs.SketchSolver, pt_id: SupportsInt | SupportsIndex, arc_id: SupportsInt | SupportsIndex, driving: bool = True) int
Constrain point to lie on hyperbolic arc.
- point_on_line(self: planegcs._planegcs.SketchSolver, pt_id: SupportsInt | SupportsIndex, line_id: SupportsInt | SupportsIndex, driving: bool = True) int
Constrain point to lie on line.
- point_on_parabolic_arc(self: planegcs._planegcs.SketchSolver, pt_id: SupportsInt | SupportsIndex, arc_id: SupportsInt | SupportsIndex, driving: bool = True) int
Constrain point to lie on parabolic arc.
- point_on_perp_bisector(self: planegcs._planegcs.SketchSolver, pt_id: SupportsInt | SupportsIndex, line_id: SupportsInt | SupportsIndex, driving: bool = True) int
Constrain point to lie on perpendicular bisector of line.
- proportional(self: planegcs._planegcs.SketchSolver, param1_id: SupportsInt | SupportsIndex, param2_id: SupportsInt | SupportsIndex, ratio: SupportsFloat | SupportsIndex, driving: bool = True) int
Add proportional constraint.
- set_param(self: planegcs._planegcs.SketchSolver, param_id: SupportsInt | SupportsIndex, value: SupportsFloat | SupportsIndex) None
Set the value of a parameter.
- set_param_fixed(self: planegcs._planegcs.SketchSolver, param_id: SupportsInt | SupportsIndex, fixed: bool) None
Set whether a parameter is fixed.
- snells_law(self: planegcs._planegcs.SketchSolver, ray1_id: SupportsInt | SupportsIndex, ray2_id: SupportsInt | SupportsIndex, boundary_id: SupportsInt | SupportsIndex, pt_id: SupportsInt | SupportsIndex, n1_id: SupportsInt | SupportsIndex, n2_id: SupportsInt | SupportsIndex, flipn1: bool = False, flipn2: bool = False, driving: bool = True) int
Add Snell’s law refraction constraint at a boundary point.
- solve(self: planegcs._planegcs.SketchSolver, algorithm: planegcs._planegcs.Algorithm = <Algorithm.DogLeg: 2>) planegcs._planegcs.SolveStatus
Solve the system. Returns SolveStatus.
- symmetric_points_line(self: planegcs._planegcs.SketchSolver, p1_id: SupportsInt | SupportsIndex, p2_id: SupportsInt | SupportsIndex, line_id: SupportsInt | SupportsIndex, driving: bool = True) int
Constrain points symmetric about a line.
- symmetric_points_point(self: planegcs._planegcs.SketchSolver, p1_id: SupportsInt | SupportsIndex, p2_id: SupportsInt | SupportsIndex, center_id: SupportsInt | SupportsIndex, driving: bool = True) int
Constrain points symmetric about a center point.
- tangent_arc_arc(self: planegcs._planegcs.SketchSolver, a1_id: SupportsInt | SupportsIndex, a2_id: SupportsInt | SupportsIndex, driving: bool = True) int
Add arc-arc tangent constraint.
- tangent_at_bspline_knot(self: planegcs._planegcs.SketchSolver, bspline_id: SupportsInt | SupportsIndex, line_id: SupportsInt | SupportsIndex, knot_index: SupportsInt | SupportsIndex, driving: bool = True) int
Constrain line tangent to B-spline at a knot.
- tangent_circle_arc(self: planegcs._planegcs.SketchSolver, circle_id: SupportsInt | SupportsIndex, arc_id: SupportsInt | SupportsIndex, driving: bool = True) int
Add circle-arc tangent constraint.
- tangent_circle_circle(self: planegcs._planegcs.SketchSolver, c1_id: SupportsInt | SupportsIndex, c2_id: SupportsInt | SupportsIndex, driving: bool = True) int
Add circle-circle tangent constraint.
- tangent_circumf(self: planegcs._planegcs.SketchSolver, p1_id: SupportsInt | SupportsIndex, p2_id: SupportsInt | SupportsIndex, rd1_id: SupportsInt | SupportsIndex, rd2_id: SupportsInt | SupportsIndex, internal: bool = False, driving: bool = True) int
Tangent circumference constraint.
- tangent_line_arc(self: planegcs._planegcs.SketchSolver, line_id: SupportsInt | SupportsIndex, arc_id: SupportsInt | SupportsIndex, driving: bool = True) int
Add line-arc tangent constraint.
- tangent_line_circle(self: planegcs._planegcs.SketchSolver, line_id: SupportsInt | SupportsIndex, circle_id: SupportsInt | SupportsIndex, driving: bool = True) int
Add line-circle tangent constraint.
- tangent_line_ellipse(self: planegcs._planegcs.SketchSolver, line_id: SupportsInt | SupportsIndex, ellipse_id: SupportsInt | SupportsIndex, driving: bool = True) int
Add line-ellipse tangent constraint.
- vertical_line(self: planegcs._planegcs.SketchSolver, line_id: SupportsInt | SupportsIndex, driving: bool = True) int
Constrain line to be vertical.
- vertical_points(self: planegcs._planegcs.SketchSolver, p1_id: SupportsInt | SupportsIndex, p2_id: SupportsInt | SupportsIndex, driving: bool = True) int
Constrain two points to have same X.
Enumerations
- class planegcs.SolveStatus
Members:
Success
Converged
Failed
SuccessfulSolutionInvalid
- Converged = <SolveStatus.Converged: 1>
- Failed = <SolveStatus.Failed: 2>
- Success = <SolveStatus.Success: 0>
- SuccessfulSolutionInvalid = <SolveStatus.SuccessfulSolutionInvalid: 3>
- SolveStatus.name -> str
- property value
- class planegcs.Algorithm
Members:
BFGS
LevenbergMarquardt
DogLeg
- BFGS = <Algorithm.BFGS: 0>
- DogLeg = <Algorithm.DogLeg: 2>
- LevenbergMarquardt = <Algorithm.LevenbergMarquardt: 1>
- Algorithm.name -> str
- property value
- class planegcs.DebugMode
Members:
NoDebug
Minimal
IterationLevel
- IterationLevel = <DebugMode.IterationLevel: 2>
- Minimal = <DebugMode.Minimal: 1>
- NoDebug = <DebugMode.NoDebug: 0>
- DebugMode.name -> str
- property value
- class planegcs.InternalAlignmentType
Members:
EllipsePositiveMajorX
EllipsePositiveMajorY
EllipseNegativeMajorX
EllipseNegativeMajorY
EllipsePositiveMinorX
EllipsePositiveMinorY
EllipseNegativeMinorX
EllipseNegativeMinorY
EllipseFocus2X
EllipseFocus2Y
HyperbolaPositiveMajorX
HyperbolaPositiveMajorY
HyperbolaNegativeMajorX
HyperbolaNegativeMajorY
HyperbolaPositiveMinorX
HyperbolaPositiveMinorY
HyperbolaNegativeMinorX
HyperbolaNegativeMinorY
- EllipseFocus2X = <InternalAlignmentType.EllipseFocus2X: 8>
- EllipseFocus2Y = <InternalAlignmentType.EllipseFocus2Y: 9>
- EllipseNegativeMajorX = <InternalAlignmentType.EllipseNegativeMajorX: 2>
- EllipseNegativeMajorY = <InternalAlignmentType.EllipseNegativeMajorY: 3>
- EllipseNegativeMinorX = <InternalAlignmentType.EllipseNegativeMinorX: 6>
- EllipseNegativeMinorY = <InternalAlignmentType.EllipseNegativeMinorY: 7>
- EllipsePositiveMajorX = <InternalAlignmentType.EllipsePositiveMajorX: 0>
- EllipsePositiveMajorY = <InternalAlignmentType.EllipsePositiveMajorY: 1>
- EllipsePositiveMinorX = <InternalAlignmentType.EllipsePositiveMinorX: 4>
- EllipsePositiveMinorY = <InternalAlignmentType.EllipsePositiveMinorY: 5>
- HyperbolaNegativeMajorX = <InternalAlignmentType.HyperbolaNegativeMajorX: 12>
- HyperbolaNegativeMajorY = <InternalAlignmentType.HyperbolaNegativeMajorY: 13>
- HyperbolaNegativeMinorX = <InternalAlignmentType.HyperbolaNegativeMinorX: 16>
- HyperbolaNegativeMinorY = <InternalAlignmentType.HyperbolaNegativeMinorY: 17>
- HyperbolaPositiveMajorX = <InternalAlignmentType.HyperbolaPositiveMajorX: 10>
- HyperbolaPositiveMajorY = <InternalAlignmentType.HyperbolaPositiveMajorY: 11>
- HyperbolaPositiveMinorX = <InternalAlignmentType.HyperbolaPositiveMinorX: 14>
- HyperbolaPositiveMinorY = <InternalAlignmentType.HyperbolaPositiveMinorY: 15>
- InternalAlignmentType.name -> str
- property value