pythoncdt 2.0.1__tar.gz → 2.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/CDT/include/Triangulation.h +2 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/CDT/include/Triangulation.hpp +62 -21
- pythoncdt-2.0.2/CDT/visualizer/data/issue-230.txt +11 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/PKG-INFO +1 -1
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/.clang-format +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/.github/dependabot.yml +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/.github/release-drafter.yml +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/.github/workflows/ci.yml +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/.github/workflows/release-drafter.yml +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/.github/workflows/wheels.yml +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/.gitignore +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/.gitmodules +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/.pre-commit-config.yaml +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/.clang-format +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/.github/workflows/ci_builds.yml +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/.github/workflows/documentation.yml +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/.gitignore +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/.gitmodules +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/.mailmap +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/CDT/CMakeLists.txt +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/CDT/LICENSE +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/CDT/LICENSE-LLVM.txt +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/CDT/LICENSE-predicates.txt +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/CDT/conan_basic_setup.cmake +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/CDT/conanfile.py +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/CDT/extras/VerifyTopology.h +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/CDT/include/CDT.h +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/CDT/include/CDT.hpp +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/CDT/include/CDTUtils.h +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/CDT/include/CDTUtils.hpp +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/CDT/include/KDTree.h +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/CDT/include/LocatorKDTree.h +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/CDT/include/portable_nth_element.hpp +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/CDT/include/predicates.h +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/CDT/include/remove_at.hpp +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/CDT/src/CDT.cpp +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/LICENSE +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/visualizer/CMakeLists.txt +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/visualizer/LICENSE +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/visualizer/data/Capital A.txt +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/visualizer/data/Constrained Sweden.txt +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/visualizer/data/Hanging.txt +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/visualizer/data/Hanging2.txt +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/visualizer/data/HangingIntersection.txt +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/visualizer/data/LakeSuperior.txt +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/visualizer/data/Letter u.txt +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/visualizer/data/OnEdge.txt +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/visualizer/data/OnEdge2.txt +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/visualizer/data/Orange County.txt +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/visualizer/data/ProblematicCase1.txt +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/visualizer/data/Sweden with constraints.txt +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/visualizer/data/Sweden with duplicate points.txt +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/visualizer/data/Sweden.txt +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/visualizer/data/cdt.txt +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/visualizer/data/cdt_duplicates.txt +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/visualizer/data/corner cases.txt +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/visualizer/data/crossing-edges.txt +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/visualizer/data/ditch.txt +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/visualizer/data/duplicates.txt +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/visualizer/data/gh_issue.txt +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/visualizer/data/guitar no box.txt +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/visualizer/data/guitar.txt +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/visualizer/data/island.txt +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/visualizer/data/issue-42-full-boundary-overlap-2.txt +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/visualizer/data/issue-42-full-boundary-overlap.txt +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/visualizer/data/issue-42-hole-overlaps-bondary.txt +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/visualizer/data/issue-42-multiple-boundary-overlaps-conform-to-edge.txt +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/visualizer/data/issue-42-multiple-boundary-overlaps.txt +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/visualizer/data/issue-65-wrong-edges.txt +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/visualizer/data/kidney.txt +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/visualizer/data/overlapping constraints.txt +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/visualizer/data/overlapping constraints2.txt +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/visualizer/data/points_on_constraint_edge.txt +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/visualizer/data/regression_issue_38_wrong_hull.txt +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/visualizer/data/regression_issue_38_wrong_hull_small.txt +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/visualizer/data/square with crack.txt +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/visualizer/data/unit square.txt +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/visualizer/main.cpp +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/CMakeLists.txt +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/LICENSE +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/README.md +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/benchmark_gil_release.py +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/benchmark_list_vs_array_access.py +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/pyproject.toml +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/src/cdt_bindings.cpp +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/src/pythoncdt/__init__.py +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/src/pythoncdt/_core.pyi +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/src/pythoncdt/py.typed +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/tests/stubtest-allowlist.txt +0 -0
- {pythoncdt-2.0.1 → pythoncdt-2.0.2}/tests/test_bindings.py +0 -0
|
@@ -1210,6 +1210,8 @@ private:
|
|
|
1210
1210
|
void insertVertices_KDTreeBFS(VertInd superGeomVertCount, Box2d<T> box);
|
|
1211
1211
|
std::pair<TriInd, TriInd> edgeTriangles(VertInd a, VertInd b) const;
|
|
1212
1212
|
bool hasEdge(VertInd a, VertInd b) const;
|
|
1213
|
+
/// Vertex opposed to a non-fixed edge that lies on it within tolerance
|
|
1214
|
+
VertInd opposedVertexOnEdge(const Edge& edge, T tolerance) const;
|
|
1213
1215
|
bool
|
|
1214
1216
|
hasAnotherFixedEdgeAtSmallAngle(VertInd v, const Edge& excludeEdge) const;
|
|
1215
1217
|
void setAdjacentTriangle(const VertInd v, const TriInd t);
|
|
@@ -585,12 +585,6 @@ void Triangulation<T, TNearPointLocator>::insertEdgeIteration(
|
|
|
585
585
|
if(iA == iB) // edge connects a vertex to itself
|
|
586
586
|
return;
|
|
587
587
|
|
|
588
|
-
if(hasEdge(iA, iB))
|
|
589
|
-
{
|
|
590
|
-
fixEdge(edge, originalEdge);
|
|
591
|
-
return;
|
|
592
|
-
}
|
|
593
|
-
|
|
594
588
|
const V2d<T>& a = vertices[iA];
|
|
595
589
|
const V2d<T>& b = vertices[iB];
|
|
596
590
|
const T distanceTolerance =
|
|
@@ -598,16 +592,28 @@ void Triangulation<T, TNearPointLocator>::insertEdgeIteration(
|
|
|
598
592
|
? T(0)
|
|
599
593
|
: m_minDistToConstraintEdge * distance(a, b);
|
|
600
594
|
|
|
595
|
+
if(hasEdge(iA, iB))
|
|
596
|
+
{
|
|
597
|
+
const VertInd iV = opposedVertexOnEdge(edge, distanceTolerance);
|
|
598
|
+
if(iV != noVertex)
|
|
599
|
+
{
|
|
600
|
+
remaining.push_back(Edge(iV, iB));
|
|
601
|
+
remaining.push_back(Edge(iA, iV));
|
|
602
|
+
return;
|
|
603
|
+
}
|
|
604
|
+
fixEdge(edge, originalEdge);
|
|
605
|
+
return;
|
|
606
|
+
}
|
|
607
|
+
|
|
601
608
|
TriInd iT;
|
|
602
609
|
// Note: 'L' is left and 'R' is right of the inserted constraint edge
|
|
603
610
|
VertInd iVL, iVR;
|
|
604
611
|
tie(iT, iVL, iVR) = intersectedTriangle(iA, a, b, distanceTolerance);
|
|
605
|
-
// if one of the triangle vertices is on the edge,
|
|
612
|
+
// if one of the triangle vertices is on the edge, split edge at it
|
|
606
613
|
if(iT == noNeighbor)
|
|
607
614
|
{
|
|
608
|
-
const Edge edgePart(iA, iVL);
|
|
609
|
-
fixEdge(edgePart, originalEdge);
|
|
610
615
|
remaining.push_back(Edge(iVL, iB));
|
|
616
|
+
remaining.push_back(Edge(iA, iVL));
|
|
611
617
|
return;
|
|
612
618
|
}
|
|
613
619
|
Triangle t = triangles[iT];
|
|
@@ -789,8 +795,27 @@ void Triangulation<T, TNearPointLocator>::conformToEdgeIteration(
|
|
|
789
795
|
if(iA == iB) // edge connects a vertex to itself
|
|
790
796
|
return;
|
|
791
797
|
|
|
798
|
+
const V2d<T>& a = vertices[iA];
|
|
799
|
+
const V2d<T>& b = vertices[iB];
|
|
800
|
+
const T distanceTolerance =
|
|
801
|
+
m_minDistToConstraintEdge == T(0)
|
|
802
|
+
? T(0)
|
|
803
|
+
: m_minDistToConstraintEdge * distance(a, b);
|
|
804
|
+
|
|
792
805
|
if(hasEdge(iA, iB))
|
|
793
806
|
{
|
|
807
|
+
const VertInd iV = opposedVertexOnEdge(edge, distanceTolerance);
|
|
808
|
+
if(iV != noVertex)
|
|
809
|
+
{
|
|
810
|
+
#ifdef CDT_CXX11_IS_SUPPORTED
|
|
811
|
+
remaining.emplace_back(Edge(iV, iB), originals, overlaps);
|
|
812
|
+
remaining.emplace_back(Edge(iA, iV), originals, overlaps);
|
|
813
|
+
#else
|
|
814
|
+
remaining.push_back(make_tuple(Edge(iV, iB), originals, overlaps));
|
|
815
|
+
remaining.push_back(make_tuple(Edge(iA, iV), originals, overlaps));
|
|
816
|
+
#endif
|
|
817
|
+
return;
|
|
818
|
+
}
|
|
794
819
|
fixEdge(edge);
|
|
795
820
|
if(overlaps > 0)
|
|
796
821
|
overlapCount[edge] = overlaps;
|
|
@@ -802,27 +827,18 @@ void Triangulation<T, TNearPointLocator>::conformToEdgeIteration(
|
|
|
802
827
|
return;
|
|
803
828
|
}
|
|
804
829
|
|
|
805
|
-
const V2d<T>& a = vertices[iA];
|
|
806
|
-
const V2d<T>& b = vertices[iB];
|
|
807
|
-
const T distanceTolerance =
|
|
808
|
-
m_minDistToConstraintEdge == T(0)
|
|
809
|
-
? T(0)
|
|
810
|
-
: m_minDistToConstraintEdge * distance(a, b);
|
|
811
830
|
TriInd iT;
|
|
812
831
|
VertInd iVleft, iVright;
|
|
813
832
|
tie(iT, iVleft, iVright) = intersectedTriangle(iA, a, b, distanceTolerance);
|
|
814
|
-
// if one of the triangle vertices is on the edge,
|
|
833
|
+
// if one of the triangle vertices is on the edge, split edge at it
|
|
815
834
|
if(iT == noNeighbor)
|
|
816
835
|
{
|
|
817
|
-
const Edge edgePart(iA, iVleft);
|
|
818
|
-
fixEdge(edgePart);
|
|
819
|
-
if(overlaps > 0)
|
|
820
|
-
overlapCount[edgePart] = overlaps;
|
|
821
|
-
detail::insert_unique(pieceToOriginals[edgePart], originals);
|
|
822
836
|
#ifdef CDT_CXX11_IS_SUPPORTED
|
|
823
837
|
remaining.emplace_back(Edge(iVleft, iB), originals, overlaps);
|
|
838
|
+
remaining.emplace_back(Edge(iA, iVleft), originals, overlaps);
|
|
824
839
|
#else
|
|
825
840
|
remaining.push_back(make_tuple(Edge(iVleft, iB), originals, overlaps));
|
|
841
|
+
remaining.push_back(make_tuple(Edge(iA, iVleft), originals, overlaps));
|
|
826
842
|
#endif
|
|
827
843
|
return;
|
|
828
844
|
}
|
|
@@ -2533,6 +2549,31 @@ bool Triangulation<T, TNearPointLocator>::hasEdge(
|
|
|
2533
2549
|
return edgeTriangles(a, b).first != invalidIndexSizeType;
|
|
2534
2550
|
}
|
|
2535
2551
|
|
|
2552
|
+
template <typename T, typename TNearPointLocator>
|
|
2553
|
+
VertInd Triangulation<T, TNearPointLocator>::opposedVertexOnEdge(
|
|
2554
|
+
const Edge& edge,
|
|
2555
|
+
const T tolerance) const
|
|
2556
|
+
{
|
|
2557
|
+
if(fixedEdges.count(edge))
|
|
2558
|
+
return noVertex;
|
|
2559
|
+
const V2d<T>& a = vertices[edge.v1()];
|
|
2560
|
+
const V2d<T>& b = vertices[edge.v2()];
|
|
2561
|
+
const std::pair<TriInd, TriInd> tris = edgeTriangles(edge.v1(), edge.v2());
|
|
2562
|
+
const VertInd opposed[] = {
|
|
2563
|
+
opposedVertex(triangles[tris.first], tris.second),
|
|
2564
|
+
opposedVertex(triangles[tris.second], tris.first)};
|
|
2565
|
+
for(int i = 0; i < 2; ++i)
|
|
2566
|
+
{
|
|
2567
|
+
const V2d<T>& v = vertices[opposed[i]];
|
|
2568
|
+
// near line ab and inside its diametral circle: both parts are
|
|
2569
|
+
// shorter than ab, so splitting terminates
|
|
2570
|
+
if(locatePointLine(v, a, b, tolerance) == PtLineLocation::OnLine &&
|
|
2571
|
+
detail::isEncroachingOnEdge(v, a, b))
|
|
2572
|
+
return opposed[i];
|
|
2573
|
+
}
|
|
2574
|
+
return noVertex;
|
|
2575
|
+
}
|
|
2576
|
+
|
|
2536
2577
|
/// Checks whether vertex v has a fixed edge, other than excludeEdge, incident
|
|
2537
2578
|
/// to it at a small angle: recognizes a subsegment endpoint as a shared corner
|
|
2538
2579
|
/// even after v's segments have already been split.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pythoncdt
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.2
|
|
4
4
|
Summary: Python bindings for CDT: constrained Delaunay triangulation
|
|
5
5
|
Keywords: cdt,computational-geometry,conforming,constrained,constrained-delaunay-triangulation,delaunay,delaunay-triangulation,fast,refinement,robust,triangle,triangulation
|
|
6
6
|
Author: Artem Amirkhanov
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/visualizer/data/issue-42-full-boundary-overlap-2.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/visualizer/data/issue-42-multiple-boundary-overlaps.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pythoncdt-2.0.1 → pythoncdt-2.0.2}/CDT/visualizer/data/regression_issue_38_wrong_hull_small.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|