Git Product home page Git Product logo

cq-flake's People

Contributors

jmgao avatar marcus7070 avatar rowang077 avatar s-ol avatar sapphire-arches avatar thomaslepoix avatar vinszent avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

cq-flake's Issues

What version of CadQuery is used?

It is not clear what exactly version of CadQuery is used here. Even though I understand it "closely follows master", there is no easy way to find out which version cq API is.

I assume cq 2.1+ is supported :)

readme

  • instructions on how to use
  • warning Opencascade and OCP are huge builds
  • cachix

text segfaults

Making text onto no base solid segfaults. Not sure if my fault or upstream yet. There are no tests in CadQuery that cover this behaviour.

Attribute error when trying to run

When I try to run this flake I get an error:

λ nix run github:marcus7070/cq-flake
error: attribute 'defaultApp.x86_64-linux' should have type 'derivation'

I'm using the current nixpkgs master branch.

OpenGL issues with recent NixOS version

I'm a bit unsure where the root cause for this is between NixOS, this repo, and cadquery itself, but since the viewport in cq-editor is not working anymore. On STDERR I can see this:

libGL error: MESA-LOADER: failed to open radeonsi: /nix/store/naxlf484ka6r8r5qck91yv184wy5xwd5-libdrm-2.4.108/lib/libdrm_nouveau.so.2: undefined symbol: drmCloseBufferHandle (search paths /run/opengl-driver/lib/dri, suffix _dri)
libGL error: failed to load driver: radeonsi
libGL error: MESA-LOADER: failed to open swrast: /nix/store/naxlf484ka6r8r5qck91yv184wy5xwd5-libdrm-2.4.108/lib/libdrm_nouveau.so.2: undefined symbol: drmCloseBufferHandle (search paths /run/opengl-driver/lib/dri, suffix _dri)
libGL error: failed to load driver: swrast
Namespace(filename=None)
libGL error: MESA-LOADER: failed to open radeonsi: /nix/store/naxlf484ka6r8r5qck91yv184wy5xwd5-libdrm-2.4.108/lib/libdrm_nouveau.so.2: undefined symbol: drmCloseBufferHandle (search paths /run/opengl-driver/lib/dri, suffix _dri)
libGL error: failed to load driver: radeonsi
libGL error: MESA-LOADER: failed to open swrast: /nix/store/naxlf484ka6r8r5qck91yv184wy5xwd5-libdrm-2.4.108/lib/libdrm_nouveau.so.2: undefined symbol: drmCloseBufferHandle (search paths /run/opengl-driver/lib/dri, suffix _dri)
libGL error: failed to load driver: swrast

The GUI Log viewer has this to say:

[2021-12-20 12:16:52.560540] ERROR: CQ-Editor: Uncaught exception occurred
Traceback (most recent call last):
  File "/nix/store/klm4whckx030dmavqqijwkz42hf11wdr-cq-editor-local/lib/python3.8/site-packages/cq_editor/widgets/occt_widget.py", line 131, in paintEvent
    self._initialize()
  File "/nix/store/klm4whckx030dmavqqijwkz42hf11wdr-cq-editor-local/lib/python3.8/site-packages/cq_editor/widgets/occt_widget.py", line 153, in _initialize
    self.view.SetWindow(wins.get(platform,self._get_window_linux)(self.winId()))
OCP.Aspect.Aspect_GraphicDeviceDefinitionError: OpenGl_Window::CreateWindow: glXCreateContext failed.
[2021-12-20 12:16:52.567216] ERROR: CQ-Editor: Uncaught exception occurred
Traceback (most recent call last):
  File "/nix/store/klm4whckx030dmavqqijwkz42hf11wdr-cq-editor-local/lib/python3.8/site-packages/cq_editor/widgets/occt_widget.py", line 131, in paintEvent
    self._initialize()
  File "/nix/store/klm4whckx030dmavqqijwkz42hf11wdr-cq-editor-local/lib/python3.8/site-packages/cq_editor/widgets/occt_widget.py", line 153, in _initialize
    self.view.SetWindow(wins.get(platform,self._get_window_linux)(self.winId()))
OCP.Aspect.Aspect_GraphicDeviceDefinitionError: OpenGl_Window::CreateWindow: glXCreateContext failed.
[2021-12-20 12:16:52.587332] ERROR: CQ-Editor: Uncaught exception occurred
Traceback (most recent call last):
  File "/nix/store/klm4whckx030dmavqqijwkz42hf11wdr-cq-editor-local/lib/python3.8/site-packages/cq_editor/widgets/occt_widget.py", line 131, in paintEvent
    self._initialize()
  File "/nix/store/klm4whckx030dmavqqijwkz42hf11wdr-cq-editor-local/lib/python3.8/site-packages/cq_editor/widgets/occt_widget.py", line 153, in _initialize
    self.view.SetWindow(wins.get(platform,self._get_window_linux)(self.winId()))
