-
Notifications
You must be signed in to change notification settings - Fork 56
Move to OCC instead of FreeCAD #268
Comments
I've had good success using Adam's OCC branch. As the code base is merged in, you may want to be aware of this patch I made to support cqparts' GLTF exporter: |
@osterwood thanks for the information! @fragmuffin @jmwright from a cqparts viewpoint, and cqfm viewpoint, i would think a two step process would be best-- first, a new OCC release that seems to work, and then after that changes to cqparts and cqfm to use the new one? |
@dcowden I am in favor. AFAIK there is no PythonOCC bundled with FreeCAD (at least not on my current machine). FreeCAD has a handwritten wrapper for the OCC kernel. I think what we need to begin is an API for selecting the impl module. |
numpy is just for the matrix convenience methods (shape, transpose, flatten). The logic could easily be embedded within the file. The
Definitely not the cleanest way to "decouple" cqparts from the underlying implementation within cadquery. I made the same sort of change here CapableRobot/cqparts@58d237f for the shape exporters -- having cqparts call the cadquery export methods, if the existing & direct call to freecad fails. |
@adam-urbanczyk oh, i didnt know that your OCC branch was based on a freecad-specific OCC wrapper. How much flexibility do we gain moving from FreeCAD objects to FreeCAD-authored OCC wrapper objects, vs moving to pythonOCC? I have a love-hate releationship with pythonOCC. I love the development speed, the breadth of the project, and the people ( Jelle and Thomas), but I've historically found developing with it difficult. But its typically not been pythonOCC's fault-- its been OCC itself: its a bear to use at the base level. I know for sure I need the direct OCC objects to do the historical queries I want to do |
My branch is based on pythonOCC actually. I am just saying that it is not
bundled with FreeCAD.
…On Thu, May 17, 2018, 10:05 PM Dave Cowden ***@***.***> wrote:
@adam-urbanczyk <https://github.com/adam-urbanczyk> oh, i didnt know that
your OCC branch was based on a freecad-specific OCC wrapper.
How much flexibility do we gain moving from FreeCAD objects to
FreeCAD-authored OCC wrapper objects, vs moving to pythonOCC?
I have a love-hate releationship with pythonOCC. I love the development
speed, the breadth of the project, and the people ( Jelle and Thomas), but
I've historically found developing with it difficult. But its typically not
been pythonOCC's fault-- its been OCC itself: its a bear to use at the base
level.
I know for sure I need the direct OCC objects to do the historical queries
I want to do
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#268 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ANVXYm3AuTh_PjI-XPNKLYVWhiFrd8ipks5tzdf5gaJpZM4UC8A0>
.
|
@adam-urbanczyk oh ok i was confused, sorry! How will we distribute pythonOCC along with a cq version that needs it? |
If we want to distribute cadquery through pypi and bundle pythonOCC and the OCC binaries with cadquery perhaps we can do something similiar to the opencv-python package on pypi. It bundles prebuilt binaries of opencv in the pypi-package. If we do it this way we can install via |
@dcowden @gntech for me the only workable option is conda; pip is not really up to the task of distributing non-python packages (i.e. oce ). I already have a working conda package for cq-occ ( https://anaconda.org/cadquery/cadquery-occ ). |
Alright then! With no objections then let's move forward with integration of Adams branch. |
Will this mean that cadquery will not be usable from within freecad anymore? Would it be possible to use the upstream version https://anaconda.org/pythonocc/pythonocc-core or does it have some problems? I see it has got builds for all the common platforms. |
Now I've found one more https://anaconda.org/cad/pyocct - it seems Freecad is moving towards using this package (see https://github.com/FreeCAD/FreeCAD_Conda). |
@zwn we definitely have to make sure cq can still run in freecad for some period of time, for cadquery freecad module. But I think the long term plan is to make our own gui, perhaps based on electron. The perfect scenario would be if freecad actually used pythonocc, because then we could run in either environment with the same code. But i am afraid that won't happen. If it doesn't, we would have to support two codebases... One for cq on freecad and one for cq on OCC. This is not something I want to do long term. The reason for the move away from freecad is that there are tons of limitations and bugs we can't work around. |
I have installed the cadquery-occ package from https://anaconda.org/cadquery/cadquery-occ for some testing and found that the installation instructions was lacking a bit. On that page it says install with However, since there are some dependencies from other channels needed this command was not enough. The following command activates the necessary channels to get the dependencies and install cadquery-occ.
@adam-urbanczyk If you agree, perhaps this could be added to the cadquery-occ installation instruction page? |
@gntech Thanks for looking into this. I think that the line on anaconda.org is auto-generated, not sure how to change it. Proper instruction can be found here: https://github.com/adam-urbanczyk/cadquery |
😴 💤 I've created a "OpenCascade (OCC)" milestone for @osterwood thanks for your good work. |
@here what do you think about this roadmap:
History teaches that cq was not of much interest until there was a gui. It really took off once Jeremy made cadquery freecad module. Consequently, I think we have to have a functional GUI before we can try dumping Freecad. The shortest path to a working GUI is probably to use the starting point from the pythonOCC samples, which in turn means using wx if I recall. You can see A few at https://github.com/tpaviot/pythonocc-demos? I can imagine building a gui starting from these pretty quickly. |
I see that Freecad is using Is cadquery aiming at using |
I have been able to install https://github.com/adam-urbanczyk/cadquery on Windows 10:
There is a gotcha where the built package seems to have version equal to 0. |
@zwn good question. I didn't even know about pyocct until you brought it up. In conversation, i've been talking about pythonOCC, but that's only because its the one i'm familiar with. It's been around forever. As mentioned in the article you referenced, the most notable difference is that pythonOCC is based on OCE, not OCCT. I'm not sure I care too much about that distinction. if freecad is moving to pyOCCT, that would be good news for freecad/cq interoperability, but bad news for @adam-urbanczyk 's branch, which is based on pythonocc. i'd be interested in thoughts on the apis themselves. pythonOCC started life as a simple set of auto-generated bindings, much like ( it appears ) pyOCCT is. However, over time, the pythonOCC guys have spent a lot of time tweaking the bindings to solve memory problems, garbage collection and such. I wonder if pyOCCT is doomed to repeat that work? |
http://pyocct.readthedocs.io/en/latest/extra.html#pythonocc-comparison but I have no idea why there are two different bindings :-(. In pythonOCC there is also a qt based gui, see https://github.com/tpaviot/pythonocc-core/blob/master/src/Display/SimpleGui.py. I have not found anything similar in pyOCCT. I'd just go with pythonOCC for now since it seems easier (a lot has been done already). |
@zwn reading the front page of pyOCCT, this comment:
Causes me to think they have a long path in front of them, and that it is very likely the same path pythonOCC has already walked. I think pythonOCC has a LOT of tweaks to their bindings, developed over literally a decade now. My hunch is that pythonOCC is the stronger play. I do love how pyOCCT eliminates the use of handles, but i think the libraries' stability is more important. Plus, since @adam-urbanczyk already incorporates pythonOCC, we are a lot closer to a solution. |
I think at this point we need some clarifications of the terminology : ). First of all there is OCCT ( Open CasCade Technology ) an open source C++ CAD kernel which is used by e.g. FreeCAD. Current version is 7.2. There is also OCE (https://github.com/tpaviot/oce) which is a fork of OCCT (I guess to fix some bugs). Current version 0.18.3 is based on OCCT 6.9.1 Then there are python bindings:
I like using OCCT 7.2 as a basis, but I cannot find the binding generator in the PyOCCT codebase (maybe it is not shared on purpose; will open an issue). Regarding api compatibility: my gut feeling is that it won't be a lot of work to migrate, both PythonOCC and PyOCCT are more or less 1:1 translation of the C++ API of OCCT/OCE. Let me know if I missed something. |
I think you can't find it because it doesn't exist. They say right on the front page that what's there is the result of manual work:
This causes me to worry about using it as a basis. In the long term, i like how they handle 'Handle'-- the code is much more intuitive. I also think we actually want the bugfixes in OCE vs OCCT. The difference is not what it used to be, but i still think there's value there. |
@dcowden the way I read it is: Anyhow, let's see what the author will reply. |
sounds good. regardless, i think the level of maturity has to be better with pythonOCC right? |
@dcowden yes, for now PythonOCC it is. I will keep an eye on pyOCCT |
I figured we can just ask: https://forum.freecadweb.org/viewtopic.php?f=10&t=28863 |
I don't think we want to transfer the CQ 1.0 repo. We basically want to rebase and start fresh on Adam's OCC branch/fork, if I understand the consensus correctly. |
@justbuchanan I don't mean to shut the conversation down. I was just stating what I think I understand the group wants to do. I'm certainly open to discussion on transferring versus rebasing. |
As long as the history is kept in the new repository (eg: git blame). Also migrating I'll add the Wiki & Issues |
@adam-urbanczyk can I get an invite to the cadquery org please? |
Cloning to Organisation
(while it's there: see it here renamed to However this means the loss of: Transferring For |
@jmwright @dcowden
are all redirected to the repository's new location.... To move cloned repository urls, don't re-clone it, just run:
|
Good to know, Thanks! I'm not opposed to transferring cq as opposed to starting new, but it seems like starting new is the right thing to do with cq because it is basically a new product, and we need to keep the old one running as is for a while. We will have two branches running no matter what |
I agree with @dcowden We can copy over summaries and links to relevant issues from the CQ 1.0 repo. There are quite a few issues mixed in that are related to FreeCAD and not OCC, so I don't think we want to transfer all issues. We also don't want to redirect people to CQ 2.0 until it's at least as capable (and preferably as easy to install) as CQ 1.0. I think a manual redirect and sunsetting process of 1.0, while more work, is more appropriate here. |
Sounds good! Once the new repo' is ready, I'd like to port the gltf geometry exporter implemented in May the forks be with you 🖖 ... (I couldn't help it) |
OK I imported my fork into https://github.com/CadQuery/cadquery and deleted all branches but one. Does this look right to everyone? (If not we can always redo using different approach) |
Thanks Adam! I think next we need to set up Travis and all the test automation |
Renamed to master |
@dcowden @adam-urbanczyk @fragmuffin @justbuchanan @RustyVermeer @zignig We've got a lot of issues here on the CQ 1.0 repo that are tagged with CQ2, and those really belong on CadQuery/cadquery now. GitHub recently added a beta feature to transfer issues between repos, and from what I've read it's pretty safe. I suggest that we transfer the CQ2-tagged issues over to the CQ 2.0 repo, and from there they can be dealt with. I think the PythonOCC implementation has been done in a different way that @dcowden envisioned when he created those issues, so some issues may need to be closed with the Thoughts? |
@jmwright I agree that we should move them over.
Yes, the existing implementation is definitely less dramatic that what I
had originally planned, but I'm perfectly OK with it. The main difference
is that we are not introducing a direct API in between the core and the
fluent API.
@jmwright do I need to run the migration tool?
…On Mon, Dec 3, 2018, 8:48 AM Jeremy Wright ***@***.*** wrote:
@dcowden <https://github.com/dcowden> @adam-urbanczyk
<https://github.com/adam-urbanczyk> @fragmuffin
<https://github.com/fragmuffin> @justbuchanan
<https://github.com/justbuchanan> @RustyVermeer
<https://github.com/RustyVermeer> @zignig <https://github.com/zignig>
We've got a lot of issues here on the CQ 1.0 repo that are tagged with
CQ2, and those really belong on CadQuery/cadquery
<https://github.com/CadQuery/cadquery> now. GitHub recently added a beta
feature to transfer issues between repos, and from what I've read it's
pretty safe. I suggest that we transfer the CQ2-tagged issues over to the
CQ 2.0 repo, and from there they can be dealt with. I think the PythonOCC
implementation has been done in a different way that @dcowden
<https://github.com/dcowden> envisioned when he created those issues, so
some issues may need to be closed with the wontfix tag.
Thoughts?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#268 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABPOA-CLhv5BV1r8IHSg0AVwfHxZH2JNks5u1SuzgaJpZM4UC8A0>
.
|
@dcowden Yes, you will need to do the migration one issue at a time, unless you want to elevate my privileges on this repo. Then I can do it. I don't see the option for me on this repo, but I do on CadQuery/cadquery. https://help.github.com/articles/transferring-an-issue-to-another-repository/ |
Thanks, I will do it. I'll close the issues I know are not needed before I
move it.
…On Mon, Dec 3, 2018, 9:36 AM Jeremy Wright ***@***.*** wrote:
@dcowden <https://github.com/dcowden> Yes, you will need to do the
migration one issue at a time, unless you want to elevate my privileges on
this repo. Then I can do it. I don't see the option for me on this repo,
but I do on CadQuery/cadquery.
https://help.github.com/articles/transferring-an-issue-to-another-repository/
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#268 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABPOA7MpO48H9_t4IV1PYuBXcPmZOczyks5u1TbTgaJpZM4UC8A0>
.
|
@adam-urbanczyk can you please double-check that im an admin on Cadquery/cadquery? |
@here i added words to the readme on dcowden/cadquery to publicise the move to 2.0 at Cadquery/cadquery. |
@dcowden this is what I see. Are you sure that it is permissions related? |
based on the permissions screenshot above, i'd guess its not possible,
then. I found the functionality successfully, but the Cadquery/cadquery
repo was not in my list.
…On Wed, Dec 5, 2018 at 4:40 PM Miguel Sánchez de León Peque < ***@***.***> wrote:
Maybe it is not possible to transfer issues from one organization/user
into a different organization
<https://help.github.com/articles/transferring-an-issue-to-another-repository/>
(?).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#268 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABPOA_aHyLDW0H-lx6YHrDdB4bmsZ99pks5u2D03gaJpZM4UC8A0>
.
|
@here looks like the best way to do this is probably to use this: https://github.com/IQAndreas/github-issues-import I'd probably close ones i think dont need to be there, and then import the rest. would that work? |
@adam-urbanczyk @jmwright I used the above tool to tranfer a few issues., for example, this one Its less than ideal, they all come over as comments by the person running the thing. I'm also having problems using it for bulk-- its erroring out with some kind of authentication issue. But if we're ok with this format i can bring them over one at a time i think |
It seems fine to me. |
The issues aren't displayed as elegantly as the originals, but the information is all there. 👍 |
ok i'll move the others over. |
@adam-urbanczyk @jmwright @Peque ok i moved over all the issues I think are appropriate ( and a couple that might be on the fence. Be aware, the utility above works pretty well, but github has rate limiting that will produce random errors. There are several copies of issues that are closed, because when it was failing mid import i'd have to close and make a new one. I'm going to close CQ 2.0 issues in this repo |
This has been closed in favor of the CQ 2.0 implemention at https://github.com/cadquery/cadquery |
@jmwright @adam-urbanczyk @fragmuffin
@adam-urbanczyk has a branch that moves most CQ functionality to use OCC directly, rather than the FreeCAD layer.
I'd like to begin the process of moving that into CQ main version.
Opinions on how to manage the reverse compatibility are welcome. For now, we'll probably use the OCC that comes with FreeCAD already.
My thinking is that we make an initial move, and then slowly move features from FC to OCC, rather than a huge push that changes it all, but what do you guys think? Maybe we should just move it all since @adam-urbanczyk has most if not all tests passing?
The text was updated successfully, but these errors were encountered: