mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-21 10:13:43 +03:00
0031661: Modeling Data - Exception when projecting parabola or hyperbola to plane
ProjLib/ProjLib_ProjectOnPlane.cxx - formatting 0031661: Modeling Data - Algorithm crashes when projecting parabola or hyperbola to plane ProjLib/ProjLib_ProjectOnPlane.cxx - building of analytical parabola and hyperbola is added bugs/moddata_3/bug31661_* - new test cases are added
This commit is contained in:
parent
1f02c1903a
commit
2fc4884b88
File diff suppressed because it is too large
Load Diff
@ -199,9 +199,12 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
void GetTrimmedResult(const Handle(Geom_Curve)& theProjCurve);
|
||||||
|
|
||||||
|
Standard_Boolean BuildParabolaByApex(Handle(Geom_Curve)& theGeomParabolaPtr);
|
||||||
|
Standard_Boolean BuildHyperbolaByApex(Handle(Geom_Curve)& theGeomParabolaPtr);
|
||||||
|
|
||||||
|
void BuildByApprox(const Standard_Real theLimitParameter);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
26
tests/bugs/moddata_3/bug31661_1
Normal file
26
tests/bugs/moddata_3/bug31661_1
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
puts ""
|
||||||
|
puts "=========================================================================="
|
||||||
|
puts "OCC31661: Modeling Data - Algorithm crashes when projecting parabola or hyperbola to plane"
|
||||||
|
puts "=========================================================================="
|
||||||
|
puts ""
|
||||||
|
|
||||||
|
parabola p 0 0 0 1 1 1 2 0 -2 10
|
||||||
|
plane pln 0 0 0 0 0 1
|
||||||
|
projonplane r p pln 0
|
||||||
|
|
||||||
|
if {![regexp {Parabola} [dump r]]} {
|
||||||
|
puts "ERROR: Projected curve is not a parabola"
|
||||||
|
}
|
||||||
|
|
||||||
|
trim p p -100 100
|
||||||
|
projonplane rp p pln 0
|
||||||
|
|
||||||
|
if {![regexp {Parabola} [dump rp]]} {
|
||||||
|
puts "ERROR: Projected curve is not a parabola"
|
||||||
|
}
|
||||||
|
|
||||||
|
checklength rp -l 408.40363195229503
|
||||||
|
bounds rp t1 t2
|
||||||
|
checkreal t1 [dval t1] -91.077748943768597 1.e-7 1.e-7
|
||||||
|
checkreal t2 [dval t2] 72.221567418462357 1.e-7 1.e-7
|
||||||
|
|
26
tests/bugs/moddata_3/bug31661_2
Normal file
26
tests/bugs/moddata_3/bug31661_2
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
puts ""
|
||||||
|
puts "=========================================================================="
|
||||||
|
puts "OCC31661: Modeling Data - Algorithm crashes when projecting parabola or hyperbola to plane"
|
||||||
|
puts "=========================================================================="
|
||||||
|
puts ""
|
||||||
|
|
||||||
|
hyperbola h 0 0 0 1 1 1 2 0 -2 10 10
|
||||||
|
plane pln 0 0 0 0 0 1
|
||||||
|
projonplane rh h pln 0
|
||||||
|
|
||||||
|
if {![regexp {Hyperbola} [dump rh]]} {
|
||||||
|
puts "ERROR: Projected curve is not a hyperbola"
|
||||||
|
}
|
||||||
|
|
||||||
|
trim h h -5 5
|
||||||
|
projonplane rh h pln 0
|
||||||
|
|
||||||
|
if {![regexp {Hyperbola} [dump rh]]} {
|
||||||
|
puts "ERROR: Projected curve is not a hyperbola"
|
||||||
|
}
|
||||||
|
|
||||||
|
checklength rh -l 1664.3732976598988
|
||||||
|
bounds rh t1 t2
|
||||||
|
checkreal t1 [dval t1] -5.23179933356147 1.e-7 1.e-7
|
||||||
|
checkreal t2 [dval t2] 4.76820064934972 1.e-7 1.e-7
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user