complete rest of the functon to gen polygons

finished the rest of fuctons to gen the polygons
add polygon to the cad files
todo:
transfer function should be rewrite ,becuse the points of the polygon
should be moved too.