Skip to main content

Module bonds

Module bonds 

Source
Expand description

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

Keep in sync with python/xpict/draw/bonds.py.

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 depiction.
hashed_wedge
Hashed wedge for a bond going away from the viewer.
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 (RDKit UNKNOWN / Indigo EITHER).

Type Aliases§

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