Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CityDoctor
CityDoctor2
Commits
05d47e69
Commit
05d47e69
authored
Feb 20, 2026
by
Luna Riegel
Browse files
Fix: Filter out shared wall from collisions
parent
268d9e66
Changes
1
Hide whitespace changes
Inline
Side-by-side
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/checks/topology/FeatureCollisionCheck.java
View file @
05d47e69
...
@@ -172,13 +172,17 @@ public class FeatureCollisionCheck extends Check{
...
@@ -172,13 +172,17 @@ public class FeatureCollisionCheck extends Check{
.
calculateGeometryIntersections
(
subjectGeom
,
candidateGeom
,
epsilon
);
.
calculateGeometryIntersections
(
subjectGeom
,
candidateGeom
,
epsilon
);
return
intersections
.
stream
()
return
intersections
.
stream
()
.
filter
(
polySect
->
polySect
.
getType
()
!=
PolygonIntersection
.
IntersectionType
.
NONE
)
.
filter
(
polySect
->
polySect
.
getType
()
!=
PolygonIntersection
.
IntersectionType
.
NONE
)
.
filter
(
polySect
->
notCollinear
(
polySect
.
getT1
(),
polySect
.
getT2
()))
.
map
(
polySect
->
new
Pair
<>(
polySect
.
getP1
(),
polySect
.
getP2
()))
.
map
(
polySect
->
new
Pair
<>(
polySect
.
getP1
(),
polySect
.
getP2
()))
.
toList
();
.
toList
();
}
}
private
boolean
notCollinear
(
Triangle3d
t1
,
Triangle3d
t2
){
return
!
t1
.
getNormal
().
normalize
().
equalsWithEpsilon
(
t2
.
getNormal
().
normalize
(),
0.01
);
}
private
List
<
PolygonIntersection
>
getPolygonIntersections
(
Geometry
subject
,
Geometry
candidate
){
private
List
<
PolygonIntersection
>
getPolygonIntersections
(
Geometry
subject
,
Geometry
candidate
){
List
<
PolygonIntersection
>
intersections
=
new
ArrayList
<>();
List
<
PolygonIntersection
>
intersections
=
new
ArrayList
<>();
for
(
Polygon
sPoly
:
subject
.
getPolygons
()){
for
(
Polygon
sPoly
:
subject
.
getPolygons
()){
for
(
Polygon
cPoly
:
candidate
.
getPolygons
()){
for
(
Polygon
cPoly
:
candidate
.
getPolygons
()){
intersections
.
add
(
SelfIntersectionUtil
.
polygonIntersection
(
sPoly
,
cPoly
,
0.001
,
epsilon
));
intersections
.
add
(
SelfIntersectionUtil
.
polygonIntersection
(
sPoly
,
cPoly
,
0.001
,
epsilon
));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment