T
by topologic on 27 Mar 2022
#
@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.
P
by paullee on 27 Mar 2022, edited 27 Mar 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
T
by topologic on 27 Mar 2022
#
+1 votes
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.
T
by topologic on 27 Mar 2022
#
+1 votes
Please try the following:
-
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.
-
Start FreeCAD
-
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??
P
by paullee on 27 Mar 2022
#
@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
P
by paullee on 27 Mar 2022
#
@topologic said:
Please try the following:
- 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.
- Start FreeCAD
- 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 !
B
by brunopostle on 27 Mar 2022
#
+2 votes
@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
T
by topologic on 27 Mar 2022
#
@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
B
by brunopostle on 27 Mar 2022
#
+2 votes
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
B
by brunopostle on 27 Mar 2022
#
+2 votes
..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
P
by paullee on 27 Mar 2022
#
@topologic said:
Please try the following:
- 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.
- Start FreeCAD
- 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 :)

T
by topologic on 27 Mar 2022
#
@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.
P
by paullee on 27 Mar 2022
#
@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'
B
by brunopostle on 27 Mar 2022
#
@paullee Topologic stopped using cppyy a few months ago, your Topologic is out of date
P
by paullee on 27 Mar 2022
#
@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.

T
by topologic on 27 Mar 2022
#
+1 votes
@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.
P
by paullee on 28 Mar 2022, edited 28 Mar 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 "<input>", line 1, in <module>
AttributeError: module 'topologic' has no attribute 'Vertex'
Dir() return -
dir(topologic)
['doc', 'file', 'loader', 'name', 'package', 'path', 'spec']
B
by brunopostle on 28 Mar 2022, edited 28 Mar 2022
#
@paullee I have to do:
from topologic import Vertex
T
by topologic on 28 Mar 2022
#
+1 votes
@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.
P
by paullee on 28 Mar 2022
#
Strange that it works in a shell :)
P
by paullee on 29 Mar 2022
#
@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 :)
B
by brunopostle on 29 Mar 2022, edited 29 Mar 2022
#
+2 votes
@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/
T
by topologic on 29 Mar 2022
#
@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
P
by paullee on 29 Mar 2022
#
@brunopostle said:
This is an old cppyy version, you need the Topologic
and Topologic-python3
packages: https://copr.fedorainfracloud.org/coprs/bpostle/IfcOpenShell/package/Topologic/
I am not familiar with Fedora copr, seems there are a few directory with none content ?
Nothing for Fedora 34 ?


This is for Fedora 33 right ?
