Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

‘gp_Pln pln’ has incomplete type #9

Closed
J-Dunn opened this issue Nov 30, 2018 · 23 comments
Closed

‘gp_Pln pln’ has incomplete type #9

J-Dunn opened this issue Nov 30, 2018 · 23 comments

Comments

@J-Dunn
Copy link

J-Dunn commented Nov 30, 2018

Hi,

I have coin4 and FreeCAD-pivy installed. I now got 36% into building FreeCAD-LinkStage3 on Fedora 29 with gcc 8.2.1 and hit this error.

/svn/FreeCAD-LinkStage3/src/Mod/Part/App/TopoShapePyImp.cpp: In member function ‘PyObject* Part::TopoShapePy::findPlane(PyObject*)’:
/svn/FreeCAD-LinkStage3/src/Mod/Part/App/TopoShapePyImp.cpp:2126:16: error: aggregate ‘gp_Pln pln’ has incomplete type and cannot be defined
         gp_Pln pln;
                ^~~
make[2]: *** [src/Mod/Part/App/CMakeFiles/Part.dir/build.make:1549: src/Mod/Part/App/CMakeFiles/Part.dir/TopoShapePyImp.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1856: src/Mod/Part/App/CMakeFiles/Part.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

Any suggestions how to tackle the problem?

thx

@realthunder
Copy link
Owner

I just made a commit to add the header. However, the fact that you have this error probably means that you are not using OCCT 7 (the CAD kernel), but OCE instead. If not sure, please attach your <build_dir>/CMakeCache.txt file here and let me check. It is strongly recommended to update OCCT to at least version 7. Official FreeCAD binary distribution is using OCCT 7.3 now.

@J-Dunn
Copy link
Author

J-Dunn commented Nov 30, 2018

//disable usage of occt-config files
OCCT_CMAKE_FALLBACK:BOOL=OFF

//The directory containing a CMake configuration file for OCE.
OCE_DIR:PATH=/lib64/oce-0.18

There is only one occurance of "OCCT" in that file. There are tons of "OCE".

I do recall seeing something about OCE VS OCCT, but don't recall where. How do I fix that?

@realthunder
Copy link
Owner

Looks like there is no official build for OCCT 7 on Fedora, again. I found a post regarding Fedora build. Maybe you can ask around. It is not just OCCT, but other companion libraries as well.

I'll modify my branch to compile with OCE. Meanwhile, if you really want, you can try download OCCT source from here, and compile it, with cmake -DCMAKE_BUILD_TYPE=Release and make. But I image you'll get into trouble along the way.

In order for FreeCAD to use OCCT, you need to add -DFREECAD_USE_OCC_VARIANT="Official Version" when running cmake.

@J-Dunn
Copy link
Author

J-Dunn commented Dec 1, 2018

Thanks, I'd already figured we had to go to OCCT for the source. I tried your defines:

cmake -DFREECAD_USE_OCC_VARIANT="Official Version" -DCMAKE_BUILD_TYPE=Release ..

It seemed OK but reported:

CMake Warning:
Manually-specified variables were not used by the project:

FREECAD_USE_OCC_VARIANT

Looks like it may matter ;)

@realthunder
Copy link
Owner

realthunder commented Dec 1, 2018

FREE_USE_OCC_VARIANT is for FreeCAD cmake, not OCCT. Once you get OCCT built and installed, you need to re-run cmake in your FreeCAD build directory, with this -DFREECAD_USE_OCC_VARIANT="Official Version"

@J-Dunn
Copy link
Author

J-Dunn commented Dec 1, 2018

@J-Dunn
Copy link
Author

J-Dunn commented Dec 1, 2018

you need to re-run cmake in your FreeCAD build directory, with this -DFREECAD_USE_OCC_VARIANT="Official Version"

sorry, I did not get what you meant. So I need to build LinkStage3 with that option then.

@realthunder
Copy link
Owner

I have fix build using OCE. In case you can't get through with OCCT, you can fallback to OCE.

@J-Dunn
Copy link
Author

J-Dunn commented Dec 1, 2018

Thanks,

I got the latest version just after you posted it. I have built and installed OCCT , fine.

-- Checking for module 'Coin'
--   Package 'Coin', required by 'virtual:world', not found
-- Found Spnav: /usr/lib64/libspnav.so  
-- Using default python: -python2.7
-- libshiboken built for Release
-- Found PySide Tools: /bin/pyside-uic, /bin/pyside-rcc
-- -- matplotlib-2.2.3 has been found.
-- Platform is 64-bit, set -D_OCC64
-- Build type: 
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
bzr: ERROR: Not a branch: "/svn/FreeCAD-LinkStage3/".
svn: E155007: '/svn/FreeCAD-LinkStage3' is not a working copy
Unknown version control
/svn/FreeCAD-LinkStage3/linkstage3_build/src/Build/Version.h.out written

