Conversation
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| BestPractice | 15 medium 34 minor |
| Security | 1 high |
| CodeStyle | 27 minor |
| Complexity | 23 medium |
🟢 Metrics 2420 complexity · 56 duplication
Metric Results Complexity 2420 Duplication 56
TIP This summary will be updated as you push new changes. Give us feedback
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Added
Classes
PGS_Polygonisation— generates simple polygonisations of point sets.Methods
fixBrokenFaces()toPGS_Meshing. Repairs broken faces in near-coverage linework using endpoint-only snapping, then polygonises the result.polygonize()toPGS_Processing. Finds polygonal faces from the given shape's linework.softCells()toPGS_Tiling. Generates a softened (curved) version of a tiling using the SoftCells edge-bending algorithm.DBLAC, it's even better than RLF!smoothGaussianNormalised()toPGS_Processing. Applies normalised Gaussian smoothing to all geometries in a shape, intended to be more consistent across child shapes of different sizes.normalisedErosion()toPGS_Morphology. Erodes a shape by a normalised amount (scaled to shape size).refine()toPGS_Triangulation. Refines an existing triangulation using Ruppert's Delaunay refinement algorithm.arapDeform()toPGS_Morphology. Applies As-Rigid-As-Possible (ARAP) shape deformation using point handles.regularise()toPGS_Morphology. Straightens the contour of a shape by snapping edges toward a small set of principal directions.PGS_Conversion.toWKT()that accepts a precision parameter to control the number of decimal places written.smoothBezierFit()toPGS_Morphology. Smoothes a shape by fitting Bezier curves to its vertices.powerDiagram()toPGS_Voronoi. Generates a Power Voronoi Diagram for a set of weighted sites.manhattanVoronoi()toPGS_Voronoi. Generates a Manhattan Voronoi Diagram for a set of sites and a bounding box.intersectionPoints(shape)toPGS_Processing. Computes all self-intersection points of the linework contained within a single shape.intersections()toPGS_SegmentSet. Computes all intersection points among the supplied edges.squareGrid()toPGS_Tiling. Divides the plane into a simple axis-aligned grid using square cells.aztecDiamond()toPGS_Tiling. Produces a random domino tiling of the Aztec diamond of a given order.perpendicularPathSegments()toPGS_SegmentSet. Extracts perpendicular segments along each linear component of shape, with each segment centered on the path/outline.dilationMorph()toPGS_Morphology. Morphs between two shapes using a Hausdorff-distance based method.voronoiMorph()toPGS_Morphology. Morphs between two shapes using a Voronoi-based method.isolinesFromFunction()toPGS_Contour. Extracts contour lines (isolines) from a user-defined 2D “height map” over a rectangular region.kCenters()toPGS_PointSet. Selects k points from the input to act as centers that are typically well distributed over the input space.extractBoundary()toPGS_Processing. Extracts the topological boundary of the given shape.weaveSegments()toPGS_SegmentSet. Creates a fabric-like layout of horizontal and vertical segments.auxeticTiling()toPGS_Tiling. Builds a tiling of interlocking cells that form an auxetic structure.occlusionSubtract()toPGS_ShapeBoolean. Computes the visible parts of overlapping shapes (hidden surface removal).additivelyWeightedVoronoi()toPGS_Voronoi. Generates an Additively Weighted Voronoi Diagram for a set of weighted sites and a bounding box.toPolygonPShape()toPGS_Conversion. Converts a polygonal (areal) PShape from a collection of PVector vertices.toPathPShape()toPGS_Conversion. Converts a path (lineal) PShape from a collection of PVector vertices.unionCircles()toPGS_ShapeBoolean. Efficiently unions circles defined as PVectors, using a specialised disk-union algorithm that is faster than general shape union for circular inputs.Changes
PGS_Conversion.fromPShape()now disambiguates closed paths using the PShape’skind: closed shapes withkind == POLYGONconvert to JTSPolygon, while closed shapes withkind == PATHconvert to a (closed) JTSLineString(previously closed paths were generally treated as polygonal).PGS_Conversion.toPShape()now encodes polygon-vs-line semantics by setting the output PShape’skindappropriately (POLYGONfor JTS polygonal geometries;PATHfor JTS lineal geometries), so closed linework no longer becomes ambiguous on round-trip.PGS_Meshingare more performant and robust:urquhartFaces(),gabrielFaces(),spannerFaces(),relativeNeighborFaces(),edgeCollapseQuadrangulation(),centroidQuadrangulation().PGS_Processing.convexPartition()using the optimal Keil & Snoeyink partitioning algorithm.PGS_PointSet.findShortestTour()TSP algorithm. Much faster (~50x) on larger inputs.PGS_Meshing.fixBreaks()now uses a JTS implementation under the hood. The method's priorangleTolerancearg has been removed as it's no longer necessary..nameis now included in thePRESERVE_STYLEroutines.PGS_Morphologynow support GROUP shapes (where it makes sense to).PGS_Conversion.toWKT()now writes coordinates in float precison by default (previously 2 decimal places).PGS_Morphology.interpolate()using a more advanced approach with better quality (though interpolations can still self-intersect).shapeIntersection(a, b)inPGS_ProcessingtointersectionPoints().PGS_Morphology.distanceField()with a better quality approach, and added an additional method signature that accepts a 'pole' parameter to compute the distance field with respect to a specific point.largestEmptyCircles(),maximumInscribedPack()andobstaclePack()are slightly faster.PGS_CirclePacking.stochasticPack(). New approach is twice as fast.PGS_Contour.straightSkeleton()using kinetic triangulation approach. It's more robust and much faster on large inputs.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).GENETICmesh-coloring algorithm now always works (and has been improved too).PGS_Morphology.reducePrecision()now supports GROUP shapes without collapsing them.PGS_Construction.createSuperRandomPolygon()no longer produces holes whenholesis set tofalse.PGS_Contour.chordalAxis()can no longer return polygonal output.PGS_Voronoi.compoundVoronoi()now uses the given bounds (previously ignored).PGS_Processing.generateRandomPoints()can no longer produce different outputs for the same seed on polygons with holes.toGraph()andfromGraph()methods inPGS_Conversionnow correctly handle shapes with holes.Removed
polygonizeLines()fromPGS_Processing, in favour ofpolygonize(PShape).unionMeshWithoutHoles()fromPGS_ShapeBoolean. Previously deprecated in favour of the more generalunionMesh().fromGeoJSON()andtoGeoJSON()fromPGS_Conversion.COARSEmesh coloring algorithm, since it can color adjacent faces the same colour.lineSegmentsIntersection()fromPGS_ShapeBooleanin favour ofintersectionPoints(PShape).removeHiddenLines()fromPGS_Processing. This functionality has been superseded byocclusionSubtract()inPGS_ShapeBoolean(which handles generic shapes, not just lines).