Skip to content
Draft

2.2 #153

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,24 @@ All notable changes to PGS will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). Dates are *YYYY-MM-DD*.

## **2.2** *(2025-xx-xx)*

### Added
* `fixBrokenFaces()` to `PGS_Meshing`. Repairs broken faces in near-coverage linework using endpoint-only snapping, then polygonises the result.
* `polygonize()` to `PGS_Processing`. Finds polygonal faces from the given shape's linework.
* `softCells()` to `PGS_Tiling`. Generates a softened (curved) version of a tiling using the SoftCells edge-bending algorithm.

### Changes
* These methods in `PGS_Meshing` are more performant and robust: `urquhartFaces()`, `gabrielFaces()`, `spannerFaces()`, `relativeNeighborFaces()`, `edgeCollapseQuadrangulation()`, `centroidQuadrangulation()`.

### Fixed
* `PGS_Optimisation.closestPoint()` now returns the nearest location on the shape's **boundary** for queries inside a polygonal shape (previously returned the query point itself).
* `GENETIC` mesh-coloring algorithm now always works (and has been improved too).
* `PGS_Morphology.reducePrecision()` now supports GROUP shapes without collapsing them.

### Removed
* `polygonizeLines()` from `PGS_Processing`, in favour of `polygonize(PShape)`.

## **2.1** *(2025-10-04)*

### Added
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -957,8 +957,10 @@ Much of the functionality (but by no means all) is demonstrated below:
</tr>
<tr>
<td align="center" valign="center"><b>Arc Division</td>
<td align="center" valign="center"><b>Soft Cells</td>
</tr>
<tr>
<td valign="top" width="25%"><img src="resources/tiling/arcDivision.png"></td>
<td valign="top" width="25%"><img src="resources/tiling/softCells.gif"></td>
</tr>
</table>
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>micycle</groupId>
<artifactId>PGS</artifactId>
<version>2.1</version>
<version>2.2-SNAPSHOT</version>
<name>Processing Geometry Suite</name>
<description>Geometric algorithms for Processing</description>

Expand Down Expand Up @@ -371,7 +371,7 @@
<dependency>
<groupId>com.github.micycle1</groupId>
<artifactId>GeoBlitz</artifactId>
<version>0.9</version>
<version>0.9.1</version>
</dependency>
</dependencies>

Expand Down
Binary file added resources/tiling/softCells.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/main/java/micycle/pgs/PGS_Coloring.java
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ private static Coloring<PShape> findColoring(Collection<PShape> shapes, Coloring
coloring = new ColorRefinementAlgorithm<>(graph).getColoring();
break;
case GENETIC :
coloring = new GeneticColoring<>(graph).getColoring();
coloring = new GeneticColoring<>(graph, SEED).getColoring();
break;
case RLF_BRUTE_FORCE_4COLOR :
int iterations = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/micycle/pgs/PGS_Construction.java
Original file line number Diff line number Diff line change
Expand Up @@ -1365,7 +1365,7 @@ static Polygon createCircle(double x, double y, double r, final double maxDeviat
int nPts = (int) Math.ceil(2 * Math.PI / Math.acos(1 - maxDeviation / r));
nPts = Math.max(nPts, 21); // min of 21 points for tiny circles
final int circumference = (int) (Math.PI * r * 2);
if (nPts > circumference * 2) {
if (nPts > circumference * 2 && circumference > 0) {
// AT MOST 1 point every half pixel
nPts = circumference * 2;
}
Expand Down
Loading