Coin4 is installed. Am I right in thinking that this does not affect the build process? Hopefully it will be found at run time.

The git error is because I unpacked from a zip download. It seems this is less "fatal" than indicated since the make process is running.

This is advancing much faster than a FreeCAD build. I thought this was a fork. Do I need to leave the FreeCAD 0.18 master in place or remove it?

thanks.

@realthunder
Copy link
Owner

Looks okay. And yes, this is a fork. You can probably keep the upstream master around for comparison in case you found something wrong. There are quite a lot changes. Oh, and don't forget to build python solvespace.

@J-Dunn
Copy link
Author

J-Dunn commented Dec 1, 2018

thanks, I have upstream master at /usr/local/bin/FreeCAD. Presumably your version will install to the same place, so I need to 'make uninstall ' the original ( just keeping the build directory ).

If I follow you install instructions correctly I just need to copy tree to Ext/freecad/ and rename it asm3. No build process.

since your slvs instructions rely on git , I'd better get a git copy of asm3, rather than my zip version, since I don't think the git commands will work from the zip contents.

@realthunder
Copy link
Owner

You don't need to uninstall the upstream. You can run my branch directly from its build location. And git clone asm3 into your <build_dir>/Ext/freecad directory. I have prebuilt binary inside asm3 repo, which may or may not work depending on your system library version. You can try it first.

@J-Dunn
Copy link
Author

J-Dunn commented Dec 1, 2018

I thought it was a bit strange that there were no build instructions for asm3.

I wish to build everything from source, I have not spent the last week battling with all the issues just to dump a precompiled binary in at this stage.
What is the binary called, and what do I need to do to rebuild it ?

I have just done a git-clone of your FreeCAD_assembly3 and copied it across.

cd FreeCAD-LinkStage3/linkstage3_build/Ext/freecad
cp -a FreeCAD_assembly3 asm3

@realthunder
Copy link
Owner

Inside asm3 directory, run

git submodule update --init --recursive

Then cd to slvs sub directory, and run

mkdir build
cd build
cmake -DBUILD_PYTHON=1  ..
make

Detailed instruction can be found here. After done, copy out the binary as described in the instruction.

@J-Dunn
Copy link
Author

J-Dunn commented Dec 1, 2018

Many thanks. I've just done _slvs and the main LinkStage3 and just completed without tripping up ( about 4h worth ).

Those were the instructions I was following, so there is nothing to be done inside asm3 apart from
make _smvs

I should be good to go .... at last.

@J-Dunn
Copy link
Author

J-Dunn commented Dec 1, 2018

OK , running from the build dir, as normal use it seems to work and opens up a block I have made with older versions. Now to see whether I can assemble something !!

Many thanks for you help in building all this. It would have been impossibly long without some guidance.

@J-Dunn
Copy link
Author

J-Dunn commented Dec 1, 2018

I am trying to follow this explanatory guide:
https://github.com/realthunder/FreeCAD_assembly3/wiki/Create-Skeleton-Sketch
but having added assembly container; added a default workplane, selected it I don't find the indicated icon for adding sketch plane. Neither does there seem to be anything on the Assembly3 menu which matches.

Select the new work plane, and click AddSketchPlane to add a sketchPlane constraint

Are these instructions in sync with the current build?

thx

@realthunder
Copy link
Owner

Click the icon with three dots to reveal extra buttons.

@J-Dunn
Copy link
Author

J-Dunn commented Dec 2, 2018

Thanks, this thing has more icons that Photoshop ! It's hard to find your way around at first.

I'm trying to do the cylinder+cube asm3 example but I can't get rid of the move part tool. In the anim, you just seem to click somewhere and it disappears but it's not clear what you do. This is problem I'm having persistently with FreeCAD. There must be some way to get out of a tool and back to the arrow cursor that I'm missing. Can you help?

thx

@J-Dunn
Copy link
Author

J-Dunn commented Dec 2, 2018

Ah, I needed to find the Esc key ( not too evident on an anim ! ) .
Cool I have a simple model of a bearing and have assembled it onto a round bar. It works!

@luzpaz
Copy link
Collaborator

luzpaz commented Dec 14, 2020

@J-Dunn do you mind updating what the status of this ticket is?

@J-Dunn
Copy link
Author

J-Dunn commented Dec 14, 2020

Sorry, I have not used asm3 in about 18mo. I found great in what it did but it got unusably slow once the assembly got a few levels deep. I even bought an SSD since this was meant to speed it up but it didn't help. asm3 served as a great intro to FreeCAD but I admit I can't even remember where I was with this issue. It is possible I had to fall back to using AppImage files instead of a full dev build.

@realthunder
Copy link
Owner

@J-Dunn Please make a new issue for the problem. And it will be better if you can provide a file showing the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants