/* * Copyright (c) 2011 by RibbonSoft, GmbH. All rights reserved. * * This file is part of the QCAD project. * * Licensees holding valid QCAD Professional Edition licenses * may use this file in accordance with the QCAD License * Agreement provided with the Software. * * This file is provided AS IS with NO WARRANTY OF ANY KIND, * INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE. * * See http://www.ribbonsoft.com for further details. */ include("../Modify.js"); include("scripts/Block/Block.js"); include("scripts/ShapeAlgorithms.js"); function Explode(guiAction) { Modify.call(this, guiAction); } Explode.prototype = new Modify(); Explode.prototype.beginEvent = function() { Modify.prototype.beginEvent.call(this); var di = this.getDocumentInterface(); var document = this.getDocument(); var storage = document.getStorage(); var ids = document.querySelectedEntities(); var i, k, e; var polyline, shapes, shape; var op = new RMixedOperation(); for (i=0; i0) { for (k=0; k0) { polyline = new RPolyline(); polyline.appendVertex(segments[0].getStartPoint()); for (k=0; k