Skip to content

Releases: alexbol99/flatten-js

Fix Shape & Multiline intersection #194

29 Sep 08:22
7d0b3f3
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.6.0...v1.6.2

v1.6.0

03 Aug 13:52
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.5.5...v1.6.0

Add wkt parser

26 Jun 15:06
Compare
Choose a tag to compare

What's Changed

Add function parseWKT(str) to utils to convert single WKT element to flatten-js shape.
Type converted as following
POINT -> Point,
LINESTRING -> Multiline
POLYGON -> Polygon
MULTIPOINT -> Array
MULTILINESTRING -> Array
MULTIPOLYGON -> Polygon
GEOMETRYCOLLECTION -> Array<Point | Multiline | Polygon>

Circular arcs and other types not supported

Full Changelog: v1.5.3...v1.5.5

Fix but in polygon cut

30 May 05:51
350a554
Compare
Choose a tag to compare

What's Changed

  • Fix polygon.cut error by @alexbol99 in #177
    [help] polygon.cut error: TypeError: Cannot set properties of undefined (setting 'prev') #175 by @Fauny

Full Changelog: v1.5.2...v1.5.3

Fix ray shooting in case of touching faces

19 Apr 19:01
Compare
Choose a tag to compare

What's Changed

  • Fixes #171 infinite loop when calling unify for multipolygon with touching faces (case 1 and 2) by @axtavt in #173
  • Fix ray shooting algorithm in case of multipolygon with touching faces by @alexbol99 in #174

New Contributors

Full Changelog: v1.5.1...v1.5.2

Fix intersect polygons

30 Mar 12:10
d2c5652
Compare
Choose a tag to compare

What's Changed

Full Changelog: v1.5.0...v1.5.1

Issue fixed

Cut polygon with multiLine

29 Mar 15:30
565ae09
Compare
Choose a tag to compare

What's Changed

  • Cut polygon with multiline by @alexbol99 in #163
    Cut polygon with multiline using method polygon.cut():
  const { point, segment, Polygon, Multiline } = Flatten;
  const poly = new Polygon([
    point(20, 20),
    point(60, 20),
    point(60, 60),
    point(20, 60)
  ]);
  const segments = [
    segment(20, 20, 40, 40),
    segment(40, 40, 50, 40),
    segment(50, 40, 60, 60)
  ];
  const m = new Multiline(segments);
  const newPoly = poly.cut(m);

See notebook cut-polygon-with-multiline-159
image

Issue fixed

Full Changelog: v1.4.8...v1.5.0

Add method 'contains' to Box

23 Dec 19:52
b89e303
Compare
Choose a tag to compare

What's Changed

  • Implementation of 'contains' relation between point and box. by @delmohf in #111
  • Box inflate by @delmohf in #113
  • Add method 'contains' to Box by @alexbol99 in #160
  • Add ability to insert entry to PlanarSet in the form {key: Box, value: Shape}, like
  let planarSet = new PlanarSet();
  let segment = new Segment(1,2,4,5);
  let circle = new Circle(new Point(3,3), 5);
  planarSet.add({key: segment.box, value: segment});
  planarSet.add({key: circle.box, value: circle});

This change enables to store in PlanarSet shapes that are not part of flatten-js

Full Changelog: v1.4.7...v1.4.8

Reduce npm package size

23 Dec 06:29
Compare
Choose a tag to compare

What's Changed

Removed docs, tests, examples folders from npm package
Package size reduced from 1.1Mb to 219Kb

Full Changelog: v1.4.6...v1.4.7

Export class Errors correcty

08 Dec 15:50
Compare
Choose a tag to compare

What's Changed

  • Export errors correctly by @alexbol99 in #158
    Class Error exported now, one can check flatten-js errors like this:
import {Errors, vector} from "@flatten-js/core";

try {
    const v = vector(0,0)
    v.normalize()
}
catch (e) {
    console.log(e.message === Errors.ZERO_DIVISION.message)
}

Full Changelog: v1.4.5...v1.4.6