# GSPath.insertNode\_atIndex\_() disregards inserted node type

**URL:** <https://forum.glyphsapp.com/t/gspath-insertnode-atindex-disregards-inserted-node-type/35297>\
**Category:** Scripting\
**Created:** [October 4, 2025, 7:23pm UTC](https://forum.glyphsapp.com/t/gspath-insertnode-atindex-disregards-inserted-node-type/35297 "2025-10-04T19:23:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![SCarewe](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/scarewe/32/18952_2.png) [@SCarewe](https://forum.glyphsapp.com/u/SCarewe)\
**Post date:** [October 4, 2025, 7:23pm UTC](https://forum.glyphsapp.com/t/gspath-insertnode-atindex-disregards-inserted-node-type/35297/1 "2025-10-04T19:23:53Z")

</div>

Hello, I am finding that using `GSPath.insertNode_atIndex_()` inserts an offcurve node, despite me specifying that the inserted node is of type CURVE or LINE.

Is this intentional? Do I have to use `GSPath.nodes.insert(index + 1, node)`?

---

<div class="post-metadata">

**Author:** ![GeorgSeifert](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/georgseifert/32/259_2.png) [@GeorgSeifert](https://forum.glyphsapp.com/u/GeorgSeifert)\
**Post date:** [October 4, 2025, 8:16pm UTC](https://forum.glyphsapp.com/t/gspath-insertnode-atindex-disregards-inserted-node-type/35297/2 "2025-10-04T20:16:16Z")

</div>

building up a path is tricky. It needs a certain structure. So if you add a offcurve without another and a curve following, then Glyphs will try to recover and one option is to change them to line nodes. You might need to wrap the change operation in `layer.stop/startUpdates`.

---

<div class="post-metadata">

**Author:** ![SCarewe](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/scarewe/32/18952_2.png) [@SCarewe](https://forum.glyphsapp.com/u/SCarewe)\
**Post date:** [October 4, 2025, 8:17pm UTC](https://forum.glyphsapp.com/t/gspath-insertnode-atindex-disregards-inserted-node-type/35297/3 "2025-10-04T20:17:48Z")

</div>

I see, thanks for the explanation. I’ve gone with the path.nodes.insert() option, that works best in my current case.

---

<div class="post-metadata">

**Author:** ![GeorgSeifert](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/georgseifert/32/259_2.png) [@GeorgSeifert](https://forum.glyphsapp.com/u/GeorgSeifert)\
**Post date:** [October 4, 2025, 9:58pm UTC](https://forum.glyphsapp.com/t/gspath-insertnode-atindex-disregards-inserted-node-type/35297/4 "2025-10-04T21:58:32Z")

</div>

Check the python wrapper. It uses the same API.
