Hello Linganesan,

thanks for your interest. The freecad dependencies should actually be 
installed pretty easily, for windows we provide a libpack with all 
dependencies and for linux they should be all installable by repositories.

>    1. As I understand, we can import FreeCAD python Api as a seperate
>    module[4] which can be used by IPython.
Yes, FreeCAD can be importet as standalone python module into IPython. FreeCAD 
is seperated between an App and an GUI part. As for IPython we do not want to 
show up the FreeCAD GUI but need the GUI parts for visualisation (the 
viewproviders) have a look at FreeCADGui.setupWithoutGui()

>    2. So here we need a '3D web viewer' to render the models which are
>    generated by IPython(Qtconsole/Jupyter).
Yes. The models are generated in ipython via the freecad API. Internally 
document objects are generated, which in itself cannot be visualized. But the 
GUI part provides visualisation for each document object via a viewprovider. 
Those viewproviders generate the 3d scene graph which should be visualized via 
the qt console/jupyter.

>    3. OpenInventor API generates scenegraph which is constructing by coin3D
>    library in a 3D viewer. 
Yes, the viewproviders build up the openinventor scene graph. We use coin3d 
for this. The construction of the scene graph is however independend from the 
rendering. We cannot directly render with coin3d into ipython GUI, but we can 
use the already constructed scenegraph and traverse it. An example for this is 
the coin3d SoToVRML converter action which could be used as example of how to 
traverse the scenegraph and create something out of it.
https://bitbucket.org/Coin3D/coin/src/
559be0543cbce3235cdc6dce13c8cc112eb212a5/src/actions/SoToVRMLAction.cpp?
at=default&fileviewer=file-view-default

>    If I'm not wrong, here we can use pythonOCC with
>    webgl [2] [3] instead of coin3d.
No this is not possible. FreeCAD does not use opencascades visualisation at 
all, hence it is not easily transfered to python occ webgl viewer. Also we 
visualize many more things than only occ data structures, and all of this 
needs to be possible to render in ipython too. This is why we want to mirror 
the 3d scenegraph directly. The basic idea was to find a webgl js library 
which has a scene structure pretty close to openinventor and then simply 
traverse the scenegraph and create a new webgl scene graph from it in a new 
html file. This webgl file can than be exported standalone and also used to 
show the scene in ipython, which allows javascript visualisation. How to 
incorporate ineractive webgl into ipython qtconsole/jupyter needs some 
research, but it is possible as shwon by other implmentations.

> Now I'm analyzing the source code to get a clear
> view.
Feel free to  ask questions on irc and especially the forum. FreeCAD is not 
easy to grasp, it is a rather large code base with too little documentation.

Regards,
Stefan


On Sunday, March 13, 2016 05:52:09 AM Linganesan Mani wrote:
> Hi Stefan,
> 
> Thanks for your reply and suggestion, When I was gone through your
> recommend page I found this IPython integretion page[1] which got my great
> attention. Here I need some clarifications according to what I have
> understood,
> 
>    1. As I understand, we can import FreeCAD python Api as a seperate
>    module[4] which can be used by IPython.
>    2. So here we need a '3D web viewer' to render the models which are
>    generated by IPython(Qtconsole/Jupyter).
>    3. OpenInventor API generates scenegraph which is constructing by coin3D
>    library in a 3D viewer. If I'm not wrong, here we can use pythonOCC with
>    webgl [2] [3] instead of coin3d.
> 
> Also I forked the FreeCAD repository and successfully compiled on my
> machine. Seriously, those dependencies took whole day to find the ways to
> install each of them :P. Now I'm analyzing the source code to get a clear
> view.
> 
> [1]
> http://www.freecadweb.org/wiki/index.php?title=IPython_notebook_integration
> 
> [2]
> http://www.pythonocc.org/features_overview/experimental-webgl-renderer-towar
> ds-cad-in-a-browser/
> 
> [3] https://www.youtube.com/watch?v=0GXbfzWV8qk
> 
> [4] http://www.freecadweb.org/wiki/index.php?title=Embedding_FreeCAD
> 
> On 8 March 2016 at 22:57, Stefan Tröger <stefantroe...@gmx.net> wrote:
> > Hello  Linganesan,
> > 
> > as you seem to be interested in exposing geometric functionality to python
> > I
> > like to take the chance and point you to another project idea with this
> > scope:
> > http://www.freecadweb.org/wiki/index.php?
> > title=Extend_Part_workbench_python_API
> > It is a bit different in the sense that it requires not a pure wrapper but
> > also some coding and API design. For your consideration.
> > 
> > Regards,
> > Stefan
> > 
> > On Tuesday, March 08, 2016 05:48:12 PM Linganesan Mani wrote:
> > > Hi,
> > > I am Linganesan, undergraduate computer engineering student. I have a
> > 
> > sound
> > 
> > > knowledge in python and great enthusiasm in computer graphics. I've gone
> > > through Python Geometry[1] page in Brlcad wiki. I'm really excited to
> > > contribute this project. I cloned the git repository which given on that
> > > page, but I get some error while I tried to install python-brlcad.[2] I
> > > guess those are some issues causing by ctypesgen! How can I resolve
> > > those
> > > issues? Also now the project is on python 2.x, Is feasible to convert
> > 
> > that
> > 
> > > in to python 3.x? Could you please help me to continue on this project.
> > > 
> > > [1] - http://brlcad.org/wiki/Python_Geometry
> > > [2] - http://pastebin.com/hSvQzVRe
> > > 
> > > Thank you,


------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140
_______________________________________________
BRL-CAD Developer mailing list
brlcad-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-devel

Reply via email to