OSArch Community

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

  1. T

    @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.

  2. P

    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

  3. T

    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.

  4. T

    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??

  5. P

    @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

  6. P

    @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.
    1. Start FreeCAD
    1. 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 !

  7. B

    @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

  8. T

    @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

  9. B

    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

  10. B

    ..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

  11. P

    @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.
    1. Start FreeCAD
    1. 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 :)

  12. T

    @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.

  13. P

    @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 "<input>", line 1, in <module>

    File "/home/paullee/Downloads/brunopostle_ifcopenshell_topologicPy/usr/lib/python3.9/site-packages/topologic/init.py", line 54, in <module>

    import cppyy

    ModuleNotFoundError: No module named 'cppyy'

  14. B

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

  15. B

    @

  16. P

    @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.

  17. T

    @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.

  18. P

    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 "<input>", line 1, in <module>

    AttributeError: module 'topologic' has no attribute 'Vertex'

    Dir() return -

    dir(topologic)

    ['doc', 'file', 'loader', 'name', 'package', 'path', 'spec']

  19. B

    @paullee I have to do:

    from topologic import Vertex
  20. T

    @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.

  21. P

    Strange that it works in a shell :)

  22. P

    @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 :)

  23. B

    @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/

  24. T

    @brunopostle said:

    @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/

    @brunopostle Is it possible to remove that obsolete file from 2021 so others don’t fall into that problem? Thanks

  25. P
  1. Page 1
  2. 2
  3. 3
  4. 23
  5. 24
  6. 25
  7. 26
  8. 27
  9. 29
  10. 30
  11. 31

Login or Register to reply.