Edit
- We locate the level of the last
GraphicsGroupand useDeleteto delete it's upper level byMost. - And
DeleteCasestheLine.
indexs = Position[reg, GraphicsGroup]; reg1 = Delete[reg, indexs // Last // Most]; DeleteCases[reg1, _Line, -1] Original
Another possible way.
- We add
FaceForm[]to the lastGraphicsGroupto erase the surface and replaceLinetoNothingto erase all the lines.
Insert[reg, FaceForm[], Position[reg, GraphicsGroup[_]] // Last] /. Line -> Nothing - Or
ReplacePartthe lastGraphicsGrouptoNothing.
ReplacePart[reg, GraphicsGroup -> Nothing, Position[reg, GraphicsGroup[_]] // Last] /. Line -> Nothing 