Exemple #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))
Exemple #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))
Exemple #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)
Exemple #4
0
 def __init__(self, entities, drawing: 'Drawing'):
     entity_space = EntitySpace(drawing.entitydb)
     super(ObjectsSection, self).__init__(entity_space, entities, drawing)
Exemple #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
Exemple #6
0
 def setUp(self):
     self.dwg = DrawingProxy('AC1009')
     self.space = EntitySpace(self.dwg.entitydb)
Exemple #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
Exemple #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
Exemple #9
0
 def __init__(self, tags, drawing):
     super(EntitySection, self).__init__(EntitySpace(drawing.entitydb), tags, drawing)
Exemple #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
Exemple #11
0
 def __init__(self, entities: Iterable['ExtendedTags'], drawing: 'Drawing'):
     super().__init__(EntitySpace(drawing.entitydb), entities, drawing)
Exemple #12
0
def space():
    return EntitySpace(EntityDB())
Exemple #13
0
 def setUp(self):
     self.dwg = DrawingProxy('AC1009')
     self.space = EntitySpace(self.dwg.entitydb)