@@ -69,12 +69,11 @@ Compressed::make_rep_id (const RegularArray &array, const std::vector<db::Vector
6969
7070template <class Obj >
7171void
72- Compressed::write_shape (const db::Shape &shape, const db::Vector &disp, RegularArray ®ular, std::vector<db::Vector> &irregular_array)
72+ Compressed::write_shape (const db::Shape &shape, RegularArray ®ular, std::vector<db::Vector> &irregular_array)
7373{
7474 Obj sh;
7575 shape.instantiate (sh);
7676 if (! object_is_empty (sh)) {
77- sh.move (disp);
7877 if (shape.prop_id () != 0 ) {
7978 write (db::object_with_properties<Obj> (sh, shape.prop_id ()), regular, irregular_array);
8079 } else {
@@ -115,27 +114,26 @@ Compressed::compress_shapes (const db::Shapes &shapes, unsigned int level, bool
115114 std::vector<db::Vector> irregular_array;
116115
117116 bool transfer_array = (shape.in_array () && level > 0 );
118- db::Vector disp;
119117 if (transfer_array) {
120- disp = create_repetition (shape.array (), array, irregular_array);
118+ create_repetition (shape.array (), array, irregular_array);
121119 }
122120
123121 if (shape->is_simple_polygon ()) {
124- write_shape<db::SimplePolygon> (*shape, disp, array, irregular_array);
122+ write_shape<db::SimplePolygon> (*shape, array, irregular_array);
125123 } else if (shape->is_polygon ()) {
126- write_shape<db::Polygon> (*shape, disp, array, irregular_array);
124+ write_shape<db::Polygon> (*shape, array, irregular_array);
127125 } else if (shape->is_path ()) {
128- write_shape<db::Path> (*shape, disp, array, irregular_array);
126+ write_shape<db::Path> (*shape, array, irregular_array);
129127 } else if (shape->is_text ()) {
130- write_shape<db::Text> (*shape, disp, array, irregular_array);
128+ write_shape<db::Text> (*shape, array, irregular_array);
131129 } else if (shape->is_edge ()) {
132- write_shape<db::Edge> (*shape, disp, array, irregular_array);
130+ write_shape<db::Edge> (*shape, array, irregular_array);
133131 } else if (shape->is_edge_pair ()) {
134- write_shape<db::EdgePair> (*shape, disp, array, irregular_array);
132+ write_shape<db::EdgePair> (*shape, array, irregular_array);
135133 } else if (shape->is_box ()) {
136- write_shape<db::Box> (*shape, disp, array, irregular_array);
134+ write_shape<db::Box> (*shape, array, irregular_array);
137135 } else if (shape->is_point ()) {
138- write_shape<db::Point> (*shape, disp, array, irregular_array);
136+ write_shape<db::Point> (*shape, array, irregular_array);
139137 } else if (shape->is_user_object ()) {
140138 // ignore
141139 } else {
@@ -486,9 +484,9 @@ Compressed::compress_instances (const db::Cell::const_iterator &begin_instances,
486484
487485 db::CellInstArray single_inst;
488486 if (! inst_array.is_complex ()) {
489- single_inst = db::CellInstArray (inst_array.object (), db::Trans (- disp) * inst_array.front ());
487+ single_inst = db::CellInstArray (inst_array.object (), db::Trans (disp) * inst_array.front ());
490488 } else {
491- single_inst = db::CellInstArray (inst_array.object (), inst_array.complex_trans (db::Trans (- disp) * inst_array.front ()));
489+ single_inst = db::CellInstArray (inst_array.object (), inst_array.complex_trans (db::Trans (disp) * inst_array.front ()));
492490 }
493491
494492 // no compression -> just keep as is
0 commit comments