Skip to content

Commit

Permalink
docs: the returned geometries are not always new
Browse files Browse the repository at this point in the history
  • Loading branch information
platypii committed Feb 1, 2023
1 parent 35217fe commit 7a83c67
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 24 deletions.
4 changes: 2 additions & 2 deletions packages/modeling/src/operations/booleans/intersect.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import intersectGeom2 from './intersectGeom2.js'
import intersectGeom3 from './intersectGeom3.js'

/**
* Return a new geometry representing space in both the first geometry and
* Return a geometry representing space in both the first geometry and
* all subsequent geometries.
* The given geometries should be of the same type, either geom2 or geom3.
*
* @param {...Object} geometries - list of geometries
* @returns {geom2|geom3} a new geometry
* @returns {geom2|geom3} a geometry
* @alias module:modeling/booleans.intersect
*
* @example
Expand Down
4 changes: 2 additions & 2 deletions packages/modeling/src/operations/booleans/intersectGeom2.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import { INTERSECTION } from './martinez/operation.js'
import boolean from './martinez/index.js'

/*
* Return a new 2D geometry representing space in both the first geometry and
* Return a 2D geometry representing space in both the first geometry and
* in the subsequent geometries. None of the given geometries are modified.
* @param {...geom2} geometries - list of 2D geometries
* @returns {geom2} new 2D geometry
* @returns {geom2} a 2D geometry
*/
export const intersectGeom2 = (...geometries) => {
geometries = flatten(geometries)
Expand Down
4 changes: 2 additions & 2 deletions packages/modeling/src/operations/booleans/intersectGeom3.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import retessellate from '../modifiers/retessellate.js'
import intersectSub from './intersectGeom3Sub.js'

/*
* Return a new 3D geometry representing space in both the first geometry and
* Return a 3D geometry representing space in both the first geometry and
* in the subsequent geometries. None of the given geometries are modified.
* @param {...geom3} geometries - list of 3D geometries
* @returns {geom3} new 3D geometry
* @returns {geom3} a 3D geometry
*/
export const intersectGeom3 = (...geometries) => {
geometries = flatten(geometries)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import { Tree } from './trees/index.js'
import mayOverlap from './mayOverlap.js'

/*
* Return a new 3D geometry representing the space in both the first geometry and
* Return a 3D geometry representing the space in both the first geometry and
* the second geometry. None of the given geometries are modified.
* @param {geom3} geometry1 - a geometry
* @param {geom3} geometry2 - a geometry
* @returns {geom3} new 3D geometry
* @returns {geom3} a 3D geometry
*/
export const intersectGeom3Sub = (geometry1, geometry2) => {
if (!mayOverlap(geometry1, geometry2)) {
Expand Down
4 changes: 2 additions & 2 deletions packages/modeling/src/operations/booleans/subtract.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import subtractGeom2 from './subtractGeom2.js'
import subtractGeom3 from './subtractGeom3.js'

/**
* Return a new geometry representing space in the first geometry but
* Return a geometry representing space in the first geometry but
* not in all subsequent geometries.
* The given geometries should be of the same type, either geom2 or geom3.
*
* @param {...Object} geometries - list of geometries
* @returns {geom2|geom3} a new geometry
* @returns {geom2|geom3} a geometry
* @alias module:modeling/booleans.subtract
*
* @example
Expand Down
4 changes: 2 additions & 2 deletions packages/modeling/src/operations/booleans/subtractGeom2.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import { DIFFERENCE } from './martinez/operation.js'
import boolean from './martinez/index.js'

/*
* Return a new 2D geometry representing space in the first geometry but
* Return a 2D geometry representing space in the first geometry but
* not in the subsequent geometries. None of the given geometries are modified.
* @param {...geom2} geometries - list of geometries
* @returns {geom2} new 2D geometry
* @returns {geom2} a 2D geometry
*/
export const subtractGeom2 = (...geometries) => {
geometries = flatten(geometries)
Expand Down
4 changes: 2 additions & 2 deletions packages/modeling/src/operations/booleans/subtractGeom3.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import retessellate from '../modifiers/retessellate.js'
import subtractSub from './subtractGeom3Sub.js'

/*
* Return a new 3D geometry representing space in this geometry but not in the given geometries.
* Return a 3D geometry representing space in this geometry but not in the given geometries.
* Neither this geometry nor the given geometries are modified.
* @param {...geom3} geometries - list of geometries
* @returns {geom3} new 3D geometry
* @returns {geom3} a 3D geometry
*/
export const subtractGeom3 = (...geometries) => {
geometries = flatten(geometries)
Expand Down
4 changes: 2 additions & 2 deletions packages/modeling/src/operations/booleans/subtractGeom3Sub.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import { Tree } from './trees/index.js'
import mayOverlap from './mayOverlap.js'

/*
* Return a new 3D geometry representing the space in the first geometry but not
* Return a 3D geometry representing the space in the first geometry but not
* in the second geometry. None of the given geometries are modified.
* @param {geom3} geometry1 - a geometry
* @param {geom3} geometry2 - a geometry
* @returns {geom3} new 3D geometry
* @returns {geom3} a 3D geometry
*/
export const subtractGeom3Sub = (geometry1, geometry2) => {
if (!mayOverlap(geometry1, geometry2)) {
Expand Down
4 changes: 2 additions & 2 deletions packages/modeling/src/operations/booleans/union.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import unionGeom2 from './unionGeom2.js'
import unionGeom3 from './unionGeom3.js'

/**
* Return a new geometry representing the total space in the given geometries.
* Return a geometry representing the total space in the given geometries.
* The given geometries should be of the same type, either geom2 or geom3.
*
* @param {...Object} geometries - list of geometries
* @returns {geom2|geom3} a new geometry
* @returns {geom2|geom3} a geometry
* @alias module:modeling/booleans.union
*
* @example
Expand Down
4 changes: 2 additions & 2 deletions packages/modeling/src/operations/booleans/unionGeom2.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import { UNION } from './martinez/operation.js'
import boolean from './martinez/index.js'

/*
* Return a new 2D geometry representing the total space in the given 2D geometries.
* Return a 2D geometry representing the total space in the given 2D geometries.
* @param {...geom2} geometries - list of 2D geometries to union
* @returns {geom2} new 2D geometry
* @returns {geom2} a 2D geometry
*/
export const unionGeom2 = (...geometries) => {
geometries = flatten(geometries)
Expand Down
4 changes: 2 additions & 2 deletions packages/modeling/src/operations/booleans/unionGeom3.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import retessellate from '../modifiers/retessellate.js'
import unionSub from './unionGeom3Sub.js'

/*
* Return a new 3D geometry representing the space in the given 3D geometries.
* Return a 3D geometry representing the space in the given 3D geometries.
* @param {...objects} geometries - list of geometries to union
* @returns {geom3} new 3D geometry
* @returns {geom3} a 3D geometry
*/
export const unionGeom3 = (...geometries) => {
geometries = flatten(geometries)
Expand Down
4 changes: 2 additions & 2 deletions packages/modeling/src/operations/booleans/unionGeom3Sub.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import { Tree } from './trees/index.js'
import mayOverlap from './mayOverlap.js'

/*
* Return a new 3D geometry representing the space in the given geometries.
* Return a 3D geometry representing the space in the given geometries.
* @param {geom3} geometry1 - geometry to union
* @param {geom3} geometry2 - geometry to union
* @returns {geom3} new 3D geometry
* @returns {geom3} a 3D geometry
*/
export const unionGeom3Sub = (geometry1, geometry2) => {
if (!mayOverlap(geometry1, geometry2)) {
Expand Down

0 comments on commit 7a83c67

Please sign in to comment.