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
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.
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)
@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
@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
..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
@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 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.
import topologic
topologic.Vertex.ByCoordinates(10,20,30)
Traceback (most recent call last):
File "", line 1, in
AttributeError: module 'topologic' has no attribute '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.
The following is woefully out of date, but might give you some hints on how to start and then you can look at the python code classes for TopologicSverchok to glean what the methods should be. We need volunteers to document the API! https://topologic.app/developer_doc/html/
I am not familiar with Fedora copr, seems there are a few directory with none content ?
Basically, it is a 'package repository' in addition to the default fedora repositories, so it isn't intended for direct download, enable it like this:
dnf copr enable bpostle/IfcOpenShell
After this, for example, you can install the IfcOpenShell-blenderbim package using the fedora software centre, this will pull-in all dependencies (including blender if you don't already have it installed), and will upgrade to the latest version each time you do a system update.
Similarly, with the repository enabled, you can install Topologic-python3 just like any other default fedora package. The intention is to create a blender-Homemaker-addon package too, but I haven't gotten around to it.
Anyone works purely on python mode of topologic? :D
I watched a few YT video on Sverchok-Topologic and Doxygen output of API, but can't understand how it works. I work on FreeCAD python console, and for example trying to export the Brep representation of solid compound and importing into Topologic object, finding which faces are 'external' or 'internal'. Any idea ? Thanks !
cc=Gui.Selection.getSelection()[0]
built-in method exportBrepToString of Part.Compound object at 0x55e3ea99d498
Comments
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
<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.
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??
I only use AppImage version of FreeCAD on Linux
-
Python version: 3.9.10
...
OCC version: 7.5.0
On the move, will try soon, many thanks for the instructions again !
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..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
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.
Now, some new message which seem more useful :)
@paullee Topologic stopped using cppyy a few months ago, your Topologic is out of date
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.
There should be something wrong in my information above.
Anyway, tested as shown below again, seem topologic is imported but without any methods ? :-
Dir() return -
@paullee I have to do:
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.
Strange that it works in a shell :)
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 :)
This is an old cppyy version, you need the
Topologic
andTopologic-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
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 ?
OK, finally with the Fedora33 package running on Fedora 34 :D
Now this is fun :D
Searching around to look for explanation on topologic methods, any idea ? (? https://topologic.app/learning/) Thanks
The following is woefully out of date, but might give you some hints on how to start and then you can look at the python code classes for TopologicSverchok to glean what the methods should be. We need volunteers to document the API!
https://topologic.app/developer_doc/html/
Basically, it is a 'package repository' in addition to the default fedora repositories, so it isn't intended for direct download, enable it like this:
After this, for example, you can install the
IfcOpenShell-blenderbim
package using the fedora software centre, this will pull-in all dependencies (including blender if you don't already have it installed), and will upgrade to the latest version each time you do a system update.Similarly, with the repository enabled, you can install
Topologic-python3
just like any other default fedora package. The intention is to create ablender-Homemaker-addon
package too, but I haven't gotten around to it.Anyone works purely on python mode of topologic? :D
I watched a few YT video on Sverchok-Topologic and Doxygen output of API, but can't understand how it works. I work on FreeCAD python console, and for example trying to export the Brep representation of solid compound and importing into Topologic object, finding which faces are 'external' or 'internal'. Any idea ? Thanks !
Your best source is the python code at:
https://github.com/wassimj/TopologicSverchok/tree/main/nodes/Topologic
You can look at the function “processItem” in each file and find out how Topologic Python works