Embebding FreeCAd inDelphi

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
Post Reply
jacapu
Posts: 4
Joined: Sun May 17, 2015 6:17 pm

Embebding FreeCAd inDelphi

Post by jacapu »

Hello to all!!
I am new in FreeCAD and I have two questions:
It´s possible to embebding FreeCAD window in a Delphi project?
How?

Thanks.
wmayer
Founder
Posts: 20309
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Embebding FreeCAd inDelphi

Post by wmayer »

Major parts of FreeCAD are written in C++. I doubt that you can call C++ stuff from within Delphi. However, for most functionality FreeCAD offers a Python binding and since Python in written in plain C there might be a little chance to go this direction.
jacapu
Posts: 4
Joined: Sun May 17, 2015 6:17 pm

Re: Embebding FreeCAd inDelphi

Post by jacapu »

Hello wmayer,
I have a Delphi application that creates 3D faces in a DXF file.
My idea is to import this file into a window that could be FreeCAD for viewing.
I guess to import 3D DXF files FreeCAD no problem.
What I want is to embed FreeCAD window in a window of my Delphi application to import the DXF file and navigate through Python, to have not run FreeCAD in another thread.
Is that possible ?.
Greetings and thanks for your time.
wmayer
Founder
Posts: 20309
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Embebding FreeCAd inDelphi

Post by wmayer »

Here is an example using the Windows API and C/C++ to embed FreeCAD as a child window. The most important point is calling "FreeCADGui.embedToWindow".
jacapu
Posts: 4
Joined: Sun May 17, 2015 6:17 pm

Re: Embebding FreeCAd inDelphi

Post by jacapu »

Hellow wmayer,
Where is the example?
I cant see it.
jacapu
Posts: 4
Joined: Sun May 17, 2015 6:17 pm

Re: Embebding FreeCAd inDelphi

Post by jacapu »

Thanks, I'll try to make a library (dll), with this code for use in Delphi.
Greetings.
wmayer
Founder
Posts: 20309
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Embebding FreeCAd inDelphi

Post by wmayer »

FYI, here is someone else who is working with Delphi: viewtopic.php?t=11038 or viewtopic.php?f=24&t=5974
Post Reply