Can there be an conda-forge for just the Part module?

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Post Reply
martin15135215
Posts: 6
Joined: Sat Sep 24, 2022 4:05 pm

Can there be an conda-forge for just the Part module?

Post by martin15135215 »

Hi all

With this article i succeeded in importing the Part module in another Python environment, that was not in FreeCAD.

See image below:
test_part_module_in_jupyter.png
test_part_module_in_jupyter.png (36.15 KiB) Viewed 1139 times


I know however we have this conda-forge channel https://anaconda.org/conda-forge/freecad to download FreeCAD -> would it be also possible to have an conda-forge just for the Part module? It would make the install process easier. :)
User avatar
onekk
Veteran
Posts: 6199
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Can there be an conda-forge for just the Part module?

Post by onekk »

Part module is maybe the mist important component if FreeCAD.

But FreeCAD is not a modularized software.

It is composed by Workbench a sort of grouo of tools to do something but not all of them are totally independent from each others.

Using FreeCAD as a library from another program or from a Python instance is a "very specific case" and is not the way FreeCAD is intended to work.

I doubt that is even feasible to build only Part as a separate package.

Regards.

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
martin15135215
Posts: 6
Joined: Sat Sep 24, 2022 4:05 pm

Re: Can there be an conda-forge for just the Part module?

Post by martin15135215 »

Hi Carlo

I did not know that FreeCAD is not a modularized software.

I was interested in the usecase, how to get the volume from an ifc file with just script, to make automation.

Described here in this thread
User avatar
adrianinsaval
Veteran
Posts: 5544
Joined: Thu Apr 05, 2018 5:15 pm

Re: Can there be an conda-forge for just the Part module?

Post by adrianinsaval »

onekk wrote: Sat Sep 24, 2022 4:54 pm But FreeCAD is not a modularized software.
what??? the opposite is true, there are some workbenches that have dependencies on other modules, a lot of WB depend on Part, but AFAIK Part module does not have a dependency on other WB, it is not permitted to. We just don't provide modular packages but the software itself is, that's why many WB have a flag to disable building them for example, also even the GUI is separate from the APP stuff and I think there's also a flag to build FreeCAD without GUI modules.
onekk wrote: Sat Sep 24, 2022 4:54 pm Using FreeCAD as a library from another program or from a Python instance is a "very specific case" and is not the way FreeCAD is intended to work.
I think this totally is an intended use case for FreeCAD, just not the mainstream GUI use, you are the last person I would have expected to say this considering your use is mainly python scripting! :o
User avatar
onekk
Veteran
Posts: 6199
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Can there be an conda-forge for just the Part module?

Post by onekk »

adrianinsaval wrote: Sat Sep 24, 2022 6:11 pm ...
About modularity you are right, but I can't think of a Part module only version of FC.

Some components could be disabled when building, but a Part module only version what purpose could have if it don't use FreeCAD and probably other things?

Part module itself don't have a way to save a file with some results, you have to use at least some exporter to produce something.

About Scripting and FreeCAD as a library, caveat found around are not exactly painting such type of use, you have to use same Python version FC is compiled with and it is not an easy task.

But probably I'm wrong, as you have more experience than me.

Sorry for the nuisance.

Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
User avatar
adrianinsaval
Veteran
Posts: 5544
Joined: Thu Apr 05, 2018 5:15 pm

Re: Can there be an conda-forge for just the Part module?

Post by adrianinsaval »

onekk wrote: Sat Sep 24, 2022 7:45 pm but a Part module only version what purpose could have if it don't use FreeCAD and probably other things?

Part module itself don't have a way to save a file with some results, you have to use at least some exporter to produce something.
of course the core of FreeCAD must always be present, but it should be possible to have only the core+Part, I doubt it's worth making such a package though, the entirety of FreeCAD is bellow 300mb I believe (dependencies take extra space of course) and storage is relatively cheap nowadays.
About Scripting and FreeCAD as a library, caveat found around are not exactly painting such type of use, you have to use same Python version FC is compiled with and it is not an easy task.
yes python version must match, but I don't think that's such a big disadvantage.
But probably I'm wrong, as you have more experience than me.
in python scripting not all!
User avatar
onekk
Veteran
Posts: 6199
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Can there be an conda-forge for just the Part module?

Post by onekk »

adrianinsaval wrote: Sun Sep 25, 2022 11:20 pm ...
My concern here is the fact that FC could be seen simply as an interface to OCCT, there are around other projects for this.

Or simply a way to create Web Services to supply some sort of "web 3d modeller".

But FC has many peculiar features, that go beyond the simple interface to OCCT as example the Assembly(2+ or 4) or Part Design WB that could make a big difference when modelling.

Not saying that it has his own file format.

Using it as a library seem a "very limited" way of using it, this said from a user that is heavily use Python scripting.

Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
martin15135215
Posts: 6
Joined: Sat Sep 24, 2022 4:05 pm

Re: Can there be an conda-forge for just the Part module?

Post by martin15135215 »

So i did use Part module to calculate the volume from a ifc file. See image below
volume_from_ifc.png
volume_from_ifc.png (79.81 KiB) Viewed 752 times
I am new in this whole scripting with ifc. And in the ifcopenshell module, it was not possible to calculate the volume. However i heard something with OCCT, but i am not C++ programmer. I just know some python basics.

And there exist two python-bindings, to the best of my knowledge, PythonOCC and the Part Module. And the FreeCAD Documentation was for me more friendlier, and i did find out how to calculate the volume from the ifc modal with the Part Module.

But right now, Part Module is really heavy, if there is a way to get Part Module without all the GUI and other workbenches, that would be cool.

I am also thinking of creating with the Part Module a script to automatically create an Modell and then make that modell a ifc with ifcopenshell.

However if you think PythonOCC is better for the needs i have, i can surely try to find out, how to calculate the volume with PythonOCC instead of with the Part Module.
User avatar
onekk
Veteran
Posts: 6199
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Can there be an conda-forge for just the Part module?

Post by onekk »

martin15135215 wrote: Tue Sep 27, 2022 1:03 pm ...
PythonOCC is better for the needs i have, i can surely try to find out, how to calculate the volume with PythonOCC instead of with the Part Module.
You should ask in the PythonOCC forum.

Probably using Part WB is not a clever thing, is like to buy an entire toolbox to use only a screwdriver.

I don't know ifc but there are some python bindings for it.
For other things there are other geometric library around.

Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
Post Reply