OCP.Aspect.Aspect_GraphicDeviceDefinitionError: OpenGl_Window::CreateWindow: glXCreateContext failed.
[2021-12-20 12:16:52.594079] ERROR: CQ-Editor: Uncaught exception occurred
Traceback (most recent call last):
  File "/nix/store/klm4whckx030dmavqqijwkz42hf11wdr-cq-editor-local/lib/python3.8/site-packages/cq_editor/widgets/occt_widget.py", line 131, in paintEvent
    self._initialize()
  File "/nix/store/klm4whckx030dmavqqijwkz42hf11wdr-cq-editor-local/lib/python3.8/site-packages/cq_editor/widgets/occt_widget.py", line 153, in _initialize
    self.view.SetWindow(wins.get(platform,self._get_window_linux)(self.winId()))
OCP.Aspect.Aspect_GraphicDeviceDefinitionError: OpenGl_Window::CreateWindow: glXCreateContext failed.
[2021-12-20 12:16:52.594796] ERROR: CQ-Editor: Uncaught exception occurred
Traceback (most recent call last):
  File "/nix/store/klm4whckx030dmavqqijwkz42hf11wdr-cq-editor-local/lib/python3.8/site-packages/cq_editor/widgets/occt_widget.py", line 131, in paintEvent
    self._initialize()
  File "/nix/store/klm4whckx030dmavqqijwkz42hf11wdr-cq-editor-local/lib/python3.8/site-packages/cq_editor/widgets/occt_widget.py", line 153, in _initialize
    self.view.SetWindow(wins.get(platform,self._get_window_linux)(self.winId()))
OCP.Aspect.Aspect_GraphicDeviceDefinitionError: OpenGl_Window::CreateWindow: glXCreateContext failed.

I've tried removing all cadquery/ocp/occt derivations and rebuilding from scratch, but that didn't make a difference. I recently upgraded to NixOS 21.11, but even when I boot the older 21.05 system configuration it fails in the same way.

Is there something I can do to help diagnose this further?

Split cadquery off into seperate flake

I could use a nix develop environment for both cadquery and cq-editor. Should split cadquery off into it's own flake, with it's own default package and develop environment.

Perhaps with a dirty environment provided by nix develop cq-flake, I could get cq-editor's pytestqt working under nixos?

Docs build broken

python3.8-cadquery-local-dev> Running Sphinx v3.2.1
python3.8-cadquery-local-dev> building [mo]: targets for 0 po files that are out of date
python3.8-cadquery-local-dev> building [html]: targets for 20 source files that are out of date
python3.8-cadquery-local-dev> updating environment: [new config] 20 added, 0 changed, 0 removed
python3.8-cadquery-local-dev> Warning: Desired error not necessarily achieved due to precision loss.int
python3.8-cadquery-local-dev>          Current function value: 0.000000
python3.8-cadquery-local-dev>          Iterations: 29
python3.8-cadquery-local-dev>          Function evaluations: 89
python3.8-cadquery-local-dev>          Gradient evaluations: 77
python3.8-cadquery-local-dev> /build/source/cadquery/utils.py:34: FutureWarning: toString will be removed in the next release.
python3.8-cadquery-local-dev>   warn(f"{f.__name__} will be removed in the next release.", FutureWarning)
python3.8-cadquery-local-dev> /build/source/cadquery/utils.py:34: FutureWarning: exportShape will be removed in the next release.
python3.8-cadquery-local-dev>   warn(f"{f.__name__} will be removed in the next release.", FutureWarning)
python3.8-cadquery-local-dev> Exception occurred:
python3.8-cadquery-local-dev>   File "/build/source/cadquery/occ_impl/exporters/__init__.py", line 142, in tessellate
python3.8-cadquery-local-dev>     return shape.tessellate(tolerance, angularTolerance)
python3.8-cadquery-local-dev> AttributeError: 'Assembly' object has no attribute 'tessellate'

Need to update sphinxcadquery, but even still that's not the issue.

assert error "Failed to project box"

MWE:

width = 10
inner_diam = 10
outer_diam = 100
part = (
    cq.Workplane("YZ", origin=(-width / 2, 0, 0))
    .circle(inner_diam / 2)
    .circle(outer_diam / 2)
    .extrude(width)
)

