Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
algorithmic_cad
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Erik Strand
algorithmic_cad
Commits
e91883e9
Commit
e91883e9
authored
3 years ago
by
Erik Strand
Browse files
Options
Downloads
Patches
Plain Diff
Add installation notes
parent
4af0f0fc
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
cadquery/README.md
+78
-0
78 additions, 0 deletions
cadquery/README.md
cadquery/img/cqgui.png
+0
-0
0 additions, 0 deletions
cadquery/img/cqgui.png
with
78 additions
and
0 deletions
cadquery/README.md
0 → 100644
+
78
−
0
View file @
e91883e9
# CADQuery

## Quick Links
-
[
docs
](
https://cadquery.readthedocs.io/en/latest/
)
-
[
examples
](
https://cadquery.readthedocs.io/en/latest/examples.html
)
-
[
main repo
](
https://github.com/CadQuery/cadquery
)
-
[
GUI repo
](
https://github.com/CadQuery/CQ-editor
)
## Standalone
The instructions here are based off of
[
this video
](
https://www.youtube.com/watch?v=sjLTePOq8bQ
)
.
The standalone CADQuery library is installed via Anaconda or Miniconda. Miniconda requires far less
disk space, so it is recommended if you don't already have Anaconda installed. To install Miniconda,
download the
[
installation script
](
https://docs.conda.io/en/latest/miniconda.html
)
for your
operating system. Hashes are provided so you can ensure that your download is correct. By default,
Miniconda will install locally (i.e. in your home directory). For me, this is
`~/miniconda3`
.
Once Miniconda is installed, we want to make a conda environment in which we can install CADQuery.
First we need to activate Miniconda:
`source ~/miniconda3/bin/activate`
. Your terminal prompt should
now include
`(base)`
at the beginning of the line. Next we create a conda environment for CADQuery:
`conda create -n cadquery`
. Once that is created, we can activate that environment with
`conda
activate cadquery`
. Now your prompt should say
`(cadquery)`
at the beginning.
Finally, we install CADQuery:
`conda install -c conda-forge -c cadquery cadquery=master`
. CADQuery
has quite a few dependencies, so it's normal that those will be installed at this time as well. Note
that the last option (
`cadquery=master`
) ensures we get the latest development release. If you want
to install the latest stable release, leave it off. But CADQuery is under active development, so you
may have better luck reading the docs and following examples with the latest release.
To test that the install is functional, start a Python
[
REPL
](
https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop
)
(
i.e.
just run
`python`
),
then import CADQuery:
`import cadquery`
. If there's no error, it's working. Now you can continue
running the test commands below, or just jump into some of the examples in this repo or on the
[
CADQuery website
](
https://cadquery.readthedocs.io/en/latest/examples.html
)
. (When you're done can
exit the Python shell by running
`exit()`
.)
```
(cadquery) user@computer:~/algorithmic_cad$ python
Python 3.10.2 | packaged by conda-forge | (main, Feb 1 2022, 19:28:35) [GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cadquery
>>> result = cadquery.Workplane("XY").box(1, 1, 1)
>>> print(result)
<cadquery.cq.Workplane object at 0x7fd6a24b21d0>
```
## GUI
There are several ways to install the CADQuery GUI. Their website recommends using an installer
script, but I would recommend using Miniconda as we did for the standalone version.
### Miniconda
First, clone the
[
CADQuery Editor repo
](
https://github.com/CadQuery/CQ-editor
)
. From within that
project, run
`conda env create -f cqgui_env.yml -n cqgui`
, followed by
`conda activate cqgui`
. You
can then start the GUI by running
`python run.py`
.
Note: In theory, you can also install the GUI without cloning any repos by making a new conda
environment (e.g.
`conda create -n cqgui`
), activating it (
`conda activate cqgui`
), and running
`conda install -c cadquery -c conda-forge cq-editor=master`
. But this didn't work for me.
### Installer Script
The easiest way to install the GUI is to download and extract the
[
zipped
release
](
https://github.com/CadQuery/CQ-editor/releases
)
for your system. It contains a script
called
`CQ-editor.sh`
, and an executable
`CQ-editor/CQ-editor`
. The script just calls the executable
after setting an environment variable and running
`chmod +x`
on the executable. On Mac the
environment variable may matter; on Linux it works fine to run the executable directly.
However, I found that this release was out of date compared to what I got with a development install
of the standalone library. This was frustrating because some commands that worked in the standalone
version wouldn't work in the GUI. (As of February 2022, this included the cylinder command.) So I
wouldn't recommend using this method right now. In the future, when CADQuery is more stable, this
may become the best bet.
This diff is collapsed.
Click to expand it.
cadquery/img/cqgui.png
0 → 100644
+
0
−
0
View file @
e91883e9
353 KiB
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment