[cgma-dev] r4782 - cgm/trunk/geom/OCC

Tim Tautges tautges at mcs.anl.gov
Thu Apr 28 16:36:58 CDT 2011


occ_patches is a patch file you can apply to the OCC 6.3 source (there's a similar occ_patches_6.5 for OCC 6.5).  From 
what Jane has said, after applying that all the tests should run.

- tim

On 04/28/2011 01:54 PM, Iulian Grindeanu wrote:
> Hello,
> I have a question about cgm build configured with occ. I have an error in test/test_occ (it does not pass)
> With the debugger, I see that the error is happening in Extrema_ExtPS.
>
> backtrace
> #0  OCCSurface::u_v_from_position (this=0xcbe880, location=..., u=@0x7fffffffdec8, v=@0x7fffffffdec0, closest_location=0x7fffffffdcf0) at OCCSurface.cpp:428
> #1  0x00000000005a8847 in RefFace::u_v_from_position (this=0xcd7d90, location=..., u=@0x7fffffffdec8, v=@0x7fffffffdec0, closest_location=0x7fffffffdcf0) at RefFace.cpp:908
> #2  0x0000000000420643 in main (argc=1, argv=0x7fffffffe018) at test_occ.cpp:98
>
>
> Then I see that some patches are required.
>
> Do we have to modify the occ source code? What is occ_patches?
> How do we do that?
> We are using an occ build 6.3.0, which was last build on Sep 23, 2009
>
> The build is here, for mcs network
> /homes/fathom/3rdparty/occ/OpenCASCADE6.3.0/
> (installed library is at /homes/fathom/3rdparty/occ/OpenCASCADE6.3.0/gcc)
>
> What am I missing?
>
> Thanks,
> Iulian
>
> ----- Original Message -----
>> Author: janehu
>> Date: 2011-04-28 11:53:43 -0500 (Thu, 28 Apr 2011)
>> New Revision: 4782
>>
>> Modified:
>> cgm/trunk/geom/OCC/occ_patches
>> Log:
>> Correct previous patches for OCC6.3 build, which caused testcase check
>> failure on gnep.
>>
>> Modified: cgm/trunk/geom/OCC/occ_patches
>> ===================================================================
>> --- cgm/trunk/geom/OCC/occ_patches 2011-04-28 00:36:18 UTC (rev 4781)
>> +++ cgm/trunk/geom/OCC/occ_patches 2011-04-28 16:53:43 UTC (rev 4782)
>> @@ -1,118 +1,78 @@
>> ---- ros/src/Extrema/Extrema_ExtPElS.cxx 2011-03-29 11:35:08.000000000
>> -0500
>> -+++
>> /mnt/disk2b/jhu/tempdir/OpenCASCADE6.3.0/ros/src/Extrema/Extrema_ExtPElS.cxx
>> 2002-04-23 11:10:21.000000000 -0500
>> -@@ -56,7 +56,6 @@
>> +--- BRepClass_FaceClassifier.cxx_old 2011-04-28 10:16:13.000000000
>> -0500
>> ++++ BRepClass_FaceClassifier.cxx 2011-04-28 10:16:51.000000000 -0500
>> +@@ -55,6 +55,7 @@
>> + Extrema_ExtPS myExtrem;
>> + //-- myExtrem.Initialize(HS, U1, U2, V1, V2, Tol, Tol);
>> + myExtrem.Initialize(Surf, U1, U2, V1, V2, Tol, Tol);
>> ++ myExtrem.Perform(P);
>> + //----------------------------------------------------------
>> + //-- On cherche le point le plus proche , PUIS
>> + //-- On le classifie.
>> +--- Extrema_ExtPS.cxx_old 2011-04-28 10:13:52.000000000 -0500
>> ++++ Extrema_ExtPS.cxx 2011-04-28 10:15:46.000000000 -0500
>> +@@ -88,10 +88,18 @@
>> + Standard_Real U, V;
>> + PS.Parameter(U, V);
>> + if (myS->IsUPeriodic()) {
>> +- U = ElCLib::InPeriod(U, myuinf, myuinf+myS->UPeriod());
>> ++ Standard_Real Uupper = myuinf+myS->UPeriod();
>> ++ if(U>(myuinf-mytolu)&&  U<  myuinf) U = myuinf;
>> ++ else if(U<  (Uupper+mytolu)&&  U>  Uupper) U = Uupper;
>> ++ else
>> ++ U = ElCLib::InPeriod(U, myuinf, myuinf+myS->UPeriod());
>> + }
>> + if (myS->IsVPeriodic()) {
>> +- V = ElCLib::InPeriod(V, myvinf, myvinf+myS->VPeriod());
>> ++ Standard_Real Vupper = myvinf+myS->VPeriod();
>> ++ if(V>(myvinf-mytolv)&&  V<  myvinf) V = myvinf;
>> ++ else if(V<  (Vupper+mytolv)&&  V>  Vupper) V = Vupper;
>> ++ else
>> ++ V = ElCLib::InPeriod(V, myvinf, myvinf+myS->VPeriod());
>> + }
>> + if ((myuinf-U)<= mytolu&&  (U-myusup)<= mytolu&&
>> + (myvinf-V)<= mytolv&&  (V-myvsup)<= mytolv) {
>> +--- Extrema_ExtPElS.cxx_old 2011-04-28 11:48:39.000000000 -0500
>> ++++ Extrema_ExtPElS.cxx 2011-04-28 10:13:38.000000000 -0500
>> +@@ -56,6 +56,7 @@
>> gp_Vec myZ = Pos.XDirection()^Pos.YDirection();
>> Standard_Real U1 = gp_Vec(Pos.XDirection()).AngleWithRef(OPp,myZ);
>> //-PI<U1<PI
>> Standard_Real U2 = U1 + PI;
>> -- if(U1>  -Tol&&  U1<  0.) {U1 = 0.;}
>> ++ if(U1>  -Tol&&  U1<  0.) {U1 = 0.;}
>> if (U1<  0.) { U1 += 2. * PI; }
>> -
>

-- 
================================================================
"You will keep in perfect peace him whose mind is
   steadfast, because he trusts in you."               Isaiah 26:3

              Tim Tautges            Argonne National Laboratory
          (tautges at mcs.anl.gov)      (telecommuting from UW-Madison)
          phone: (608) 263-8485      1500 Engineering Dr.
            fax: (608) 263-4499      Madison, WI 53706



More information about the cgma-dev mailing list