Spin it a bit with the mouse and this pops up in the log:

[2021-05-08 01:07:44.826334] ERROR: CQ-Editor: Uncaught exception occurred
Traceback (most recent call last):
  File "/nix/store/8v18gdz65092h6rzq7ry96l4ziy6lasi-cq-editor-local/lib/python3.8/site-packages/cq_editor/widgets/occt_widget.py", line 109, in mouseReleaseEvent
    self.context.MoveTo(x,y,self.view,True)
OCP.Standard.Standard_ProgramError: *** ERROR: ASSERT in file '/build/occt-V7_5_1-94c0055/src/SelectMgr/SelectMgr_Frustum.lxx': 
Error! Failed to project box (aBoxProjMax >= aBoxProjMin)

This does not occur in a VM with a canonical Conda install.

Still to do:

  • check versions between my cq-flake and the canonical Conda install
  • bisect this repo, because I think this is new behaviour

Setup CI

I let a link to a local direction get merged from dev branch into main. Didn't notice because the local link was available to me during all tests. A silly mistake that would be caught if I had CI on a clean machine.

update readme

  • cq-docs attribute
  • VTK to large build times
  • "specify a commit and note it down so you always use the same version of CQ to render your design"

Package build123d

Build123d describes itself as "an evolution of CadQuery", relies on the same hellish-to-package cadquery-ocp library, and seems to have some community overlap.

nix flake show fails

Think the way I handle python in flake.nix is wrong, it doesn't create a derivation when it should.

Upstreaming to nixpkgs

Hello,

Is there any reason this isn't upstreamed to nixpkgs?

I have tried using this with the latest nixpkgs version, but it required quite some tweaking. I might be doing a PR once I get rid of some of the bugs :)

Unable to build with updated nixpkgs

I did some minor patching, but am unable to build it by updating nixpkgs.

diff --git a/expressions/cq-editor.nix b/expressions/cq-editor.nix
index c47745c..5171f8a 100644
--- a/expressions/cq-editor.nix
+++ b/expressions/cq-editor.nix
@@ -16,7 +16,7 @@ mkDerivationWith python3Packages.buildPythonApplication {
 
   propagatedBuildInputs = with python3Packages; [
     cadquery
-    Logbook
+    logbook
     nlopt
     pyqt5
     pyparsing
diff --git a/expressions/py-overrides.nix b/expressions/py-overrides.nix
index 6cee176..51a2014 100644
--- a/expressions/py-overrides.nix
+++ b/expressions/py-overrides.nix
@@ -88,7 +88,7 @@
 
   spyder = (super.spyder.overrideAttrs (oldAttrs: {
     propagatedBuildInputs = with self; oldAttrs.propagatedBuildInputs ++ [
-      cookiecutter Rtree qstylizer jellyfish
+      cookiecutter rtree qstylizer jellyfish
     ];
   }));
 
diff --git a/expressions/sphinx-autodoc-typehints.nix b/expressions/sphinx-autodoc-typehints.nix
index a4cf773..7dfc065 100644
--- a/expressions/sphinx-autodoc-typehints.nix
+++ b/expressions/sphinx-autodoc-typehints.nix
@@ -18,7 +18,7 @@ buildPythonPackage rec {
   disabled = pythonOlder "3.7";
 
   src = fetchFromGitHub {
-    owner = "agronholm";
+    owner = "tox-dev";
     repo = "sphinx-autodoc-typehints";
     rev = version;
     sha256 = "sha256-hM4YIWsfEESaKaXg6Ds+XDUIz3Bi64RoMfBfnuBPdrM=";
diff --git a/flake.lock b/flake.lock
index 70a7359..42762be 100644
--- a/flake.lock
+++ b/flake.lock
@@ -68,11 +68,11 @@
     },
     "nixpkgs": {
       "locked": {
-        "lastModified": 1673134516,
-        "narHash": "sha256-mAZQKqkNQbBmJnmUU0blOfkKlgMSSVyPHdeWeuKad8U=",
+        "lastModified": 1692084312,
+        "narHash": "sha256-Za++qKVK6ovjNL9poQZtLKRM/re663pxzbJ+9M4Pgwg=",
         "owner": "NixOS",
         "repo": "nixpkgs",
-        "rev": "f6f44561884c3470e2b783683d5dbac42dfc833b",
+        "rev": "8353344d3236d3fda429bb471c1ee008857d3b7c",
         "type": "github"
       },
       "original": {

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.