Skip to main content

Module bonds

Module bonds 

Source
Expand description

Bond strokes: skeleton centerlines, multi-bond offsets, stereo, joins.

Python host draw stack removed; this module is SoT.

Structs§

BondStrokes
Strokes for one bond, ordered for painting: skeleton → offsets → stereo.
DrawnBond
One bond after label inset, before multiple-bond joins.
StrokePath
One SVG stroke before it becomes a Primitive.

Functions§

bond_paths
Flat list (skeleton then offsets then stereo).
bond_strokes
Build skeleton / offset / stereo strokes for one bond.
centered_displacements
Signed offsets of a centered multiple bond along the left normal.
crossed_double
Crossed double for unspecified E/Z (RDKit EITHERDOUBLE).
depict_order
Normalize engine bond orders for 2D stroke multiplicity.
hashed_wedge
Hashed wedge for a bond going away from the viewer.
is_aromatic_order
True for aromatic bond encodings: RDKit-style 1.5 or CTAB/Chematic 4.
join_centered_multibonds
Mitre acyclic doubles and triples to their single-bond neighbors.
line_intersect
Intersect p0 + t d0 with p1 + s d1.
multi_bond_offset
Parallel spacing for double/triple strokes (RDKit multipleBondOffset).
shorten
solid_wedge
Filled wedge; tip at (x1,y1) stereocenter — RDKit BEGINWEDGE.
wavy_bond
Wiggly single for unspecified stereo (e.g. RDKit UNKNOWN).

Type Aliases§

EndTrims
Trim distance at begin, then end, one entry per centered line.