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
5da02385
Commit
5da02385
authored
Aug 18, 2026
by
Numanoglu
Browse files
Angle Tolerance between Plane and Line
parent
9d8e0e40
Pipeline
#12431
failed with stage
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CityDoctorParent/Extensions/CityDoctorHealer/src/main/java/de/hft/stuttgart/citydoctor2/healing/SweepEdge.java
View file @
5da02385
...
...
@@ -41,9 +41,9 @@ public class SweepEdge {
this
.
direction
=
direction
;
}
public
Vector3d
intersection
(
Plane
plane
,
double
minLinePlaneAngle
Ratio
)
{
public
Vector3d
intersection
(
Plane
plane
,
double
minLinePlaneAngle
)
{
if
(!
hasIntersectionPoint
(
plane
,
minLinePlaneAngle
Ratio
))
{
if
(!
hasIntersectionPoint
(
plane
,
minLinePlaneAngle
))
{
return
null
;
}
...
...
@@ -52,23 +52,24 @@ public class SweepEdge {
return
referencePoint
.
plus
(
direction
.
mult
(
lineParameter
));
}
public
boolean
hasIntersectionPoint
(
Plane
plane
,
double
minLinePlaneAngle
Ratio
)
{
public
boolean
hasIntersectionPoint
(
Plane
plane
,
double
minLinePlaneAngle
)
{
if
(
plane
==
null
)
{
return
false
;
}
double
denominator
=
plane
.
getNormal
().
dot
(
direction
);
return
Math
.
abs
(
denominator
)
>=
minLinePlaneAngleRatio
;
double
linePlaneAngle
=
Math
.
asin
(
Math
.
min
(
1.0
,
Math
.
abs
(
denominator
)));
return
linePlaneAngle
>=
minLinePlaneAngle
;
}
public
boolean
intersection
(
Plane
plane
,
Vector3d
intersectionPoint
,
double
minLinePlaneAngle
Ratio
)
{
public
boolean
intersection
(
Plane
plane
,
Vector3d
intersectionPoint
,
double
minLinePlaneAngle
)
{
if
(
intersectionPoint
==
null
)
{
return
false
;
}
Vector3d
point
=
intersection
(
plane
,
minLinePlaneAngle
Ratio
);
Vector3d
point
=
intersection
(
plane
,
minLinePlaneAngle
);
if
(
point
==
null
)
{
return
false
;
}
...
...
CityDoctorParent/Extensions/CityDoctorHealer/src/main/java/de/hft/stuttgart/citydoctor2/healing/SweepUtilities.java
View file @
5da02385
...
...
@@ -22,8 +22,7 @@ public class SweepUtilities {
// todo: Toleranzen passend initialisieren
private
double
minSweepEdgeLength
=
0.001
;
// Mindestlaenge einer Kante
private
double
maxPointPlaneDistance
=
0.001
;
// Maximalabstand zur Ebene
// TODO Transformiere mit arcsin() um dem Nenner den kompl.Winkel zuzuordnen
private
double
minLinePlaneAngleRatio
=
0.001
;
// MindestNeigung: vgl. <EbenenenNormale,GeradenRichtVektor>
private
double
minLinePlaneAngle
=
Math
.
toRadians
(
1.0
);
// Mindestwinkel zwischen Gerade und Ebene
private
List
<
SweepVertex
>
sweepVertices
;
...
...
@@ -83,7 +82,7 @@ public class SweepUtilities {
*/
for
(
SweepVertex
v
:
sweepVertices
)
{
v
.
calculateNewPoint
(
targetPlane
,
errorPolygon
,
minSweepEdgeLength
,
minLinePlaneAngle
Ratio
);
v
.
calculateNewPoint
(
targetPlane
,
errorPolygon
,
minSweepEdgeLength
,
minLinePlaneAngle
);
}
return
canHeal
();
...
...
CityDoctorParent/Extensions/CityDoctorHealer/src/main/java/de/hft/stuttgart/citydoctor2/healing/SweepVertex.java
View file @
5da02385
...
...
@@ -118,7 +118,7 @@ public class SweepVertex {
}
public
void
calculateNewPoint
(
Plane
targetPlane
,
Polygon
p
,
double
minSweepEdgeLength
,
double
minLinePlaneAngle
Ratio
)
{
public
void
calculateNewPoint
(
Plane
targetPlane
,
Polygon
p
,
double
minSweepEdgeLength
,
double
minLinePlaneAngle
)
{
newPoint
=
null
;
...
...
@@ -156,7 +156,7 @@ public class SweepVertex {
return
;
}
Vector3d
intersectionPoint
=
sweepEdge
.
intersection
(
targetPlane
,
minLinePlaneAngle
Ratio
);
Vector3d
intersectionPoint
=
sweepEdge
.
intersection
(
targetPlane
,
minLinePlaneAngle
);
if
(
intersectionPoint
==
null
)
{
status
=
SweepVertexStatus
.
ERROR
;
return
;
...
...
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