import math
+from ModelAPI import *
from SketchAPI import *
from GeomAPI import *
from SAMConverter_Logger import logger
return ShapertoSAMPrimitive.convert_circle(entity)
if entity_type == 'SketchLine':
return ShapertoSAMPrimitive.convert_line(entity)
+ if entity_type == 'SketchProjection':
+ return ShapertoSAMPrimitive.convert_projection(entity)
+ if entity_type == 'SketchIntersection':
+ return ShapertoSAMPrimitive.convert_intersection(entity)
return None, {}
def check_construction(entity):
angles= [start_angle, end_angle])
arc.add_points_startend()
return arc, {(c.x(), c.y(), feat.name()) : arc.center}
+
+ # Not need convert to SAM
+ def convert_intersection(entity):
+ return None, {}
+
+ # Not need convert to SAM
+ def convert_projection(entity):
+ feature_feat = entity.feature()
+ feat = ModelAPI.objectToFeature(feature_feat)
+ attr = feat.refattr("ProjectedFeature")
+
+ proj_feat = ModelAPI_Feature.feature(attr.object())
+ proj_entity = SketchAPI_SketchEntity(proj_feat)
+ entity_type = proj_entity.getKind()
+
+ return None, {}
import ModelAPI
import EventsAPI
+
from SketchAPI import *
import salome
from salome.shaper import model
-from GeomDataAPI import *
-from ModelAPI import *
-import math
+
import os
## @ingroup Plugins
'SketchPoint',
'SketchArc',
'SketchCircle',
- 'SketchLine']
+ 'SketchLine',
+ # Next entities not compability with SAM, but it's avaliable elements
+ 'SketchProjection',
+ 'SketchIntersection']
nonConvertablePrimitive = []
nonConvertableConstraint = []