modeling/src/operations/extrusions/slice/create.js

  1. /**
  2. * Represents a 3D geometry consisting of a list of edges.
  3. * @typedef {Object} slice
  4. * @property {Array} edges - list of edges, each edge containing two points (3D)
  5. */
  6. /**
  7. * Creates a new empty slice.
  8. *
  9. * @returns {slice} a new slice
  10. * @alias module:modeling/extrusions/slice.create
  11. */
  12. const create = (edges) => {
  13. if (!edges) {
  14. edges = []
  15. }
  16. return { edges }
  17. }
  18. module.exports = create