Exemplo n.º 1
0
class TestEntitySpace(unittest.TestCase):
    def setUp(self):
        self.dwg = DrawingProxy('AC1009')
        self.space = EntitySpace(self.dwg.entitydb)

    def test_add(self):
        for group in group_tags(internal_tag_compiler(TESTENTITIES)):
            self.space.store_tags(group)
        self.assertEqual(4, len(self.space))
Exemplo n.º 2
0
class TestEntitySpace(unittest.TestCase):
    def setUp(self):
        self.dwg = DrawingProxy('AC1009')
        self.space = EntitySpace(self.dwg.entitydb)

    def test_add(self):
        for group in TagGroups.from_text(TESTENTITIES):
            self.space.store_tags(group)
        self.assertEqual(4, len(self.space))
Exemplo n.º 3
0
 def write(self, tagwriter: 'TagWriter'):
     # BLOCK section: do not write content of model space and active layout
     if self.name.upper() in ('*MODEL_SPACE', '*PAPER_SPACE'):
         save = self._entity_space
         self._entity_space = EntitySpace(self.entitydb)
         super(BlockLayout, self).write(tagwriter)
         self._entity_space = save
     else:
         super(BlockLayout, self).write(tagwriter)
Exemplo n.º 4
0
 def __init__(self, entities, drawing: 'Drawing'):
     entity_space = EntitySpace(drawing.entitydb)
     super(ObjectsSection, self).__init__(entity_space, entities, drawing)
Exemplo n.º 5
0
 def __init__(self, entitydb, dxffactory, block_handle, endblk_handle):
     super(DXF12BlockLayout, self).__init__(dxffactory,
                                            EntitySpace(entitydb))
     self._block_handle = block_handle
     self._endblk_handle = endblk_handle
Exemplo n.º 6
0
 def setUp(self):
     self.dwg = DrawingProxy('AC1009')
     self.space = EntitySpace(self.dwg.entitydb)
Exemplo n.º 7
0
 def active_layout_entities(self):
     # required for the drawing setup process
     es = EntitySpace(self.entitydb)
     es.extend(self._filter_entities(paper_space=1))
     return es
Exemplo n.º 8
0
 def model_space_entities(self):
     # required for the drawing setup process
     es = EntitySpace(self.entitydb)
     es.extend(self._filter_entities(paper_space=0))
     return es
Exemplo n.º 9
0
 def __init__(self, tags, drawing):
     super(EntitySection, self).__init__(EntitySpace(drawing.entitydb), tags, drawing)
Exemplo n.º 10
0
 def __init__(self, entitydb: 'EntityDB', dxffactory: 'DXFFactoryType',
              block_handle: str, endblk_handle: str):
     super(DXF12BlockLayout, self).__init__(dxffactory,
                                            EntitySpace(entitydb))
     self._block_handle = block_handle
     self._endblk_handle = endblk_handle
Exemplo n.º 11
0
 def __init__(self, entities: Iterable['ExtendedTags'], drawing: 'Drawing'):
     super().__init__(EntitySpace(drawing.entitydb), entities, drawing)
Exemplo n.º 12
0
def space():
    return EntitySpace(EntityDB())
Exemplo n.º 13
0
 def setUp(self):
     self.dwg = DrawingProxy('AC1009')
     self.space = EntitySpace(self.dwg.entitydb)