Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying out OCP branch with CQParts #302

Closed
zignig opened this issue Mar 24, 2020 · 12 comments
Closed

Trying out OCP branch with CQParts #302

zignig opened this issue Mar 24, 2020 · 12 comments
Labels

Comments

@zignig
Copy link
Member

zignig commented Mar 24, 2020

Now that we have a binary artifact server (https://github.com/CadQuery/OCP) it should be possible to create a Python Virtual Env as a script.

I like and use conda , but I think that there is a need to have a non conda install path available.

I am looking for some direction in creating a script to build a working environment.

@adam-urbanczyk @jmwright ?

This is with a view to get cqparts into CQ2 and then possibly integration into CQ-editor.

Good work all, this is going to be a welcome distraction as I have suddenly got some free time.

@adam-urbanczyk
Copy link
Member

You could try using conda-press for converting conda packages into wheels (see #153). The problem with using pip is that it does not really support non-python dependencies.

Please leave OCP out of this discussion for now. I did release the binaries just to easy testing of OCP. I will sooner or later build a proper CI pipeline for it.

@zignig
Copy link
Member Author

zignig commented Mar 24, 2020

@adam-urbanczyk , I think you misunderstand my intent.

I want to script up a bleeding edge cadquery builder for a fork of cqparts i am restarting work on.

I'll try out the https://github.com/CadQuery/cadquery/tree/OCP branch and work from there.

:)

@zignig
Copy link
Member Author

zignig commented Mar 24, 2020

Sorry, that may have appeared rude.

can you please give some hand_wavy directions to fiddle with a OCP + cqparts - !freecad build ?

please.

@jmwright
Copy link
Member

@zignig On Linux while I was updating cqparts for CQ 2.0, I just placed the OCP library in the cadquery directory and then set PYTHONPATH to include the path to the CQ directory. Then I could run the cqparts tests on my fork. Is that the kind of directions you're looking for?

@adam-urbanczyk
Copy link
Member

No worries @zignig . I indeed thought you meant something else. So for now you'll need:

  • OCCT 7.4 (I get it from the conda-forge channel)
  • OCP branch of CQ + the python deps of CQ
  • OCP binary on your PYTHONPATH (note the builds are for py3.6)

@zignig
Copy link
Member Author

zignig commented Mar 24, 2020

Excellent , thank you both.

@zignig
Copy link
Member Author

zignig commented Mar 28, 2020

Cool ! , it works.

The gltf export is broken ( the winding / point order is borked ). But the cqparts stuff works with OCP.

@jmwright
Copy link
Member

@zignig Great news! Can you post a link to your project?

transposed list in the gltf codec is only there to support cqparts I think, and is not used anywhere else as far as I know. It could be broken and we wouldn't know it. Scroll down to the gltf.py change here: jmwright/cqparts@c41cfab

I also updated how the matrix worked here to update it. jmwright/cqparts@a251763

There are other places gltf could have gotten broken, but those things I listed above are specific CQ functionality for cqparts and are related to gltf export (at least I think the second one is).

I don't have an overly deep understanding of the cqparts codebase, so any help figuring out why gltf export is broken would be appreciated. Maybe at least an example showing what's broken would be helpful.

@adam-urbanczyk adam-urbanczyk changed the title Virtual env Trying out OCP branch with CQParts Mar 28, 2020
@zignig
Copy link
Member Author

zignig commented Mar 29, 2020

I will build a clean ubuntu18 virtual machine so the dependencies are covered. The repo will be in

https://github.com/zignig/OCT_cqparts once I have it in a usable state.

@zignig
Copy link
Member Author

zignig commented Mar 29, 2020

A 10x10x10 unit cube renders like this as a GLTF

https://zignig.github.io/research/index.html

An STL export of the same construct works fine , so it is probably the cqparts gltf export code.

@michaelgale
Copy link

Just tried a quick test in macOS 10.15 and sadly did not work. Hopefully this trace is useful?

$ python
Python 3.6.10 |Anaconda, Inc.| (default, Mar 25 2020, 18:53:43)
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cadquery
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/michaelgale/Code/cadquery/cadquery/__init__.py", line 3, in <module>
    from .occ_impl.shapes import (
  File "/Users/michaelgale/Code/cadquery/cadquery/occ_impl/shapes.py", line 146, in <module>
    ta.TopAbs_EDGE: BRepGProp.LinearProperties_s,
AttributeError: type object 'OCP.BRepGProp.BRepGProp' has no attribute 'LinearProperties_s'

Using a dedicated conda environment with python 3.6, OCCT 7.4 from conda-forge, and macOS OCP binary contained in PYTHONPATH.

@zignig
Copy link
Member Author

zignig commented Jul 10, 2020

closing , waiting for CQ2.0

@zignig zignig closed this as completed Jul 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants