}
//// modified by jgv, 15.12.02 for OCC565 ////
- if (typs1 == GeomAbs_Cone)
+ if (typs1 == GeomAbs_Cone && TreatAsBiParametric)
{
const gp_Cone Con1 = theS1->Cone();
const Standard_Real a1 = Abs(Con1.SemiAngle());
- if (a1 < 0.02 && a2 < 0.02) //quasi-cylinders: if same domain, treat as canonic
+ //if collinear, treat as canonical
+ const gp_Ax1 A1 = Con1.Axis(), A2 = Con2.Axis();
+ const gp_Lin L1(A1);
+ if (A1.IsParallel(A2,Precision::Angular()) &&
+ (L1.Distance(A2.Location()) <= Precision::Confusion()))
{
- const gp_Ax1 A1 = Con1.Axis(), A2 = Con2.Axis();
- if (A1.IsParallel(A2,Precision::Angular()))
- {
- const gp_Lin L1(A1);
- if (L1.Distance(A2.Location()) <= Precision::Confusion())
- {
- TreatAsBiParametric = Standard_False;
- }
- }
+ TreatAsBiParametric = Standard_False;
}
else if (a1 > 1.55 && a2 > 1.55) //quasi-planes: if same domain, treat as canonic
{
}
}
}
- else if ((a1 > 1.55) || (a2 > 1.55))
- {
- const 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) {
}
//// modified by jgv, 15.12.02 for OCC565 ////
- if (typs1 == GeomAbs_Cone)
+ if (typs1 == GeomAbs_Cone && TreatAsBiParametric)
{
const gp_Cone Con1 = theS1->Cone();
const Standard_Real a1 = Abs(Con1.SemiAngle());
- if (a1 < 0.02 && a2 < 0.02) //quasi-cylinders: if same domain, treat as canonic
+ //if collinear, treat as canonical
+ const gp_Ax1 A1 = Con1.Axis(), A2 = Con2.Axis();
+ const gp_Lin L1(A1);
+ if (A1.IsParallel(A2,Precision::Angular()) &&
+ (L1.Distance(A2.Location()) <= Precision::Confusion()))
{
- const gp_Ax1 A1 = Con1.Axis(), A2 = Con2.Axis();
- if (A1.IsParallel(A2,Precision::Angular()))
- {
- const gp_Lin L1(A1);
- if (L1.Distance(A2.Location()) <= Precision::Confusion())
- {
- TreatAsBiParametric = Standard_False;
- }
- }
+ TreatAsBiParametric = Standard_False;
}
else if (a1 > 1.55 && a2 > 1.55) //quasi-planes: if same domain, treat as canonic
{
}
}
}
- else if ((a1 > 1.55) || (a2 > 1.55))
- {
- const 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) {
--- /dev/null
+puts "================"
+puts "OCC24328"
+puts "================"
+puts ""
+#######################################################################
+# Revolution of a wire generates two interfered faces
+#######################################################################
+
+vertex v1 23.500000 11.123000 0
+vertex v2 22.000000 11.140900 0
+vertex v3 20.500000 11.180700 0
+edge e1 v1 v2
+edge e2 v2 v3
+wire w e1 e2
+revol r w 0 0 0 1 0 0 360
+
+set info [bopcheck r]
+
+if { [regexp "This shape seems to be OK" ${info}] != 1 } {
+ puts "Error : Revolution works wrong"
+} else {
+ puts "OK: Revolution works properly"
+}