# How to detect an outside open corner

**URL:** <https://forum.glyphsapp.com/t/how-to-detect-an-outside-open-corner/4117>\
**Category:** Scripting\
**Created:** [March 24, 2016, 12:18pm UTC](https://forum.glyphsapp.com/t/how-to-detect-an-outside-open-corner/4117 "2016-03-24T12:18:05Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![oneweioranother](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/oneweioranother/32/273_2.png) [@oneweioranother](https://forum.glyphsapp.com/u/oneweioranother)\
**Post date:** [May 16, 2016, 1:20pm UTC](https://forum.glyphsapp.com/t/how-to-detect-an-outside-open-corner/4117/11 "2016-05-16T13:20:38Z")

</div>

Got it thanks~!

```auto
Glyphs.clearLog()
from GlyphsApp import GSPathPen
thisLayer = Font.selectedLayers[0]

layerPaths = [l for l in thisLayer.paths]

thisLayer.paths = []

for eachPath in layerPaths:
	pen = GSPathPen.alloc().init()
	eachPath.drawInPen_(pen)
	eachPath = pen.layer().paths
	eachPath = eachPath[0]
	thisLayer.addPath_(eachPath)

```

---

_[View the full topic](https://forum.glyphsapp.com/t/how-to-detect-an-outside-open-corner/4117)._
