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

1192021222325»

Comments

  • @paullee topologicpy works perfectly well in FreeCAD 0.20 on Windows. Here is what I did to make it work:

    import sys
    sys.path.append("path/to/the/top/folder/that/contains/topologicpy/")
    import topologicpy
    from topologicpy.Vertex import Vertex
    v = Vertex.ByCoordinates(10,20,30)
    print(Vertex.X(v), Vertex.Y(v), Vertex.Z(v))

    10 20 30

    paullee
  • Hmmm, searched on my Fedora 36 and seems found it under .local/lib/python3.10/site-packages ...

    import sys
    sys.path.append("/home/paullee/.local/lib/python3.10/site-packages")
    import topologicpy

    Traceback (most recent call last):
    File "", line 1, in
    File "/home/paullee/Downloads/FreeCAD_weekly-builds-31391-2022-12-22-conda-Linux-x86_64-py310/squashfs-root/usr/lib/python3.10/site-packages/shiboken2/files.dir/shibokensupport/feature.py", line 139, in _import
    return original_import(name, *args, **kwargs)
    File "/home/paullee/.local/lib/python3.10/site-packages/topologicpy/__init__.py", line 16, in
    import topologic
    File "/home/paullee/Downloads/FreeCAD_weekly-builds-31391-2022-12-22-conda-Linux-x86_64-py310/squashfs-root/usr/lib/python3.10> /site-packages/shiboken2/files.dir/shibokensupport/feature.py", line 139, in _import
    return original_import(name, *args, **kwargs)
    ImportError: /home/paullee/.local/lib/python3.10/site-packages/topologicpy/bin/linux/topologic/./libTopologicCore.so.0: undefined symbol: _ZN24BRepBuilderAPI_MakeShape5BuildEv

  • I am not a Linux expert, but it seems that the bundled version of topologic is not compatible with your system. If you can get your hands on a compiled and compatible version of topologic for Linux (eg from homemaker) just drop it in the bin/Linux/topologic folder inside topologicpy

    paullee
  • One test would be to delete the files in bin/linux/topologic and try again. It might find the one you got working from homemaker

    paullee
  • It seems:-

    1. FC_0.20, with Python 3.9 + Brunopostle's packages for Fedora 36
      = import topologic : OK

    2. FC_0.21_pre, with Python 3.10 + Brunopostle's packages for Fedora 36
      = import topologic : Not OK
      = import topologicpy : Not OK

    topologic
  • @paullee said:
    It seems:-

    1. FC_0.20, with Python 3.9 + Brunopostle's packages for Fedora 36
      = import topologic : OK

    2. FC_0.21_pre, with Python 3.10 + Brunopostle's packages for Fedora 36
      = import topologic : Not OK
      = import topologicpy : Not OK

    What about import topologicpy with FC_0.20 with Python 3.9?

  • @paullee I'm> @paullee said:

    It seems:-

    1. FC_0.20, with Python 3.9 + Brunopostle's packages for Fedora 36
      = import topologic : OK

    2. FC_0.21_pre, with Python 3.10 + Brunopostle's packages for Fedora 36
      = import topologic : Not OK
      = import topologicpy : Not OK

    my rpms of blenderbim and topologic use the system python. freecad downloads come with their own python interpreter (like blender), surely?

    paullee
  • edited January 15

    @topologic said:
    What about import topologicpy with FC_0.20 with Python 3.9?

    It is not supposed to work - as it seems installed under python 3.10 ?

    /home/paullee/.local/lib/python3.10/site-packages/topologicpy

    However in FC 0.20 python console (using 3.9 python version), forcing it to look into python 3.10 location :-

    sys.path.append("/home/paullee/.local/lib/python3.10/site-packages")
    import topologicpy
    topologicpy.platform
    'linux'
    topologicpy.os

    topologicpy.topologic.Vertex

    dir (topologicpy)
    ['builtins', 'cached', 'doc', 'file', 'loader', 'name', 'package', 'path', 'spec', 'os', 'os_name', 'platform', 're', 'sitePackagesFolderName', 'sys', 'test1', 'topologic', 'topologicFolderName', 'topologicPath']

    No Vertex etc. directly under topologicpy, but under topologicpy.topologic ....

  • edited January 15

    @brunopostle said:
    @paullee I'm>
    ...
    my rpms of blenderbim and topologic use the system python. freecad downloads come with their own python interpreter (like blender), surely?

    Thanks :D
    This is FC 0.20 screencapture -

    Below
    is FC 0.21 screencapture -

    To my understanding -
    Python 3.9 is in FC 0.20
    Python 3.10 is in FC 0.21_pre

  • @paullee did you try
    import topologicpy
    from topologicpy.Vertex import Vertex
    v = Vertex.ByCoordinates(10,20,30)
    print(v)

  • Yes it is working on FC 0.20 (importing 3.10 topologicpy in 3.9 python console) :-

    Python 3.9.13 | packaged by conda-forge | (main, May 27 2022, 17:07:55)
    [GCC 10.3.0] on linux
    Type 'help', 'copyright', 'credits' or 'license' for more information.

    sys.path.append("/home/paullee/.local/lib/python3.10/site-packages")
    import topologicpy
    from topologicpy.Vertex import Vertex
    v = Vertex.ByCoordinates(10,20,30)
    print(v)

    <topologic.Vertex object at 0x7f3b3c21a270>

    topologic
  • edited January 15

    @paullee Atleast it works under FC 0.20. It doesn’t matter if topologicpy was installed under python 3.10 because topologic has .pyd files for python 3.7 3.8 3.9 and 3.10

    paullee
  • This .local directory seems to be containing what are installed with "pip install topologicpy" :-

  • edited January 15

    Noted some difference between FreeCAD 0.20 and 0.21_pre, particularly OCC :-

    OS: Fedora Linux 36 (Workstation Edition) (GNOME/gnome)
    Word size of FreeCAD: 64-bit

    Version: 0.20.29177 (Git)
    Python 3.9.13, Qt 5.12.9, Coin 4.0.0, Vtk 9.1.0, OCC 7.5.3

    Version: 0.21.0.31391 (Git)
    Python 3.10.8, Qt 5.15.4, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.3

    Would it be the difference in OCC make topologic not working in FreeCAD 0.21_pre ?

Sign In or Register to comment.