MCPcopy Create free account
hub / github.com/SLiCAP/SLiCAP_python / insert_vertex

Method insert_vertex

SLiCAP/schematic/wire_item.py:208–212  ·  view source on GitHub ↗

Insert pt after seg_idx; returns the new vertex index.

(self, seg_idx: int, pt: QPointF)

Source from the content-addressed store, hash-verified

206 # ── mutation ──────────────────────────────────────────────────────────────
207
208 def insert_vertex(self, seg_idx: int, pt: QPointF) -> int:
209 """Insert pt after seg_idx; returns the new vertex index."""
210 self.points.insert(seg_idx + 1, pt)
211 self._rebuild()
212 return seg_idx + 1
213
214 def move_vertex(self, idx: int, pt: QPointF) -> None:
215 self.points[idx] = pt

Callers

nothing calls this directly

Calls 1

_rebuildMethod · 0.95

Tested by

no test coverage detected