Closed grd closed 1 year ago
What OpenCascade version do you have installed?
That is a good question. ATM I use xubuntu and I think that I have the latest release but I found this: https://packages.ubuntu.com/source/kinetic/opencascade
After a git pull I got this error message from compiling nim cpp -r bottle.nim
/home/user/.cache/nim/bottle_d/@mbottle.nim.cpp: In function ‘void main__bottle_3()’:
/home/user/.cache/nim/bottle_d/@mbottle.nim.cpp:350:41: error: no matching function for call to ‘BRepOffsetAPI_MakeThickSolid::MakeThickSolidByJoin(TopoDS_Shape&, TY__GIqsjlKJHsTq0jbUI9bnu9aw&, float, float, BRepOffset_Mode, bool, bool, GeomAbs_JoinType, bool, Message_ProgressRange&)’
350 | aSolidMaker.MakeThickSolidByJoin(myBody, facesToRemove, ((float) (((NF)(-(myThickness)) / (NF)(50.0)))), 0.001f, ((BRepOffset_Mode) 0), NIM_FALSE, NIM_FALSE, ((GeomAbs_JoinType) 0), NIM_FALSE, T31_);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/user/.cache/nim/bottle_d/@mbottle.nim.cpp:48:
/usr/include/opencascade/BRepOffsetAPI_MakeThickSolid.hxx:117:24: note: candidate: ‘void BRepOffsetAPI_MakeThickSolid::MakeThickSolidByJoin(const TopoDS_Shape&, const TopTools_ListOfShape&, Standard_Real, Standard_Real, BRepOffset_Mode, Standard_Boolean, Standard_Boolean, GeomAbs_JoinType, Standard_Boolean)’
117 | Standard_EXPORT void MakeThickSolidByJoin(const TopoDS_Shape& S,
| ^~~~~~~~~~~~~~~~~~~~
/usr/include/opencascade/BRepOffsetAPI_MakeThickSolid.hxx:117:24: note: candidate expects 9 arguments, 10 provided
Error: execution of an external compiler program 'g++ -c -std=gnu++14 -funsigned-char -w -fmax-errors=3 -fpermissive -I/usr/include/opencascade/ -I/usr/import/opencascade/ -I/home/user/.choosenim/toolchains/nim-1.6.10/lib -I/home/user/occt.nim/examples -o /home/user/.cache/nim/bottle_d/@mbottle.nim.cpp.o /home/user/.cache/nim/bottle_d/@mbottle.nim.cpp' failed with exit code: 1
Which AFAIK means that it can't find the right function parameters.
But now I also can't compile fillet01.nim
and also not step01.niim
but in both accounts the error is different than from bottle01.nim
. This error is like this:
/home/user/occt.nim/examples/step01.nim(4, 13) Error: undeclared identifier: 'newBRepPrimAPI_MakeBox'
candidates (edit distance, scope distance); see '--spellSuggest':
(3, 4): 'brepprimapi_makebox' [module declared in /home/user/occt.nim/src/wrapper/tkprim/brepprimapi/brepprimapi_includes.nim(6, 8)]
It looks like the signature of your /usr/include/opencascade/BRepOffsetAPI_MakeThickSolid.hxx
:
void BRepOffsetAPI_MakeThickSolid::MakeThickSolidByJoin(
const TopoDS_Shape&,
const TopTools_ListOfShape&,
Standard_Real,
Standard_Real,
BRepOffset_Mode,
Standard_Boolean,
Standard_Boolean,
GeomAbs_JoinType,
Standard_Boolean)
in my system:
Standard_EXPORT void MakeThickSolidByJoin(
const TopoDS_Shape& S,
const TopTools_ListOfShape& ClosingFaces,
const Standard_Real Offset,
const Standard_Real Tol,
const BRepOffset_Mode Mode = BRepOffset_Skin,
const Standard_Boolean Intersection = Standard_False,
const Standard_Boolean SelfInter = Standard_False,
const GeomAbs_JoinType Join = GeomAbs_Arc,
const Standard_Boolean RemoveIntEdges = Standard_False,
const Message_ProgressRange& theRange = Message_ProgressRange()); #<-- It looks like this is missing
Right now I am not targetting a fixed OpenCascade version. I am working with what I get in ArchLinux. I would suggest to try to use a git version for opencascade in Ubuntu. I don't know if that is possible.
The API shows here that the Message_ProgressRange
is part of the API.
I agree and I am gonna close this issue.
This is the error message:
I can compile
fillet01.nim