How to use the @jscad/core/utils/mergeSolids.mergeSolids function in @jscad/core

To help you get started, we’ve selected a few @jscad/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jscad / OpenJSCAD.org / packages / web / src / jscad / processor.js View on Github external
updateView: function () {
    var startpoint = parseInt(document.getElementById('startRange').value, 10)
    var endpoint = parseInt(document.getElementById('endRange').value, 10)
    if (startpoint === this.selectStartPoint && endpoint === this.selectEndPoint) { return }

    // build a list of objects to view
    this.selectStartPoint = startpoint
    this.selectEndPoint = endpoint
    if (startpoint > endpoint) { startpoint = this.selectEndPoint; endpoint = this.selectStartPoint }

    var objs = this.currentObjects.slice(startpoint, endpoint + 1)
    this.viewedObject = mergeSolids(objs)

    if (this.viewer) {
      this.viewer.setCsg(this.viewedObject)
    }
  },