Git Product home page Git Product logo

Comments (3)

bullestock avatar bullestock commented on August 29, 2024 1

I have created a fork which compiles with the latest OpenCascade (7.6.0). See https://github.com/bullestock/heekscad/

from heekscad.

lpgasparotto avatar lpgasparotto commented on August 29, 2024

Hi, it seems OpenCascade uses different names for certain files. In this specific case
/usr/include/opencascade/Handle_Geom_TrimmedCurve.hxx
Seems to be replaced by:
/usr/include/opencascade/Geom_TrimmedCurve.hxx
A workaround is to create a symbolic link with the old name pointing to the current file, something like:
ln -s /usr/include/opencascade/Geom_TrimmedCurve.hxx Handle_Geom_TrimmedCurve.hxx
And to repeat this for every missing file. I can't guarantee it will solve all the compilation issues but at least it will hwlp to find the missing files.

from heekscad.

hadess avatar hadess commented on August 29, 2024

I have created a fork which compiles with the latest OpenCascade (7.6.0). See https://github.com/bullestock/heekscad/

I tried to build it against OpenCascade 7.6.2 (or rather https://gitlab.com/blobfish/occt.git/ commit f3f00c9e9487713be0c64f36c53590cc0f30e5a6), and ran into errors as well:

build log
[16/135] Building CXX object interface/CMakeFiles/heeksintf.dir/Geom.cpp.o
/run/build/heekscad/interface/Geom.cpp: In function ‘bool intersect(const gp_Pln&, const gp_Pln&, gp_Lin&)’:
/run/build/heekscad/interface/Geom.cpp:80:81: warning: ‘static opencascade::handle<T> opencascade::handle<T>::DownCast(const opencascade::handle<T2>&, typename std::enable_if<(! opencascade::is_base_but_not_same<T2, T>::value), void*>::type) [with T2 = Geom_Plane; T = Geom_Plane; typename std::enable_if<(! opencascade::is_base_but_not_same<T2, T>::value), void*>::type = void*]’ is deprecated: down-casting from object of the same or unrelated type is meaningless [-Wdeprecated-declarations]
   80 |                         Handle (Geom_Surface) hs = Handle (Geom_Plane)::DownCast(g_p);
      |                                                                                 ^
In file included from /app/include/opencascade/Bnd_Box.hxx:22,
                 from /run/build/heekscad/src/stdafx.h:75,
                 from /run/build/heekscad/interface/Geom.cpp:5:
/app/include/opencascade/Standard_Handle.hxx:203:19: note: declared here
  203 |     static handle DownCast (const handle<T2>& theObject, typename opencascade::std::enable_if<!is_base_but_not_same<T2, T>::value, void*>::type = 0)
      |                   ^~~~~~~~
/run/build/heekscad/interface/Geom.cpp:81:82: warning: ‘static opencascade::handle<T> opencascade::handle<T>::DownCast(const opencascade::handle<T2>&, typename std::enable_if<(! opencascade::is_base_but_not_same<T2, T>::value), void*>::type) [with T2 = Geom_Plane; T = Geom_Plane; typename std::enable_if<(! opencascade::is_base_but_not_same<T2, T>::value), void*>::type = void*]’ is deprecated: down-casting from object of the same or unrelated type is meaningless [-Wdeprecated-declarations]
   81 |                         Handle (Geom_Surface) hs2 = Handle (Geom_Plane)::DownCast(g_p2);
      |                                                                                  ^
/app/include/opencascade/Standard_Handle.hxx:203:19: note: declared here
  203 |     static handle DownCast (const handle<T2>& theObject, typename opencascade::std::enable_if<!is_base_but_not_same<T2, T>::value, void*>::type = 0)
      |                   ^~~~~~~~
[18/135] Running utility command for translations
/run/build/heekscad/translations/de/HeeksCAD.po:9: warning: header field 'Language' missing in header
/run/build/heekscad/translations/es/HeeksCAD.po:9: warning: header field 'Project-Id-Version' still has the initial default value
/run/build/heekscad/translations/es/HeeksCAD.po:9: warning: header field 'PO-Revision-Date' still has the initial default value
/run/build/heekscad/translations/es/HeeksCAD.po:9: warning: header field 'Last-Translator' still has the initial default value
/run/build/heekscad/translations/es/HeeksCAD.po:9: warning: header field 'Language-Team' still has the initial default value
/run/build/heekscad/translations/es/HeeksCAD.po:9: warning: header field 'Language' missing in header
/run/build/heekscad/translations/ko/HeeksCAD.po:2: warning: header field 'Language' missing in header
/run/build/heekscad/translations/ru/HeeksCAD.po:2: warning: header field 'Language' missing in header
/run/build/heekscad/translations/sk/HeeksCAD.po:10: warning: header field 'Language' still has the initial default value
/run/build/heekscad/translations/zh/HeeksCAD.po:7: warning: header field 'Language' missing in header
[41/135] Building CXX object src/CMakeFiles/heekscad.dir/ConversionTools.cpp.o
FAILED: src/CMakeFiles/heekscad.dir/ConversionTools.cpp.o 
/run/ccache/bin/c++ -DHAVE_CONFIG_H -DHAVE_FSTREAM -DHAVE_IOMANIP -DHAVE_IOSTREAM -DHAVE_LIMITS_H -DHEEKSCAD -DLIN -DLININTEL -DTIXML_USE_STL -DUNICODE -DUSE_GENERIC_TREECTRL -DWXUSINGDLL -D_OCC64 -D__WXGTK3__ -D__WXGTK__ -I/run/build/heekscad -I/run/build/heekscad/src -I/usr/include/python3.10 -I/app/include/area -isystem /app/lib/wx/include/gtk3-unicode-3.2 -isystem /app/include/wx-3.2 -isystem /app/include/opencascade -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -pthread -pthread   -Wall -m64 -Wall -m64 -MD -MT src/CMakeFiles/heekscad.dir/ConversionTools.cpp.o -MF src/CMakeFiles/heekscad.dir/ConversionTools.cpp.o.d -o src/CMakeFiles/heekscad.dir/ConversionTools.cpp.o -c /run/build/heekscad/src/ConversionTools.cpp
/run/build/heekscad/src/ConversionTools.cpp: In function ‘bool ConvertSketchToEdges(HeeksObj*, std::__cxx11::list<std::vector<TopoDS_Edge> >&)’:
/run/build/heekscad/src/ConversionTools.cpp:407:64: error: ‘Caught’ is not a member of ‘Standard_Failure’
  407 |                 Handle(Standard_Failure) e = Standard_Failure::Caught();
      |                                                                ^~~~~~
/run/build/heekscad/src/ConversionTools.cpp: In function ‘bool ConvertEdgesToFaceOrWire(const std::vector<TopoDS_Edge>&, std::__cxx11::list<TopoDS_Shape>&, bool)’:
/run/build/heekscad/src/ConversionTools.cpp:468:64: error: ‘Caught’ is not a member of ‘Standard_Failure’
  468 |                 Handle(Standard_Failure) e = Standard_Failure::Caught();
      |                                                                ^~~~~~
[43/135] Building CXX object src/CMakeFiles/heekscad.dir/Edge.cpp.o
FAILED: src/CMakeFiles/heekscad.dir/Edge.cpp.o 
/run/ccache/bin/c++ -DHAVE_CONFIG_H -DHAVE_FSTREAM -DHAVE_IOMANIP -DHAVE_IOSTREAM -DHAVE_LIMITS_H -DHEEKSCAD -DLIN -DLININTEL -DTIXML_USE_STL -DUNICODE -DUSE_GENERIC_TREECTRL -DWXUSINGDLL -D_OCC64 -D__WXGTK3__ -D__WXGTK__ -I/run/build/heekscad -I/run/build/heekscad/src -I/usr/include/python3.10 -I/app/include/area -isystem /app/lib/wx/include/gtk3-unicode-3.2 -isystem /app/include/wx-3.2 -isystem /app/include/opencascade -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -pthread -pthread   -Wall -m64 -Wall -m64 -MD -MT src/CMakeFiles/heekscad.dir/Edge.cpp.o -MF src/CMakeFiles/heekscad.dir/Edge.cpp.o.d -o src/CMakeFiles/heekscad.dir/Edge.cpp.o -c /run/build/heekscad/src/Edge.cpp
/run/build/heekscad/src/Edge.cpp: In member function ‘virtual void CEdge::glCommands(bool, bool, bool)’:
/run/build/heekscad/src/Edge.cpp:60:84: error: ‘class Poly_Triangulation’ has no member named ‘Nodes’; did you mean ‘Node’?
   60 |                                         const TColgp_Array1OfPnt& FNodes = facing->Nodes();
      |                                                                                    ^~~~~
      |                                                                                    Node
/run/build/heekscad/src/Edge.cpp: In member function ‘void CEdge::Blend(double, bool)’:
/run/build/heekscad/src/Edge.cpp:279:16: warning: catching polymorphic type ‘class Standard_Failure’ by value [-Wcatch-value=]
  279 |         catch (Standard_Failure) {
      |                ^~~~~~~~~~~~~~~~
/run/build/heekscad/src/Edge.cpp:280:63: error: ‘Caught’ is not a member of ‘Standard_Failure’
  280 |                 Handle_Standard_Failure e = Standard_Failure::Caught();
      |                                                               ^~~~~~
[48/135] Building CXX object src/CMakeFiles/heekscad.dir/FaceTools.cpp.o
FAILED: src/CMakeFiles/heekscad.dir/FaceTools.cpp.o 
/run/ccache/bin/c++ -DHAVE_CONFIG_H -DHAVE_FSTREAM -DHAVE_IOMANIP -DHAVE_IOSTREAM -DHAVE_LIMITS_H -DHEEKSCAD -DLIN -DLININTEL -DTIXML_USE_STL -DUNICODE -DUSE_GENERIC_TREECTRL -DWXUSINGDLL -D_OCC64 -D__WXGTK3__ -D__WXGTK__ -I/run/build/heekscad -I/run/build/heekscad/src -I/usr/include/python3.10 -I/app/include/area -isystem /app/lib/wx/include/gtk3-unicode-3.2 -isystem /app/include/wx-3.2 -isystem /app/include/opencascade -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -pthread -pthread   -Wall -m64 -Wall -m64 -MD -MT src/CMakeFiles/heekscad.dir/FaceTools.cpp.o -MF src/CMakeFiles/heekscad.dir/FaceTools.cpp.o.d -o src/CMakeFiles/heekscad.dir/FaceTools.cpp.o -c /run/build/heekscad/src/FaceTools.cpp
/run/build/heekscad/src/FaceTools.cpp: In function ‘void DrawFace(TopoDS_Face, void (*)(const double*, const double*), bool)’:
/run/build/heekscad/src/FaceTools.cpp:167:59: error: ‘class Poly_Triangulation’ has no member named ‘Nodes’; did you mean ‘Node’?
  167 |                 const TColgp_Array1OfPnt& Nodes = facing->Nodes();
      |                                                           ^~~~~
      |                                                           Node
/run/build/heekscad/src/FaceTools.cpp:168:75: warning: ‘const Poly_Array1OfTriangle& Poly_Triangulation::Triangles() const’ is deprecated: Deprecated method, Triangle() should be used instead [-Wdeprecated-declarations]
  168 |                 const Poly_Array1OfTriangle& triangles = facing->Triangles();
      |                                                          ~~~~~~~~~~~~~~~~~^~
In file included from /app/include/opencascade/Poly_ListOfTriangulation.hxx:20,
                 from /app/include/opencascade/BRep_Builder.hxx:31,
                 from /app/include/opencascade/BRepPrim_Builder.hxx:24,
                 from /app/include/opencascade/BRepPrim_GWedge.hxx:24,
                 from /app/include/opencascade/BRepPrim_Wedge.hxx:24,
                 from /app/include/opencascade/BRepPrimAPI_MakeBox.hxx:24,
                 from /run/build/heekscad/src/stdafx.h:103,
                 from /run/build/heekscad/src/FaceTools.cpp:5:
/app/include/opencascade/Poly_Triangulation.hxx:318:32: note: declared here
  318 |   const Poly_Array1OfTriangle& Triangles() const { return myTriangles; }
      |                                ^~~~~~~~~
[49/135] Building CXX object src/CMakeFiles/heekscad.dir/DigitizedPoint.cpp.o
/run/build/heekscad/src/DigitizedPoint.cpp: In static member function ‘static bool DigitizedPoint::GetEllipse(const DigitizedPoint&, const DigitizedPoint&, const DigitizedPoint&, gp_Elips&)’:
/run/build/heekscad/src/DigitizedPoint.cpp:288:16: warning: variable ‘x_axis’ set but not used [-Wunused-but-set-variable]
  288 |         gp_Dir x_axis = e.XAxis().Direction();
      |                ^~~~~~
/run/build/heekscad/src/DigitizedPoint.cpp:289:16: warning: variable ‘y_axis’ set but not used [-Wunused-but-set-variable]
  289 |         gp_Dir y_axis = e.YAxis().Direction();
      |                ^~~~~~
[52/135] Building CXX object src/CMakeFiles/heekscad.dir/Face.cpp.o
FAILED: src/CMakeFiles/heekscad.dir/Face.cpp.o 
/run/ccache/bin/c++ -DHAVE_CONFIG_H -DHAVE_FSTREAM -DHAVE_IOMANIP -DHAVE_IOSTREAM -DHAVE_LIMITS_H -DHEEKSCAD -DLIN -DLININTEL -DTIXML_USE_STL -DUNICODE -DUSE_GENERIC_TREECTRL -DWXUSINGDLL -D_OCC64 -D__WXGTK3__ -D__WXGTK__ -I/run/build/heekscad -I/run/build/heekscad/src -I/usr/include/python3.10 -I/app/include/area -isystem /app/lib/wx/include/gtk3-unicode-3.2 -isystem /app/include/wx-3.2 -isystem /app/include/opencascade -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -pthread -pthread   -Wall -m64 -Wall -m64 -MD -MT src/CMakeFiles/heekscad.dir/Face.cpp.o -MF src/CMakeFiles/heekscad.dir/Face.cpp.o.d -o src/CMakeFiles/heekscad.dir/Face.cpp.o -c /run/build/heekscad/src/Face.cpp
/run/build/heekscad/src/Face.cpp: In member function ‘virtual void RotateToFace::Run()’:
/run/build/heekscad/src/Face.cpp:275:25: warning: variable ‘inv_matrix’ set but not used [-Wunused-but-set-variable]
  275 |                 gp_Trsf inv_matrix = face_matrix.Inverted();
      |                         ^~~~~~~~~~
/run/build/heekscad/src/Face.cpp: In member function ‘bool CFace::IsAPlane(gp_Pln*)’:
/run/build/heekscad/src/Face.cpp:388:40: warning: variable ‘n00’ set but not used [-Wunused-but-set-variable]
  388 |                                 gp_Dir n00 = GetNormalAtUV(uv_box[0] + U * 0.1, uv_box[2] + V * 0.1, &p00);
      |                                        ^~~
/run/build/heekscad/src/Face.cpp:389:40: warning: variable ‘nN0’ set but not used [-Wunused-but-set-variable]
  389 |                                 gp_Dir nN0 = GetNormalAtUV(uv_box[0] + U * 0.9, uv_box[2] + V * 0.1, &pN0);
      |                                        ^~~
/run/build/heekscad/src/Face.cpp:390:40: warning: variable ‘nNN’ set but not used [-Wunused-but-set-variable]
  390 |                                 gp_Dir nNN = GetNormalAtUV(uv_box[0] + U * 0.9, uv_box[2] + V * 0.9, &pNN);
      |                                        ^~~
/run/build/heekscad/src/Face.cpp:402:48: warning: variable ‘n’ set but not used [-Wunused-but-set-variable]
  402 |                                         gp_Dir n = GetNormalAtUV(u[i], v[j], &p);
      |                                                ^
/run/build/heekscad/src/Face.cpp:376:32: warning: variable ‘n00’ set but not used [-Wunused-but-set-variable]
  376 |                         gp_Dir n00 = GetNormalAtUV(u[0], v[0], &p00);
      |                                ^~~
/run/build/heekscad/src/Face.cpp:377:32: warning: variable ‘nN0’ set but not used [-Wunused-but-set-variable]
  377 |                         gp_Dir nN0 = GetNormalAtUV(u[GRID], v[0], &pN0);
      |                                ^~~
/run/build/heekscad/src/Face.cpp:378:32: warning: variable ‘nNN’ set but not used [-Wunused-but-set-variable]
  378 |                         gp_Dir nNN = GetNormalAtUV(u[GRID], v[GRID], &pNN);
      |                                ^~~
/run/build/heekscad/src/Face.cpp: In member function ‘bool CFace::GetNurbSurfaceParams(CNurbSurfaceParams*)’:
/run/build/heekscad/src/Face.cpp:650:15: warning: catching polymorphic type ‘class Standard_Failure’ by value [-Wcatch-value=]
  650 |         catch(Standard_Failure) {
      |               ^~~~~~~~~~~~~~~~
/run/build/heekscad/src/Face.cpp:651:64: error: ‘Caught’ is not a member of ‘Standard_Failure’
  651 |                 Handle(Standard_Failure) e = Standard_Failure::Caught();
      |                                                                ^~~~~~
[54/135] Building CXX object src/CMakeFiles/heekscad.dir/DigitizeMode.cpp.o
/run/build/heekscad/src/DigitizeMode.cpp: In member function ‘virtual const wxChar* DigitizeMode::GetTitle()’:
/run/build/heekscad/src/DigitizeMode.cpp:51:23: warning: enumeration value ‘DigitizeNoItemType’ not handled in switch [-Wswitch]
   51 |                 switch(digitized_point.m_type)
      |                       ^
/run/build/heekscad/src/DigitizeMode.cpp:51:23: warning: enumeration value ‘DigitizeCoordsType’ not handled in switch [-Wswitch]
/run/build/heekscad/src/DigitizeMode.cpp:51:23: warning: enumeration value ‘DigitizeInputType’ not handled in switch [-Wswitch]
/run/build/heekscad/src/DigitizeMode.cpp: In member function ‘DigitizedPoint DigitizeMode::digitize1(const wxPoint&)’:
/run/build/heekscad/src/DigitizeMode.cpp:281:16: warning: variable ‘best_dp’ set but not used [-Wunused-but-set-variable]
  281 |         double best_dp = 0;
      |                ^~~~~~~
[56/135] Building CXX object src/CMakeFiles/heekscad.dir/CxfFont.cpp.o

That was after I modified heekscad to use BRepAlgoAPI_Fuse instead of BRepAlgo_Fuse which got removed from the 7.6.0 API.

from heekscad.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.