[Topologic] Redefining BIM through Spatial Topology, Information, and Grammars

1181921232426

Comments

  • There are also some precompiled binaries here, you probably need the 2022-03-10 Linux zip: https://github.com/brunopostle/Topologic/releases/tag/2022-01-31

    topologicpaullee
  • I downloaded the topologicsverchok, unzip, and find the /site-packages/topologic folder and create link in the FreeCAD/usr/Mod/ folder.

    import topologic return :-

    Traceback (most recent call last):
    File "", line 1, in
    ImportError: /home/paullee/Downloads/FreeCAD_weekly-builds-27008-Linux-Conda_glibc2.12-x86_64/squashfs-root/usr/Mod/Link to topologic/./libTopologicCore.so.0: undefined symbol: _ZN9BRepTools5WriteERK12TopoDS_ShapePKcRKN11opencascade6handleI25Message_ProgressIndicatorEE

  • @paullee it looks like Topologic and Freecad are linked to different versions of opencascade

  • edited March 2022

    I see, FreeCAD info below, how to find out what is the version in the TopologicSverchok ...?
    EDIT - I am using AppImage version of FreeCAD, so probably using version 'bundled' in but not using any Fedora installed OpenCascade (OCE instead of OCC?)
    Thanks again.

    OS: Fedora 34 (Workstation Edition) (GNOME/gnome)
    Word size of FreeCAD: 64-bit
    Version: 0.20.27008 (Git)
    ...
    Python version: 3.9.9
    ...
    OCC version: 7.5.3

  • Tried version in Fedora34 repository, similar error returned.

    OS: Fedora 34 (Workstation Edition) (GNOME/gnome)
    ...
    Version: 0.19.Unknown
    ...
    Python version: 3.9.10
    ...
    OCC version: 7.5.0

  • Does Topologic work outside of FreeCAD from a python console?

  • Thanks for the hint.
    I only learnt python basic and write some codes for FreeCAD, trying to search how to install the module 'manually' outside FreeCAD and python console outside ... see if it works out.

    BTW, in topologicsverchok, the /site-packages/topologic folder is what is needed right ?

    Thanks.

    topologic
  • @paullee said:
    BTW, in topologicsverchok, the /site-packages/topologic folder is what is needed right ?

    Yes exactly.
    Open a shell and cd to that directory
    Start python by typing “python”
    When you see the python prompt type:
    import topologic
    If that works, type:
    v = topologic.Vertex.ByCoordinates(10,20,30)
    If that works at least we know Topologic works and as @brunopostle said, it is a conflict with FreeCAD’s OCC. If that does not work that means your system’s installed OCC is different than what the Topologic binary was bound to. In that case, sadly, you have to build from source so that it links to your installed libraries. It is not a long process and I or @brunopostle can walk you through it. The instructions are clear on GitHub. Happy to jump on a zoom session to sort it for you.

  • edited March 2022

    Oh it works as you says!
    [paullee@fedora topologic]$ python
    Python 3.9.10 (main, Jan 17 2022, 00:00:00)
    [GCC 11.2.1 20210728 (Red Hat 11.2.1-1)] on linux

    import topologic
    topologic.Vertex.ByCoordinates(10,20,30)

    <topologic.Vertex object at 0x7f4c6f0aa430>

    What OCC version topologic is using? I am using AppImage version of FreeCAD, so maybe I need to find same version of OCC first, and check github later then. Thanks again pointing out the direction :D

  • On Windows, I standardised on 7.4.2 But I believe the Linux version is compiled and given to me by @brunopostle I think it is 7.5.3 (he can confirm). I will try to build and link to a new version? What is the version that FreeCAD uses on Linux and on Windows? and what python? Perhaps I should aim to release a binary specific to FreeCAD.

    paullee
  • Please try the following:
    1. Make a note of the path to the topologic site-packages folder. I will call that topologicPath for now. Replace below with the actual path. Keep the double quotes.
    2. Start FreeCAD
    3. In FreeCAD’s own python console type the following:
    import sys
    sys.path.append(“topologicPath”)
    import topologic
    v = topologic.Vertex.ByCoordinates(10,20,30)
    print(v)

    Does the above work??

    paullee
  • @topologic said:
    On Windows, I standardised on 7.4.2 But I believe the Linux version is compiled and given to me by @brunopostle I think it is 7.5.3 (he can confirm). I will try to build and link to a new version? What is the version that FreeCAD uses on Linux and on Windows? and what python? Perhaps I should aim to release a binary specific to FreeCAD.

    I only use AppImage version of FreeCAD on Linux
    -
    Python version: 3.9.10
    ...
    OCC version: 7.5.0

  • @topologic said:
    Please try the following:
    1. Make a note of the path to the topologic site-packages folder. I will call that topologicPath for now. Replace below with the actual path. Keep the double quotes.
    2. Start FreeCAD
    3. In FreeCAD’s own python console type the following:
    import sys
    sys.path.append(“topologicPath”)
    import topologic
    v = topologic.Vertex.ByCoordinates(10,20,30)
    print(v)

    Does the above work??

    On the move, will try soon, many thanks for the instructions again !

  • @topologic said:
    On Windows, I standardised on 7.4.2 But I believe the Linux version is compiled and given to me by @brunopostle I think it is 7.5.3 (he can confirm).

    These portable Linux binaries of Topologic are built with opencascade 7.4.0

    paulleetopologic
  • @brunopostle said:

    @topologic said:
    On Windows, I standardised on 7.4.2 But I believe the Linux version is compiled and given to me by @brunopostle I think it is 7.5.3 (he can confirm).

    These portable Linux binaries of Topologic are built with opencascade 7.4.0

    That explains it then I think. I just successfully built Topologic on Windows with opencascade 7.5.0

  • Note that for fedora (34, 35 & 36) I have built rpm packages of Topologic (and IfcOpenShell/blenderbim), these are linked with the system opencascade (which is currently 7.5.0 on fedora).

    On my fedora 35 system with these packages installed, I can just import topologic in the FreeCAD python console

    topologicpaullee
  • ..also on fedora, there is a FreeCAD Nightly repository. Again this is linked with the standard system libraries so there are no python or opencascade conflicts

    topologicpaullee
  • @topologic said:
    Please try the following:
    1. Make a note of the path to the topologic site-packages folder. I will call that topologicPath for now. Replace below with the actual path. Keep the double quotes.
    2. Start FreeCAD
    3. In FreeCAD’s own python console type the following:
    import sys
    sys.path.append(“topologicPath”)
    import topologic
    v = topologic.Vertex.ByCoordinates(10,20,30)
    print(v)

    Does the above work??

    Tested, it is not working, failed similarly as if I make a Link to FreeCAD/usr/Mod :)

  • @paullee sorry not sure the path is correct. Can you please try one more time without the topologic at the end of the path. Just stop at site-packages. Regardless, I think what @brunopostle suggests is the correct solution: to use FreeCAD as downloaded from the nightly repository.

  • @topologic said:
    @paullee sorry not sure the path is correct. Can you please try one more time without the topologic at the end of the path. Just stop at site-packages. Regardless, I think what @brunopostle suggests is the correct solution: to use FreeCAD as downloaded from the nightly repository.

    Now, some new message which seem more useful :)

    import sys
    sys.path.append("/home/paullee/Downloads/brunopostle_ifcopenshell_topologicPy/usr/lib/python3.9/site-packages/")
    import topologic
    Traceback (most recent call last):
    File "", line 1, in
    File "/home/paullee/Downloads/brunopostle_ifcopenshell_topologicPy/usr/lib/python3.9/site-packages/topologic/init.py", line 54, in
    import cppyy
    ModuleNotFoundError: No module named 'cppyy'

  • @paullee Topologic stopped using cppyy a few months ago, your Topologic is out of date

  • edited March 2022

    paullee
  • @paullee said:
    I downloaded the topologicsverchok, unzip, and find the /site-packages/topologic folder and create link in the FreeCAD/usr/Mod/ folder.

    Hmmm, this is where I downloaded the Linux package.

  • @paullee said:

    @paullee said:
    I downloaded the topologicsverchok, unzip, and find the /site-packages/topologic folder and create link in the FreeCAD/usr/Mod/ folder.

    Hmmm, this is where I downloaded the Linux package.

    Either I accidentally placed the wrong binary in there or you have an old version of Topologic lurking in your standard paths. Do a sweep of python paths and remove any old topologic remnants.

    paullee
  • edited March 2022

    There should be something wrong in my information above.
    Anyway, tested as shown below again, seem topologic is imported but without any methods ? :-

    sys.path.append("/home/paullee/Downloads/topologicsverchok-2022-03-18-linux-x86_64/topologicsverchok/site-packages")

    import topologic
    topologic.Vertex.ByCoordinates(10,20,30)
    Traceback (most recent call last):
    File "", line 1, in
    AttributeError: module 'topologic' has no attribute 'Vertex'

    Dir() return -

    dir(topologic)
    ['doc', 'file', 'loader', 'name', 'package', 'path', 'spec']

  • edited March 2022

    @paullee I have to do:

    from topologic import Vertex
    
  • @brunopostle said:
    @paullee I have to do:

    from Topologic import Vertex
    

    That won’t work either. It will still say Vertex not found. I have seen this error before. It means the python module was loaded but none of the bindings. So it is an empty module. Please get the topologic python module from Bruno’s fork. He tests it on Linux far more than I do, but my aim is to see if I can create the portable binaries on Linux using opencascade 7.5.0 so you can use those. Stay tuned and thanks for your patience.

    paullee
  • Strange that it works in a shell :)

  • @brunopostle said:
    Note that for fedora (34, 35 & 36) I have built rpm packages of Topologic (and IfcOpenShell/blenderbim), these are linked with the system opencascade (which is currently 7.5.0 on fedora).

    I searched and downloaded python3-topologicPy-0.5-0.1.20210615git.fc34.noarch .rpm (can't find again from where I downloaded).

    Can't find inside something similar to what are inside the topologicsverchok-2022-03-18-linux-x86_64.zip.

    Any idea what should I be searching for ? Thanks :)

  • edited March 2022

    @paullee said:

    I searched and downloaded python3-topologicPy-0.5-0.1.20210615git.fc34.noarch .rpm (can't find again from where I downloaded).

    Can't find inside something similar to what are inside the topologicsverchok-2022-03-18-linux-x86_64.zip.

    This is an old cppyy version, you need the Topologic and Topologic-python3 packages: https://copr.fedorainfracloud.org/coprs/bpostle/IfcOpenShell/package/Topologic/

    topologicpaullee
Sign In or Register to comment.