mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0023643: Intersection algorithm produces B-Spline curve in case of coaxial cones
This commit is contained in:
parent
41b3001c72
commit
bf0ba8139a
@ -745,10 +745,7 @@ void IntPatch_Intersection::Perform(const Handle(Adaptor3d_HSurface)& S1,
|
|||||||
if(ps<0.0) {
|
if(ps<0.0) {
|
||||||
ps=-ps;
|
ps=-ps;
|
||||||
}
|
}
|
||||||
//modified by NIZNHY-PKV Thu Jul 01 12:14:29 2010f
|
|
||||||
//if(ps<0.1) {
|
|
||||||
if(ps<0.015) {
|
if(ps<0.015) {
|
||||||
//modified by NIZNHY-PKV Thu Jul 01 12:14:35 2010t
|
|
||||||
TreatAsBiParametric = Standard_True;
|
TreatAsBiParametric = Standard_True;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -769,10 +766,7 @@ void IntPatch_Intersection::Perform(const Handle(Adaptor3d_HSurface)& S1,
|
|||||||
if(ps<0.0) {
|
if(ps<0.0) {
|
||||||
ps=-ps;
|
ps=-ps;
|
||||||
}
|
}
|
||||||
//modified by NIZNHY-PKV Thu Jul 01 12:15:04 2010f
|
|
||||||
//if(ps<0.1){
|
|
||||||
if(ps<0.015){
|
if(ps<0.015){
|
||||||
//modified by NIZNHY-PKV Thu Jul 01 12:15:08 2010t
|
|
||||||
TreatAsBiParametric = Standard_True;
|
TreatAsBiParametric = Standard_True;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -793,7 +787,7 @@ void IntPatch_Intersection::Perform(const Handle(Adaptor3d_HSurface)& S1,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (a1 > 1.55 && a2 > 1.55) {//quasi-planes: if same domain, treat as canonic
|
else if (a1 > 1.55 && a2 > 1.55) { //quasi-planes: if same domain, treat as canonic
|
||||||
gp_Ax1 A1 = Con1.Axis(), A2 = Con2.Axis();
|
gp_Ax1 A1 = Con1.Axis(), A2 = Con2.Axis();
|
||||||
if (A1.IsParallel(A2,Precision::Angular())) {
|
if (A1.IsParallel(A2,Precision::Angular())) {
|
||||||
gp_Pnt Apex1 = Con1.Apex(), Apex2 = Con2.Apex();
|
gp_Pnt Apex1 = Con1.Apex(), Apex2 = Con2.Apex();
|
||||||
@ -803,11 +797,18 @@ void IntPatch_Intersection::Perform(const Handle(Adaptor3d_HSurface)& S1,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if ((a1 > 1.55 && a2 < 1.55) || (a2 > 1.55 && a1 < 1.55) ) {
|
||||||
|
gp_Ax1 A1 = Con1.Axis(), A2 = Con2.Axis();
|
||||||
|
if (A1.IsCoaxial(A2,Precision::Angular(),Precision::Confusion())) {
|
||||||
|
TreatAsBiParametric = Standard_False;
|
||||||
}
|
}
|
||||||
//////////////////////////////////////////////
|
|
||||||
}
|
}
|
||||||
|
}// if (typs1 == GeomAbs_Cone) {
|
||||||
|
}// if(typs2 == GeomAbs_Cone) {
|
||||||
//
|
//
|
||||||
if(D1->DomainIsInfinite() || D2->DomainIsInfinite()) TreatAsBiParametric= Standard_False;
|
if(D1->DomainIsInfinite() || D2->DomainIsInfinite()) {
|
||||||
|
TreatAsBiParametric= Standard_False;
|
||||||
|
}
|
||||||
|
|
||||||
// Modified by skv - Mon Sep 26 14:58:30 2005 Begin
|
// Modified by skv - Mon Sep 26 14:58:30 2005 Begin
|
||||||
// if(TreatAsBiParametric) { typs1 = typs2 = GeomAbs_BezierSurface; }
|
// if(TreatAsBiParametric) { typs1 = typs2 = GeomAbs_BezierSurface; }
|
||||||
@ -1079,10 +1080,7 @@ void IntPatch_Intersection::Perform(const Handle(Adaptor3d_HSurface)& S1,
|
|||||||
if(ps<0.0) {
|
if(ps<0.0) {
|
||||||
ps=-ps;
|
ps=-ps;
|
||||||
}
|
}
|
||||||
//modified by NIZNHY-PKV Thu Jul 01 12:17:56 2010f
|
|
||||||
//if(ps<0.1) {
|
|
||||||
if(ps<0.015) {
|
if(ps<0.015) {
|
||||||
//modified by NIZNHY-PKV Thu Jul 01 12:18:09 2010t
|
|
||||||
TreatAsBiParametric = Standard_True;
|
TreatAsBiParametric = Standard_True;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1104,10 +1102,7 @@ void IntPatch_Intersection::Perform(const Handle(Adaptor3d_HSurface)& S1,
|
|||||||
if(ps<0.0){
|
if(ps<0.0){
|
||||||
ps=-ps;
|
ps=-ps;
|
||||||
}
|
}
|
||||||
//modified by NIZNHY-PKV Thu Jul 01 12:17:44 2010f
|
|
||||||
//if(ps<0.1){
|
|
||||||
if(ps<0.015){
|
if(ps<0.015){
|
||||||
//modified by NIZNHY-PKV Thu Jul 01 12:17:48 2010t
|
|
||||||
TreatAsBiParametric = Standard_True;
|
TreatAsBiParametric = Standard_True;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1147,12 +1142,22 @@ void IntPatch_Intersection::Perform(const Handle(Adaptor3d_HSurface)& S1,
|
|||||||
TreatAsBiParametric = Standard_False;
|
TreatAsBiParametric = Standard_False;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if ((a1 > 1.55 && a2 < 1.55) || (a2 > 1.55 && a1 < 1.55) ) {
|
||||||
|
gp_Ax1 A1 = Con1.Axis(), A2 = Con2.Axis();
|
||||||
|
if (A1.IsCoaxial(A2,Precision::Angular(),Precision::Confusion())) {
|
||||||
|
TreatAsBiParametric = Standard_False;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//////////////////////////////////////////////
|
//////////////////////////////////////////////
|
||||||
|
|
||||||
if(D1->DomainIsInfinite() || D2->DomainIsInfinite()) TreatAsBiParametric= Standard_False;
|
if(D1->DomainIsInfinite() || D2->DomainIsInfinite()) {
|
||||||
|
TreatAsBiParametric= Standard_False;
|
||||||
if(TreatAsBiParametric) { typs1 = typs2 = GeomAbs_BezierSurface; }
|
}
|
||||||
|
if(TreatAsBiParametric) {
|
||||||
|
typs1 = GeomAbs_BezierSurface;
|
||||||
|
typs2 = GeomAbs_BezierSurface;
|
||||||
|
}
|
||||||
|
|
||||||
// Surface type definition
|
// Surface type definition
|
||||||
Standard_Integer ts1 = 0;
|
Standard_Integer ts1 = 0;
|
||||||
|
29
tests/bugs/moddata/bug23643
Executable file
29
tests/bugs/moddata/bug23643
Executable file
@ -0,0 +1,29 @@
|
|||||||
|
puts "========================"
|
||||||
|
puts "OCC23643"
|
||||||
|
puts "========================"
|
||||||
|
puts ""
|
||||||
|
#######################################################################
|
||||||
|
# Intersection algorithm produces B-Spline curve in case of coaxial cones
|
||||||
|
#######################################################################
|
||||||
|
|
||||||
|
restore [locate_data_file bug23643_qf3.brep] b
|
||||||
|
|
||||||
|
explode b
|
||||||
|
copy b_1 f1
|
||||||
|
copy b_2 f2
|
||||||
|
|
||||||
|
mksurface s1 f1
|
||||||
|
mksurface s2 f2
|
||||||
|
|
||||||
|
trim s1t s1 0 2*pi -18 10
|
||||||
|
trim s2t s2 0 2*pi -18 10
|
||||||
|
|
||||||
|
intersect result s1t s2t
|
||||||
|
|
||||||
|
set log [dump result]
|
||||||
|
|
||||||
|
if {[regexp {Trimmed +curve} ${log}]} {
|
||||||
|
puts "Intersection algorithm work OK"
|
||||||
|
} else {
|
||||||
|
puts "Error: Intersection algorithm work bad"
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user