[Patch] 6.5.0 Update 1

Here is an update 1 over 6.5.0 which currently includes fixes made over 6.3.x and which were not integrated into official 6.5.0.

Several notes:
1. The name is certainly unofficial. It is only used to unambiguously identify an update over official x.y.z.
2. The update does not include recent updates made by the Community (Denis and others). This is yet to be made.
3. Details are included into readme.txt which I tried to keep structured and reasonably detailed.
4. The update should build and run just fine on Linux and other platforms given tiny updates over 6.3.x but I have not double-checked this yet.
5. I currently favored this wiki site to sourceforge as upload process on the latter seemed too heavy weight. Eventually it may move to the git repository initiated by Thomas Paviot as mentioned http://www.opencascade.org/org/forum/thread_20111/

Hope this helps.
Roman

Thomas Paviot's picture

Hi Roman,

I can't see any attachement to your post.

Thomas

Roman Lygin's picture

Hi Thomas,
Sorry for a miss and thanks for a catch. I meant to post a link to the wiki site - http://opencascade.wikidot.com/files.
Here is a direct link - http://opencascade.wikidot.com/local--files/files/occ6.5.0.1-src.zip
Roman

QbProg's picture

nice! thank you!

btw what's the "work" folder about?

Sharjith Naramparambath's picture

Error while building... (myDu and myDv is undeclared)

