# Author: Sergey Pokhodenko
# Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+import ModelHighAPI
def addPolyline(sketch, *coords):
"""Add a poly-line to sketch.
def dof(sketch):
""" Extract degrees of freedom for the given sketch
"""
- return int(filter(str.isdigit, sketch.string("SolverDOF").value()))
\ No newline at end of file
+ aSketch = sketch
+ if issubclass(type(aSketch), ModelHighAPI.ModelHighAPI_Interface):
+ aSketch = sketch.feature()
+ return int(filter(str.isdigit, aSketch.string("SolverDOF").value()))
\ No newline at end of file