Changeset View
Changeset View
Standalone View
Standalone View
io_export_dxf/primitive_exporters/mesh_exporter.py
| Context not available. | |||||
| drawing.addBlock(me.name, flag=0,base=(0,0,0),entities=entities) | drawing.addBlock(me.name, flag=0,base=(0,0,0),entities=entities) | ||||
| # block = DXF.Block(insert_name,flag=0,base=(0,0,0),entities=entities) | # block = DXF.Block(insert_name,flag=0,base=(0,0,0),entities=entities) | ||||
| # write INSERT as entity | # write INSERT as entity | ||||
| entities = self._writeInsert(ob, mx, me.name, **(kwargs)) | entities = self._writeInsert(ob, mx, me.name, **kwargs) | ||||
| else: # no other instances, so go the standard way | else: # no other instances, so go the standard way | ||||
| return self._standard_way(drawing, me, mx, mx_n) | return self._standard_way(drawing, me, mx, mx_n) | ||||
| Context not available. | |||||
| def _writeInsert(self, drawing, ob, mx, insert_name, **kwargs): | def _writeInsert(self, drawing, ob, mx, insert_name, **kwargs): | ||||
| from insert_exporter import InsertDXFExporter | from insert_exporter import InsertDXFExporter | ||||
| ex = InsertDXFExporter(self._settings) | ex = InsertDXFExporter(self._settings) | ||||
| ex.export(drawing, ob, mx, insert_name, **(kwargs)) | ex.export(drawing, ob, mx, insert_name, **kwargs) | ||||
| def _getMeshData(self, ctx, obj, settings): | def _getMeshData(self, ctx, obj, settings): | ||||
| if obj.modifiers and settings['apply_modifiers']: | if obj.modifiers and settings['apply_modifiers']: | ||||
| Context not available. | |||||
| entities = self._writeMeshEntities(allpoints, edges, faces, **kwargs) | entities = self._writeMeshEntities(allpoints, edges, faces, **kwargs) | ||||
| # TODO: rewrite | # TODO: rewrite | ||||
| for type, args in entities: | for type, args in entities: | ||||
| drawing.addEntity(type, **(args)) | drawing.addEntity(type, **args) | ||||
| return True | return True | ||||
| def _writeMeshEntities(self, allpoints, edges, faces, **kwargs): | def _writeMeshEntities(self, allpoints, edges, faces, **kwargs): | ||||
| Context not available. | |||||