├── examples ├── __init__.py └── simple_sample.py ├── requirements_dev.txt ├── .gitignore ├── tests ├── __init__.py ├── test_box.py ├── test_svgwriter.py ├── test_point.py ├── test_simple_sample.py ├── test_item.py └── resources │ └── expected_output.svg ├── .gitmodules ├── MANIFEST.in ├── CMakeLists.txt ├── docs ├── develop.md └── media │ └── example_output.svg ├── setup.py ├── README.md ├── src └── main.cpp └── LICENSE /examples/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /requirements_dev.txt: -------------------------------------------------------------------------------- 1 | pytest 2 | pypandoc 3 | pybind11 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | dist/ 3 | _build/ 4 | _generate/ 5 | *.so 6 | *.py[cod] 7 | *.egg-info 8 | *.svg 9 | -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- 1 | from pathlib import Path 2 | 3 | 4 | def here(p: str) -> Path: 5 | return Path(__file__).parent.joinpath(p).resolve() 6 | -------------------------------------------------------------------------------- /tests/test_box.py: -------------------------------------------------------------------------------- 1 | from nest2D import Box 2 | 3 | 4 | def test_box(): 5 | b = Box(150000000, 150000000) 6 | #assert repr(b) == '' # TODO 7 | assert Box.__doc__ == '2D Box point pair' 8 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "lib/pybind11"] 2 | path = lib/pybind11 3 | url = https://github.com/pybind/pybind11.git 4 | [submodule "lib/libnest2d"] 5 | path = lib/libnest2d 6 | url = https://github.com/tamasmeszaros/libnest2d.git 7 | -------------------------------------------------------------------------------- /tests/test_svgwriter.py: -------------------------------------------------------------------------------- 1 | from nest2D import SVGWriter 2 | 3 | 4 | def test_svgwriter(): 5 | sw = SVGWriter() 6 | assert repr(sw) == 'SVGWriter()' 7 | assert SVGWriter.__doc__ == 'SVGWriter tools to write pack_group to SVG.' 8 | 9 | -------------------------------------------------------------------------------- /tests/test_point.py: -------------------------------------------------------------------------------- 1 | from nest2D import Point 2 | 3 | 4 | def test_point(): 5 | p = Point(-5000000, 8954050) 6 | assert repr(p) == 'Point(-5000000, 8954050)' 7 | assert Point.__doc__ == '2D Point' 8 | assert p.x == -5000000 9 | assert p.y == 8954050 10 | 11 | -------------------------------------------------------------------------------- /tests/test_simple_sample.py: -------------------------------------------------------------------------------- 1 | import filecmp 2 | 3 | from examples.simple_sample import add_shape1, add_shape2, main 4 | from . import here 5 | 6 | 7 | def test_simple_sample(): 8 | output_svg = here('../out.svg') 9 | expected_svg = here('resources/expected_output.svg') 10 | 11 | main() 12 | assert filecmp.cmp(output_svg, expected_svg), 'svg output not as expected!' 13 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include README.md LICENSE 2 | global-include CMakeLists.txt *.cmake 3 | recursive-include src * 4 | recursive-include lib/pybind11/include *.h 5 | recursive-include lib/libnest2d/include *.hpp 6 | recursive-include lib/libnest2d/src * 7 | recursive-include lib/libnest2d/tools * 8 | recursive-include lib/libnest2d/external * 9 | recursive-include lib/libnest2d/cmake_modules * 10 | recursive-include lib/libnest2d/LICENSE.txt 11 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.12) 2 | 3 | set(CMAKE_VERBOSE_MAKEFILE ON) 4 | 5 | project(nest2D) 6 | 7 | # Boost and its components 8 | find_package( Boost REQUIRED ) 9 | 10 | if ( NOT Boost_FOUND ) 11 | 12 | message(STATUS "This project requires the Boost library, and will not be compiled.") 13 | 14 | return() 15 | 16 | endif() 17 | 18 | add_subdirectory(lib/pybind11) 19 | add_subdirectory(lib/libnest2d) 20 | 21 | pybind11_add_module(nest2D src/main.cpp) 22 | target_link_libraries(nest2D PUBLIC libnest2d) 23 | -------------------------------------------------------------------------------- /tests/test_item.py: -------------------------------------------------------------------------------- 1 | from nest2D import Point, Item 2 | 3 | 4 | def test_item(): 5 | i1 = Item([ 6 | Point(-5000000, 8954050), 7 | Point(5000000, 8954050), 8 | Point(5000000, -45949), 9 | Point(4972609, -568550), 10 | Point(3500000, -8954050), 11 | Point(-3500000, -8954050), 12 | Point(-4972609, -568550), 13 | Point(-5000000, -45949), 14 | Point(-5000000, 8954050) 15 | ] 16 | ) 17 | assert repr(i1) == 'Item(area: 166258748205509, bin_id: -1, vertices: 9)' 18 | assert Item.__doc__ == 'An item to be placed on a bin.' 19 | -------------------------------------------------------------------------------- /docs/develop.md: -------------------------------------------------------------------------------- 1 | # add git submodule 2 | 3 | ``` bash 4 | $ git submodule add git://some_repository.git some_repository 5 | ``` 6 | 7 | # update git submodule 8 | 9 | 10 | ``` bash 11 | $ cd submodule 12 | $ git checkout v2.4.3 13 | ``` 14 | 15 | 16 | # wrapping cgal video 17 | 18 | https://www.youtube.com/watch?v=YReJ3pSnNDo 19 | code: 20 | https://github.com/rob-smallshire/mesher 21 | 22 | print out the return type: 23 | 24 | https://stackoverflow.com/a/20170989/107907 25 | 26 | m.def("print_faces_iterator_value_type", [](){ 27 | std::cout << type_name= 3.1.0 is required on Windows") 40 | 41 | for ext in self.extensions: 42 | self.build_extension(ext) 43 | 44 | def build_extension(self, ext): 45 | extdir = os.path.abspath(os.path.dirname(self.get_ext_fullpath(ext.name))) 46 | cmake_args = ['-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=' + extdir, 47 | '-DPYTHON_EXECUTABLE=' + sys.executable] 48 | 49 | cfg = 'Debug' if self.debug else 'Release' 50 | build_args = ['--config', cfg] 51 | 52 | if platform.system() == "Windows": 53 | cmake_args += ['-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_{}={}'.format(cfg.upper(), extdir)] 54 | if sys.maxsize > 2**32: 55 | cmake_args += ['-A', 'x64'] 56 | build_args += ['--', '/m'] 57 | else: 58 | cmake_args += ['-DCMAKE_BUILD_TYPE=' + cfg] 59 | build_args += ['--', '-j2'] 60 | 61 | env = os.environ.copy() 62 | env['CXXFLAGS'] = '{} -DVERSION_INFO=\\"{}\\"'.format(env.get('CXXFLAGS', ''), 63 | self.distribution.get_version()) 64 | if not os.path.exists(self.build_temp): 65 | os.makedirs(self.build_temp) 66 | subprocess.check_call(['cmake', ext.sourcedir] + cmake_args, cwd=self.build_temp, env=env) 67 | subprocess.check_call(['cmake', '--build', '.'] + build_args, cwd=self.build_temp) 68 | 69 | setup( 70 | name='nest2D', 71 | version='0.4.3', 72 | author='Mark Fink', 73 | description='2D irregular bin packaging and nesting for python', 74 | long_description=long_description, 75 | ext_modules=[CMakeExtension('nest2D')], 76 | cmdclass=dict(build_ext=CMakeBuild), 77 | zip_safe=False, 78 | ) 79 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Introduction 2 | 3 | Nest2D is a 2D bin packaging tool for python. 4 | 5 | Nest2D works with the C++ libnest2d backend for speed. For python C++ interoperability we use pybind11. 6 | 7 | The library is written in a way that it should be usable out of the box with a very simple interface. The backend is reasonably fast and robust, being built on top of boost geometry and the 8 | [polyclipping](http://www.angusj.com/delphi/clipper.php) library. 9 | 10 | 11 | # Example 12 | 13 | A simple example may be the best way to demonstrate the usage of the library. 14 | 15 | ``` python 16 | from nest2D import Point, Box, Item, nest, SVGWriter 17 | 18 | def add_shape1(n, items): 19 | for i in range(n): 20 | item = Item([ 21 | Point(-5000000, 8954050), 22 | Point(5000000, 8954050), 23 | Point(5000000, -45949), 24 | Point(4972609, -568550), 25 | Point(3500000, -8954050), 26 | Point(-3500000, -8954050), 27 | Point(-4972609, -568550), 28 | Point(-5000000, -45949), 29 | Point(-5000000, 8954050) 30 | ]) 31 | items.append(item) 32 | 33 | def add_shape2(n, items): 34 | for i in range(n): 35 | item = Item([ 36 | Point(-11750000, 13057900), 37 | Point(-9807860, 15000000), 38 | Point(4392139, 24000000), 39 | Point(11750000, 24000000), 40 | Point(11750000, -24000000), 41 | Point(4392139, -24000000), 42 | Point(-9807860, -15000000), 43 | Point(-11750000, -13057900), 44 | Point(-11750000, 13057900) 45 | ]) 46 | items.append(item) 47 | 48 | def main(): 49 | box = Box(150000000, 150000000) 50 | input = [] 51 | add_shape1(23, input) 52 | add_shape2(15, input) 53 | 54 | pgrp = nest(input, box) 55 | 56 | sw = SVGWriter() 57 | sw.write_packgroup(pgrp) 58 | sw.save() 59 | ``` 60 | 61 | It is worth to note that the type of the polygon carried by the Item objects is 62 | the type defined as a polygon by the geometry backend. In the example we use the 63 | clipper backend and clipper works with integer coordinates. 64 | 65 | 66 | ## Example call 67 | 68 | ``` bash 69 | $ pip install nest2D 70 | $ python examples/simple_sample.py 71 | ``` 72 | 73 | ## Example output 74 | 75 | ![Alt text](https://raw.githubusercontent.com/markfink/nest2d/master/docs/media/example_output.svg?sanitize=true) 76 | 77 | 78 | ## License 79 | 80 | Unfortunately libnest2d is provided with a contractible GPL type license so we can not release this with better license terms. Details can be found in the LICENSE file. By using, distributing, or contributing to this project, you agree to the 81 | terms and conditions of this license. 82 | 83 | 84 | # References 85 | 86 | - [pybind11](https://github.com/pybind/pybind11) 87 | - [libnest2d](https://github.com/tamasmeszaros/libnest2d) 88 | - [SVGNest](https://github.com/Jack000/SVGnest) 89 | - [An effective heuristic for the two-dimensional irregular 90 | bin packing problem](http://www.cs.stir.ac.uk/~goc/papers/EffectiveHueristic2DAOR2013.pdf) 91 | - [Complete and robust no-fit polygon generation for the irregular stock cutting problem](https://www.sciencedirect.com/science/article/abs/pii/S0377221706001639) 92 | -------------------------------------------------------------------------------- /src/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include 5 | 6 | #include "../tools/printer_parts.hpp" 7 | #include "../tools/svgtools.hpp" 8 | 9 | 10 | namespace py = pybind11; 11 | 12 | using Point = libnest2d::Point; 13 | using Box = libnest2d::Box; 14 | using Item = libnest2d::Item; 15 | using PackGroup = libnest2d::PackGroup; 16 | using SVGWriter = libnest2d::svg::SVGWriter; 17 | 18 | PYBIND11_MODULE(nest2D, m) 19 | { 20 | m.doc() = "2D irregular bin packaging and nesting for python"; 21 | 22 | py::class_(m, "Point", "2D Point") 23 | .def(py::init(), py::arg("x"), py::arg("y")) 24 | //.def_property_readonly("x", &Point::X) 25 | .def_property_readonly("x", [](const Point &p) { return p.X; }) 26 | .def_property_readonly("y", [](const Point &p) { return p.Y; }) 27 | .def("__repr__", 28 | [](const Point &p) { 29 | std::string r("Point("); 30 | r += boost::lexical_cast(p.X); 31 | r += ", "; 32 | r += boost::lexical_cast(p.Y); 33 | r += ")"; 34 | return r; 35 | } 36 | ) 37 | .def("__eq__", 38 | [](const Point &p, const Point & q) { 39 | return p == q; 40 | } 41 | ); 42 | 43 | // see lib/libnest2d/include/libnest2d/geometry_traits.hpp 44 | py::class_(m, "Box", "2D Box point pair") 45 | //.def(py::init()) 46 | // custom constructor to define box center 47 | .def(py::init([](int x, int y) { 48 | return std::unique_ptr(new Box(x, y, {x/2, y/2})); 49 | })) 50 | ; 51 | 52 | // Item is a shape defined by points 53 | // see lib/libnest2d/include/libnest2d/nester.hpp 54 | py::class_(m, "Item", "An item to be placed on a bin.") 55 | .def(py::init>()) 56 | .def("__repr__", 57 | [](const Item &i) { 58 | std::string r("Item(area: "); 59 | r += boost::lexical_cast(i.area()); 60 | r += ", bin_id: "; 61 | r += boost::lexical_cast(i.binId()); 62 | r += ", vertices: "; 63 | r += boost::lexical_cast(i.vertexCount()); 64 | r += ")"; 65 | return r; 66 | } 67 | ) 68 | ; 69 | 70 | // The nest function takes two parameters input and box 71 | // see lib/libnest2d/include/libnest2d/libnest2d.hpp 72 | m.def("nest", [](std::vector& input, const Box& box) { 73 | size_t bins = libnest2d::nest(input, box); 74 | 75 | PackGroup pgrp(bins); 76 | 77 | for (Item &itm : input) { 78 | if (itm.binId() >= 0) pgrp[size_t(itm.binId())].emplace_back(itm); 79 | //py::print("bin_id: ", itm.binId()); 80 | //py::print("vertices: ", itm.vertexCount()); 81 | } 82 | 83 | //return pgrp; 84 | // we need to convert c++ type to python using py::cast 85 | py::object obj = py::cast(pgrp); 86 | return obj; 87 | }, 88 | py::arg("input"), 89 | py::arg("box"), 90 | "Nest and pack the input items into the box bin." 91 | ) 92 | ; 93 | 94 | py::class_(m, "SVGWriter", "SVGWriter tools to write pack_group to SVG.") 95 | .def(py::init([]() { 96 | // custom constructor 97 | SVGWriter::Config conf; 98 | conf.mm_in_coord_units = libnest2d::mm(); 99 | return std::unique_ptr(new SVGWriter(conf)); 100 | })) 101 | .def("write_packgroup", [](SVGWriter & sw, const PackGroup & pgrp) { 102 | sw.setSize(Box(libnest2d::mm(250), libnest2d::mm(210))); // TODO make own call 103 | sw.writePackGroup(pgrp); 104 | }) 105 | .def("save", [](SVGWriter & sw) { 106 | sw.save("out"); 107 | }) 108 | .def("__repr__", 109 | [](const SVGWriter &sw) { 110 | std::string r("SVGWriter("); 111 | r += ")"; 112 | return r; 113 | } 114 | ); 115 | 116 | } 117 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU LESSER GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | 9 | This version of the GNU Lesser General Public License incorporates 10 | the terms and conditions of version 3 of the GNU General Public 11 | License, supplemented by the additional permissions listed below. 12 | 13 | 0. Additional Definitions. 14 | 15 | As used herein, "this License" refers to version 3 of the GNU Lesser 16 | General Public License, and the "GNU GPL" refers to version 3 of the GNU 17 | General Public License. 18 | 19 | "The Library" refers to a covered work governed by this License, 20 | other than an Application or a Combined Work as defined below. 21 | 22 | An "Application" is any work that makes use of an interface provided 23 | by the Library, but which is not otherwise based on the Library. 24 | Defining a subclass of a class defined by the Library is deemed a mode 25 | of using an interface provided by the Library. 26 | 27 | A "Combined Work" is a work produced by combining or linking an 28 | Application with the Library. The particular version of the Library 29 | with which the Combined Work was made is also called the "Linked 30 | Version". 31 | 32 | The "Minimal Corresponding Source" for a Combined Work means the 33 | Corresponding Source for the Combined Work, excluding any source code 34 | for portions of the Combined Work that, considered in isolation, are 35 | based on the Application, and not on the Linked Version. 36 | 37 | The "Corresponding Application Code" for a Combined Work means the 38 | object code and/or source code for the Application, including any data 39 | and utility programs needed for reproducing the Combined Work from the 40 | Application, but excluding the System Libraries of the Combined Work. 41 | 42 | 1. Exception to Section 3 of the GNU GPL. 43 | 44 | You may convey a covered work under sections 3 and 4 of this License 45 | without being bound by section 3 of the GNU GPL. 46 | 47 | 2. Conveying Modified Versions. 48 | 49 | If you modify a copy of the Library, and, in your modifications, a 50 | facility refers to a function or data to be supplied by an Application 51 | that uses the facility (other than as an argument passed when the 52 | facility is invoked), then you may convey a copy of the modified 53 | version: 54 | 55 | a) under this License, provided that you make a good faith effort to 56 | ensure that, in the event an Application does not supply the 57 | function or data, the facility still operates, and performs 58 | whatever part of its purpose remains meaningful, or 59 | 60 | b) under the GNU GPL, with none of the additional permissions of 61 | this License applicable to that copy. 62 | 63 | 3. Object Code Incorporating Material from Library Header Files. 64 | 65 | The object code form of an Application may incorporate material from 66 | a header file that is part of the Library. You may convey such object 67 | code under terms of your choice, provided that, if the incorporated 68 | material is not limited to numerical parameters, data structure 69 | layouts and accessors, or small macros, inline functions and templates 70 | (ten or fewer lines in length), you do both of the following: 71 | 72 | a) Give prominent notice with each copy of the object code that the 73 | Library is used in it and that the Library and its use are 74 | covered by this License. 75 | 76 | b) Accompany the object code with a copy of the GNU GPL and this license 77 | document. 78 | 79 | 4. Combined Works. 80 | 81 | You may convey a Combined Work under terms of your choice that, 82 | taken together, effectively do not restrict modification of the 83 | portions of the Library contained in the Combined Work and reverse 84 | engineering for debugging such modifications, if you also do each of 85 | the following: 86 | 87 | a) Give prominent notice with each copy of the Combined Work that 88 | the Library is used in it and that the Library and its use are 89 | covered by this License. 90 | 91 | b) Accompany the Combined Work with a copy of the GNU GPL and this license 92 | document. 93 | 94 | c) For a Combined Work that displays copyright notices during 95 | execution, include the copyright notice for the Library among 96 | these notices, as well as a reference directing the user to the 97 | copies of the GNU GPL and this license document. 98 | 99 | d) Do one of the following: 100 | 101 | 0) Convey the Minimal Corresponding Source under the terms of this 102 | License, and the Corresponding Application Code in a form 103 | suitable for, and under terms that permit, the user to 104 | recombine or relink the Application with a modified version of 105 | the Linked Version to produce a modified Combined Work, in the 106 | manner specified by section 6 of the GNU GPL for conveying 107 | Corresponding Source. 108 | 109 | 1) Use a suitable shared library mechanism for linking with the 110 | Library. A suitable mechanism is one that (a) uses at run time 111 | a copy of the Library already present on the user's computer 112 | system, and (b) will operate properly with a modified version 113 | of the Library that is interface-compatible with the Linked 114 | Version. 115 | 116 | e) Provide Installation Information, but only if you would otherwise 117 | be required to provide such information under section 6 of the 118 | GNU GPL, and only to the extent that such information is 119 | necessary to install and execute a modified version of the 120 | Combined Work produced by recombining or relinking the 121 | Application with a modified version of the Linked Version. (If 122 | you use option 4d0, the Installation Information must accompany 123 | the Minimal Corresponding Source and Corresponding Application 124 | Code. If you use option 4d1, you must provide the Installation 125 | Information in the manner specified by section 6 of the GNU GPL 126 | for conveying Corresponding Source.) 127 | 128 | 5. Combined Libraries. 129 | 130 | You may place library facilities that are a work based on the 131 | Library side by side in a single library together with other library 132 | facilities that are not Applications and are not covered by this 133 | License, and convey such a combined library under terms of your 134 | choice, if you do both of the following: 135 | 136 | a) Accompany the combined library with a copy of the same work based 137 | on the Library, uncombined with any other library facilities, 138 | conveyed under the terms of this License. 139 | 140 | b) Give prominent notice with the combined library that part of it 141 | is a work based on the Library, and explaining where to find the 142 | accompanying uncombined form of the same work. 143 | 144 | 6. Revised Versions of the GNU Lesser General Public License. 145 | 146 | The Free Software Foundation may publish revised and/or new versions 147 | of the GNU Lesser General Public License from time to time. Such new 148 | versions will be similar in spirit to the present version, but may 149 | differ in detail to address new problems or concerns. 150 | 151 | Each version is given a distinguishing version number. If the 152 | Library as you received it specifies that a certain numbered version 153 | of the GNU Lesser General Public License "or any later version" 154 | applies to it, you have the option of following the terms and 155 | conditions either of that published version or of any later version 156 | published by the Free Software Foundation. If the Library as you 157 | received it does not specify a version number of the GNU Lesser 158 | General Public License, you may choose any version of the GNU Lesser 159 | General Public License ever published by the Free Software Foundation. 160 | 161 | If the Library as you received it specifies that a proxy can decide 162 | whether future versions of the GNU Lesser General Public License shall 163 | apply, that proxy's public statement of acceptance of any version is 164 | permanent authorization for you to choose that version for the 165 | Library. 166 | -------------------------------------------------------------------------------- /tests/resources/expected_output.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /docs/media/example_output.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | --------------------------------------------------------------------------------