Standard_Real _Vm1,Standard_Real _VM1,
Standard_Real _Um2,Standard_Real _UM2,
Standard_Real _Vm2,Standard_Real _VM2,
- const Handle(Adaptor3d_HSurface)& ,
- const Handle(Adaptor3d_HSurface)& ,
- const Standard_Real Increment)
+ const Handle(Adaptor3d_HSurface)& Caro1,
+ const Handle(Adaptor3d_HSurface)& Caro2,
+ const Standard_Real Increment,
+ const Standard_Real tolconf)
{
Standard_Real du1=Abs(UM1-Um1);
Standard_Real dv1=Abs(VM1-Vm1);
pasuv[1]=Increment*dv1;
pasuv[2]=Increment*du2;
pasuv[3]=Increment*dv2;
+
+ Standard_Real ResoU1tol = Adaptor3d_HSurfaceTool::UResolution(Caro1, tolconf);
+ Standard_Real ResoV1tol = Adaptor3d_HSurfaceTool::VResolution(Caro1, tolconf);
+ Standard_Real ResoU2tol = Adaptor3d_HSurfaceTool::UResolution(Caro2, tolconf);
+ Standard_Real ResoV2tol = Adaptor3d_HSurfaceTool::VResolution(Caro2, tolconf);
+
+ if (pasuv[0] < 2*ResoU1tol)
+ pasuv[0] = 2*ResoU1tol;
+ if (pasuv[1] < 2*ResoV1tol)
+ pasuv[1] = 2*ResoV1tol;
+ if (pasuv[2] < 2*ResoU2tol)
+ pasuv[2] = 2*ResoU2tol;
+ if (pasuv[3] < 2*ResoV2tol)
+ pasuv[3] = 2*ResoV2tol;
}
//=======================================================================
const Standard_Real VLast2 = Adaptor3d_HSurfaceTool::LastVParameter (Caro2);
//
ComputePasInit(pasuv,u1min,u1max,v1min,v1max,u2min,u2max,v2min,v2max,
- Um1,UM1,Vm1,VM1,Um2,UM2,Vm2,VM2,Caro1,Caro2,pasMax+pasMax);
+ Um1,UM1,Vm1,VM1,Um2,UM2,Vm2,VM2,Caro1,Caro2,pasMax+pasMax,tolconf);
//
if(pasuv[0]<100.0*ResoU1) {
pasuv[0]=100.0*ResoU1;
##################################################
restore [locate_data_file OCC13-1.draw] su1
-############### checkshape su1 # is not a topological shape
restore [locate_data_file OCC13-2.draw] su2
-############### checkshape su2 # is not a topological shape
-#Try to intersect two surfaces with tolerance 0.1
-#note that distance between shapes is about 0.005942345501409
+mkface f1 su1
+mkface f2 su2
-catch {intersect res su1 su2 0.1 } result
-set nom 0
- set j 1
- repeat 10 {
- set che [whatis res_$j]
- set che1 [whatis res_$j]
- set err [lindex $che [expr [llength $che] - 1]]
- set err1 [lindex $che1 [expr [llength $che1] - 2]]
- if { $err != "curve" && $err1 != "3d"} {
- break
- } else {
- set nom [expr $nom + 1]
-
- #Check, if curve has non-zero length
- set info [length res_$j]
- regexp {The length res_1 is+ +([-0-9.+eE]+)} $info full ll
- if {${ll} < 1.0e-7} {
- puts "Error : res_$j has null-length"
- }
-
- incr j
- }
- }
-if { $nom == 0} {
- puts "Error : Intersection was made WRONGLY"
-}
+bop f1 f2
+bopsection result
+
+tolerance result
+checkshape result
+
+set 3dviewer 1