Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'io_import_dxf/dxfgrabber/entitysection.py')
-rw-r--r--[-rwxr-xr-x]io_import_dxf/dxfgrabber/entitysection.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/io_import_dxf/dxfgrabber/entitysection.py b/io_import_dxf/dxfgrabber/entitysection.py
index e87bbb46..cd717c56 100755..100644
--- a/io_import_dxf/dxfgrabber/entitysection.py
+++ b/io_import_dxf/dxfgrabber/entitysection.py
@@ -8,8 +8,8 @@ __author__ = "mozman <mozman@gmx.at>"
from itertools import islice
from .tags import TagGroups, DXFStructureError
-from .tags import ClassifiedTags
-from .entities import entity_factory
+from .tags import Tags
+from .dxfentities import entity_factory
class EntitySection(object):
@@ -21,7 +21,7 @@ class EntitySection(object):
@classmethod
def from_tags(cls, tags, drawing):
entity_section = cls()
- entity_section._build(tags, drawing.dxfversion)
+ entity_section._build(tags)
return entity_section
def get_entities(self):
@@ -40,21 +40,21 @@ class EntitySection(object):
# end of public interface
- def _build(self, tags, dxfversion):
+ def _build(self, tags):
if len(tags) == 3: # empty entities section
return
groups = TagGroups(islice(tags, 2, len(tags)-1))
- self._entities = build_entities(groups, dxfversion)
+ self._entities = build_entities(groups)
class ObjectsSection(EntitySection):
name = 'objects'
-def build_entities(tag_groups, dxfversion):
+def build_entities(tag_groups):
def build_entity(group):
try:
- entity = entity_factory(ClassifiedTags(group), dxfversion)
+ entity = entity_factory(Tags(group))
except KeyError:
entity = None # ignore unsupported entities
return entity
@@ -71,7 +71,7 @@ def build_entities(tag_groups, dxfversion):
collector = None
else:
collector.append(entity)
- elif entity.dxftype == 'POLYLINE':
+ elif entity.dxftype in ('POLYLINE', 'POLYFACE', 'POLYMESH'):
collector = _Collector(entity)
elif entity.dxftype == 'INSERT' and entity.attribsfollow:
collector = _Collector(entity)