In file included from ../../../drv/Extrema/Extrema_CCFOfECC2dOfExtCC2d_0.cxx:67:
../../../inc/Extrema_FuncExtCC.gxx: In member function 'virtual Standard_Boolean Extrema_CCFOfECC2dOfExtCC2d::Value(const math_Vector&, math_Vector&)':
../../../inc/Extrema_FuncExtCC.gxx:46: error: 'myDu' was not declared in this scope
../../../inc/Extrema_FuncExtCC.gxx:47: error: 'myDv' was not declared in this scope
../../../inc/Extrema_FuncExtCC.gxx: In member function 'virtual Standard_Boolean Extrema_CCFOfECC2dOfExtCC2d::Values(const math_Vector&, math_Vector&, math_Matrix&)':
../../../inc/Extrema_FuncExtCC.gxx:98: error: 'myDu' was not declared in this scope
../../../inc/Extrema_FuncExtCC.gxx:99: error: 'myDv' was not declared in this scope
../../../inc/Extrema_FuncExtCC.gxx: In member function 'virtual Standard_Integer Extrema_CCFOfECC2dOfExtCC2d::GetStateNumber()':
../../../inc/Extrema_FuncExtCC.gxx:147: error: 'myDu' was not declared in this scope
../../../inc/Extrema_FuncExtCC.gxx:147: error: 'myDv' was not declared in this scope
make[3]: *** [Extrema_CCFOfECC2dOfExtCC2d_0.lo] Error 1
make[3]: Leaving directory `/opt/OpenCASCADE6.5.0/ros/adm/make/TKGeomBase'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/opt/OpenCASCADE6.5.0/ros/adm/make'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/OpenCASCADE6.5.0/ros'
make: *** [all] Error 2

Roman Lygin's picture

Thank you for the catch, Sharjith! Indeed, the update does not contain a few generated headers.
The root-cause is a WOK issue. I first built the fix workbench that contains fixes and in the same session rebuilt the ros workbench (which is plain 6.5.0). However WOK has used some internal caches and generated some ros headers corresponding to fix's (including updated CDL and .hxx). Therefore, the diff script used to extract differences missed some modified files as they were mistakenly equal between ros and fix.
I am rebuilding the ros right now and hope to update the archive in a few hours. Until that links will not work (deliberately made broken).

Thanks again,
Roman

Roman Lygin's picture

The update has been corrected. As expected, several files in inc and drv directories were missing to due to WOK issues. The download link has been restored.
Sorry for the inconvenience.

Sharjith Naramparambath's picture

Thanks, the build went well except for a minor modification required to change the ternary operator used to if-else clause in src/BRepTools/BRepTools_Modifier.cxx:382

I am wondering why the ternary operator use was being flagged as an error by g++.

Roman Lygin's picture

This line is part of original 6.5.0 and was not modified in Update1.
The file compiles fine by gcc 4.1.2 and 4.0.1. Which g++ version do you use?

Sharjith Naramparambath's picture

I use gcc (GCC) 4.4.5 20101112 (Red Hat 4.4.5-2) on fedora 13 x64

Another issue I found while rebuilding my app that worked fine on 6.3 was an error from the following code:

#include
void
on_primitives_wedge_activate (GtkMenuItem * menuitem, gpointer user_data)
{
TopoDS_Solid aTopo = BRepPrimAPI_MakeWedge(150 ,100, 80,70);
Handle(NXT_AISShape) aShape = new NXT_AISShape(aTopo);
theViewer->GetContext()->Display(aShape);
}

The error was

In file included from /opt/OpenCASCADE6.5.0/ros/inc/TopoDS_TVertex.hxx:56,
from /opt/OpenCASCADE6.5.0/ros/inc/BRep_TVertex.hxx:30,
from /opt/OpenCASCADE6.5.0/ros/inc/BRep_Builder.lxx:9,
from /opt/OpenCASCADE6.5.0/ros/inc/BRep_Builder.hxx:258,
from /opt/OpenCASCADE6.5.0/ros/inc/BRepPrim_Builder.hxx:18,
from /opt/OpenCASCADE6.5.0/ros/inc/BRepPrim_GWedge.hxx:18,
from /opt/OpenCASCADE6.5.0/ros/inc/BRepPrim_Wedge.hxx:18,
from /opt/OpenCASCADE6.5.0/ros/inc/BRepPrimAPI_MakeWedge.hxx:18,
from MainWindowCb.cpp:3098:
/opt/OpenCASCADE6.5.0/ros/inc/TopoDS_TVertex.lxx: In constructor 'TopoDS_TVertex::TopoDS_TVertex()':
/opt/OpenCASCADE6.5.0/ros/inc/TopoDS_TVertex.lxx:13: error: '2' cannot be used as a function

Any idea?

Bearloga's picture

Probably somewhere the pre-processor variable Convex were defined as 2.

Thomas Paviot's picture

Hi Sharjith,

This issue was identified, reproduced, described and registered as Issue #9 on the OCE issue tracker (https://github.com/tpaviot/oce/issues/9).

The fix is available at https://github.com/tpaviot/oce/commit/3db8c1d405dfa78f3159ddc96f18552e76...

Best Regards,

Thomas

Roman Lygin's picture

Hi Thomas,
I'm just about to fix the same issue (as am building with gcc4.4.0) and here is your post ;-).
However the link to github seems to lead to another fix (undef'ing Convex). Can you provide a correct url, so that future readers can pick up the fix easily ?
Thanks,
Roman

Thomas Paviot's picture

Hi Roman,

There's no mistake: undef'ing Convex is one possible way to fix the issue reported above (it works on my OSX machine).

Cheers,

Thomas

Roman Lygin's picture

Got it. Though currently do not see how these issues relate :-|.

For the line 382:
TopoDS_Shape resface = (myMap.IsBound(face) ? myMap(face) : face);

I thought the fix should be something like:
TopoDS_Shape resface = (myMap.IsBound(face) ? myMap(face) : static_cast (face));

By the way, the fixes in .hxx (e.g. TopoDS_Shape.hxx) will be lost as these .hxx are generated from CDL (TopoDS_Shape.cdl) by WOK.

Thomas Paviot's picture

Ok, we're not talking about the same thing. I fixed the issue "/opt/OpenCASCADE6.5.0/ros/inc/TopoDS_TVertex.lxx:13: error: '2' cannot be used as a function" whereas you're working on "the build went well except for a minor modification required to change the ternary operator used to if-else clause in src/BRepTools/BRepTools_Modifier.cxx:382".

Thanks for the WOK related warning.

Thomas

Roman Lygin's picture

Indeed! Thanks for the clarification, Thomas.
The above modification

TopoDS_Shape resface = (myMap.IsBound(face) ? myMap(face) : static_cast(face));

does fix the issue. The build is going on...

Thomas Paviot's picture

Roman,

I face the same issue. Ubuntu 10.04/g++ 4.4.3.

Thomas