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

Qt 5.x and OpenCasCade 7.x #2

Open
xiaozhaolook opened this issue Jul 3, 2018 · 10 comments
Open

Qt 5.x and OpenCasCade 7.x #2

xiaozhaolook opened this issue Jul 3, 2018 · 10 comments
Assignees
Labels
enhancement New feature or request

Comments

@xiaozhaolook
Copy link

Hi,
could you rewrite this project using Qt 5.x and OpenCasCade 7.x , and I think it's more convenient to construct this Sketcher Project using CMake, I have wrote a CMakeLists.txt as following :
`cmake_minimum_required( VERSION 2.8.11 )

project( sketcher_example)

set(CMAKE_INCLUDE_CURRENT_DIR ON)

find_package(Qt5 REQUIRED Core QUIET COMPONENTS Xml Script OpenGL Svg)

include_directories (BEFORE ../../include)
include_directories (BEFORE ./include)

find_package(Qt5Widgets)
include_directories(${PROJECT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
$ENV{OCCT_INCLUDES})
FILE(GLOB OCCT_LIBRARIES "D:/Program Files (x86)/OCCT/win32/vc12/lib/*.lib")
LINK_LIBRARIES(${OCCT_LIBRARIES})

FILE(GLOB PROJECT_SRCS
".h"
"
.hxx"
"*.cpp"
)

FILE(GLOB PROJECT_UIS
"*.ui"
)

SET( RESOURCE
${CMAKE_SOURCE_DIR}/icons/iconfiles.qrc
)

FILE(GLOB PROJECT_MOC_HDRS
".h"
"
.hxx"
)

QT5_WRAP_UI( PROJECT_UIS_H
${PROJECT_UIS}
)
QT5_WRAP_CPP( PROJECT_MOC_SRCS
${PROJECT_MOC_HDRS}
)

QT5_ADD_RESOURCES(RESOURCE_ADDED ${RESOURCE})

ADD_EXECUTABLE( sketcher_example
${PROJECT_SRCS}
${PROJECT_UIS_H}
${PROJECT_MOC_SRCS}
${RESOURCE_ADDED}
)

TARGET_LINK_LIBRARIES ( sketcher_example
Qt5::Widgets
Qt5::Core
Qt5::Gui
)
`
but when I try to compile the project, many error appeared,such as:
1.error LNK2005: "public: virtual struct QMetaObject const * __thiscall ApplicationWindow::metaObject(void)const " (?metaObject@ApplicationWindow@@UBEPBUQMetaObject@@xz) already defined in moc_Application.cxx.obj E:\sketcher_example\Build\moc_Application.cpp.obj sketcher_example

DEFINE_STANDARD_HANDLE(Geom2d_Edge, Geom2d_Line)
Error: class "Handle_Geom2d_Edge" has no member "Access"

3.Many headers no found in OpenCasCade 7.0 , such as :
#include <AIS_Drawer.hxx>
#include <PTopoDS_HShape.hxx>
#include <PTColStd_PersistentTransientMap.hxx>
#include <PTColStd_TransientPersistentMap.hxx>

even though after two days' work , I have fixed many bugs, but also have remained problem, Can you help me to solve this problem?

@eryar
Copy link
Owner

eryar commented Jul 3, 2018

Hello @xiaozhaolook
I want to rewrite occSketcher for Qt4.x and OpenCASCADE6.x in VS2008 first.

When finished this, it is only need small modification for Qt5.x and opencascade7.x.

@xiaozhaolook
Copy link
Author

Great, I am devoting myself to this work too, but why not work with Qt 5.x and OCCT 7.x directly? Could we work on this project together?

@eryar
Copy link
Owner

eryar commented Jul 4, 2018

Ok.

I will use Qt5.8 and OCCT7.3 directly.
Then we can work on the project together, and you can pull your code to this project.

@xiaozhaolook
Copy link
Author

xiaozhaolook commented Jul 4, 2018

In fact, I am trying to use Qt 5.6.3 and OCCT 7.0.0, I have compiled those libraries, the lastest two days, I have tried to convert the original project (may write by Qt 2.x and old version OCCT released before 2005), but many debug appeared, and How can I put my code here?

@eryar
Copy link
Owner

eryar commented Jul 4, 2018

I will rewrite the example by using the lastest version occt7.3 Qt sample.
Then you can Fork the code and pull your modifications.
You can use the Git tool to work together with me.

@xiaozhaolook
Copy link
Author

Ok, thank you

@eryar eryar self-assigned this Jul 4, 2018
@eryar eryar added the bug Something isn't working label Jul 4, 2018
@xiaozhaolook
Copy link
Author

Could I add you as a wechat friend? So we can talk about some technology problem directly

@eryar
Copy link
Owner

eryar commented Jul 9, 2018

ok.

My Wechat id: eryarfly

@eryar eryar added enhancement New feature or request and removed bug Something isn't working labels Aug 2, 2018
@grotius-cnc
Copy link

I never use cmake for my own work. But usually cmake .. works fine.

I have a opencascade lib compiled as qt project just with qmake.
In this way you can easely create opencascade opengl intrusions. This is fun.

I think eryar would like to play with this.

could you rewrite this project using Qt 5.x and OpenCasCade 7.x , and I think it's more convenient to construct this Sketcher Project using CMake,

In the issue threat of this repo called "tiny present" i have a link to a archive that includes several things. It shows
how the Sketcher is implemented. An sich it worked out of the box.

@YongcanZhou
Copy link

Hello, is the upgrade successful? If possible, can you please push it, thank you very much!

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

No branches or pull requests

4 participants