Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
csg-eb
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
Container 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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
exa
csg-eb
Merge requests
!108
Update README.md
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Update README.md
mmeredith-main-patch-32083
into
main
Overview
0
Commits
1
Pipelines
1
Changes
1
Merged
Mark Meredith
requested to merge
mmeredith-main-patch-32083
into
main
3 years ago
Overview
0
Commits
1
Pipelines
1
Changes
1
Expand
1
0
Merge request reports
Compare
main
main (base)
and
latest version
latest version
f170819a
1 commit,
3 years ago
1 file
+
38
−
24
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
README.md
+
38
−
24
Options
# CSG-EB
# Table of Contents
1.
[
Dependencies
](
#dependencies
)
2.
[
Build
](
#build
)
3.
[
Install with CMake
](
#install-with-cmake
)
4.
[
Install with Spack
](
#install-with-spack
)
5.
[
Using CSG-EB in your project
](
#using-csg-eb-in-your-project
)
This library is for parsing
[
Constructive Solid Geometry
(CSG)
](
https://github.com/openscad/openscad/wiki/CSG-File-Format
)
for use in
@@ -11,33 +16,56 @@ equivalent in the kinds of geometries that can be expressed, but with fewer
primitives (OpenSCAD can export
`.scad`
files to
`.csg`
). SCAD code is easier to
read and write by humans; CSG files are easier to parse and process by software.
Dependencies:
-
[
PEGTL
](
https://github.com/taocpp/PEGTL
)
for parsing
-
[
Catch2
](
https://github.com/catchorg/Catch2
)
for testing framework
-
[
CGAL
](
https://www.cgal.org
)
for geometry computation
## Dependencies
If installing with
[
Spack
](
#spack
)
, dependencies will be installed automatically.
Install the following dependencies before building
`csg-eb`
## How to Build
-
C++17 compiler (GCC >=7.x, Clang >=5.x)
-
[
CMake
](
https://cmake.org
)
>=3.14
-
[
PEGTL
](
https://github.com/taocpp/PEGTL
)
for parsing
-
[
Catch2
](
https://github.com/catchorg/Catch2
)
for testing framework
-
[
CGAL
](
https://www.cgal.org
)
for geometry computation
### Build dependencies
-
C++17 compiler (GCC >=7.x, Clang >=5.x)
-
CMake >=3.14
## Build
```
shell
>
cmake
-S
.
-B
build
-DCMAKE_BUILD_TYPE
=
Release
>
cmake
--build
build
```
###
#
Run tests
### Run tests
```
shell
>
cd
build
>
ctest
```
## Install with CMake
To install
`csg-eb`
to a location
`$CSGEB_HOME`
:
```
shell
cmake
-S
.
-B
build
-DCMAKE_INSTALL_PREFIX
=
$CSGEB_HOME
cmake
--build
build
--target
install
```
## Install with Spack
Another way to install csg-eb is with
[
Spack
](
https://spack.readthedocs.io
)
.
To install with spack:
```
shell
spack repo add .spack/repo
# add repo with csg-eb recipe
spack spec csg-eb
# preview install
spack
install
csg-eb
# install csg-eb (with CGAL support)
spack
install
csg-eb ~cgal
# install csg-eb (without CGAL support)
spack load csg-eb
# Adds libcsg-eb.a to LD_LIBRARY_PATH and csg.hpp to CPATH
```
## Using CSG-EB in your project
@@ -89,17 +117,3 @@ add_subdirectory(/path/to/repo/csg-eb)
```
cmake
target_link_libraries
(
<target> PRIVATE csg
)
```
## Install with Spack
Another way to install csg-eb is with Spack. See the
[
Spack documentation
](
https://spack.readthedocs.io
)
for instructions on how to install Spack.
Then define a recipe for csg-eb:
```
shell
spack repo add .spack/repo
# add repo with csg-eb recipe
spack spec csg-eb
# preview install
spack
install
csg-eb
# install csg-eb (with CGAL support)
spack
install
csg-eb ~cgal
# install csg-eb (without CGAL support)
spack load csg-eb
# Adds directory with libcsg-eb.a to LD_LIBRARY_PATH
```
Loading