Compare commits
386 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
911c67b2d8 | ||
![]() |
acc25ecd57 | ||
![]() |
ca2aad7fea | ||
![]() |
5744d1d599 | ||
![]() |
e2e74762f4 | ||
![]() |
335c217114 | ||
![]() |
60f85f5a39 | ||
![]() |
7e2b1b1d8d | ||
![]() |
15f349049c | ||
![]() |
27b59f601e | ||
![]() |
dbf66639aa | ||
![]() |
f2f37aeed8 | ||
![]() |
9ab37c2ebf | ||
![]() |
61fe8badf2 | ||
![]() |
8e27a5e34b | ||
![]() |
91574254fe | ||
![]() |
dea573e156 | ||
![]() |
3bcc376224 | ||
![]() |
6bc2ed9771 | ||
![]() |
3c36d8f887 | ||
![]() |
312184505c | ||
![]() |
41794dbadb | ||
![]() |
e6ed36f739 | ||
![]() |
f29d9d7a34 | ||
![]() |
1871efa02b | ||
![]() |
2e15f60ef6 | ||
![]() |
d77f617dc4 | ||
![]() |
6cf5409cd7 | ||
![]() |
cd26256675 | ||
![]() |
97e71856b3 | ||
![]() |
ced42440e7 | ||
![]() |
80c7296316 | ||
![]() |
4260be2445 | ||
![]() |
baf9dc0aae | ||
![]() |
4465bc0270 | ||
![]() |
51b88280e5 | ||
![]() |
279424290b | ||
![]() |
6e88eaef69 | ||
![]() |
d4b052d34d | ||
![]() |
3fc85b7934 | ||
![]() |
27a5f6f9bd | ||
![]() |
67a916d19c | ||
![]() |
ff0af6fdba | ||
![]() |
495a7ac166 | ||
![]() |
bb2cc4aa56 | ||
![]() |
669e6f0dcb | ||
![]() |
119b17ac75 | ||
![]() |
86f229c5e6 | ||
![]() |
db75e06ecc | ||
![]() |
068191bf28 | ||
![]() |
8749a175a6 | ||
![]() |
e388d9fd16 | ||
![]() |
5d9356a90a | ||
![]() |
4aae22929a | ||
![]() |
3e668079b5 | ||
![]() |
8d0e226722 | ||
![]() |
572fbc7463 | ||
![]() |
04e86d9b36 | ||
![]() |
67146f6ab2 | ||
![]() |
8370382a33 | ||
![]() |
5b2ad9b5f1 | ||
![]() |
6931979b8e | ||
![]() |
5c34b3f6ef | ||
![]() |
12a1a35784 | ||
![]() |
fba88859e1 | ||
![]() |
ec07516580 | ||
![]() |
29e43e67ea | ||
![]() |
cde86a0626 | ||
![]() |
6b67cfe63f | ||
![]() |
6de5133609 | ||
![]() |
022d012a44 | ||
![]() |
43db2201fd | ||
![]() |
c00ab25740 | ||
![]() |
855de072be | ||
![]() |
55ae10b5b8 | ||
![]() |
96476ca2e5 | ||
![]() |
fb667fb8bb | ||
![]() |
33c9ffb5ca | ||
![]() |
c12672be66 | ||
![]() |
aeebc3c395 | ||
![]() |
0eb33decd1 | ||
![]() |
984f74d271 | ||
![]() |
4fda1e4361 | ||
![]() |
da7c74af2e | ||
![]() |
00dda08917 | ||
![]() |
27ac3c7b5f | ||
![]() |
529e1bfd63 | ||
![]() |
4f04406121 | ||
![]() |
387c5c5144 | ||
![]() |
934f33f4c0 | ||
![]() |
c385740087 | ||
![]() |
9f697af138 | ||
![]() |
6b8f937894 | ||
![]() |
d8932772ef | ||
![]() |
02ab358bd9 | ||
![]() |
daf3c7b070 | ||
![]() |
f1d4c4a50c | ||
![]() |
2eb934243b | ||
![]() |
e127b28a2d | ||
![]() |
9253e5f229 | ||
![]() |
6bb73a162c | ||
![]() |
7dbbd75969 | ||
![]() |
25631d4fb2 | ||
![]() |
d99a133982 | ||
![]() |
9148d0cb91 | ||
![]() |
10251c6484 | ||
![]() |
727c0a97dc | ||
![]() |
5763972ed8 | ||
![]() |
626ffeab1f | ||
![]() |
d6e2ac8328 | ||
![]() |
11adaf20b7 | ||
![]() |
15571ef58e | ||
![]() |
3dd2fc0093 | ||
![]() |
435682729e | ||
![]() |
374d1b5e7f | ||
![]() |
6fcf1bbe79 | ||
![]() |
4a0b4fd8d3 | ||
![]() |
679a1f0ded | ||
![]() |
d1ddc6ee07 | ||
![]() |
6989a3d068 | ||
![]() |
3858cbe249 | ||
![]() |
b975380493 | ||
![]() |
47244c5e89 | ||
![]() |
dbc567ed89 | ||
![]() |
9301dec98d | ||
![]() |
7681f6df74 | ||
![]() |
d37f53e190 | ||
![]() |
7758844f96 | ||
![]() |
f5485cbf24 | ||
![]() |
78d141cf9c | ||
![]() |
3d6d873906 | ||
![]() |
cc07058e48 | ||
![]() |
8f93136d8a | ||
![]() |
41365c5f9f | ||
![]() |
aaab8a09d4 | ||
![]() |
43629549c1 | ||
![]() |
37defcbc33 | ||
![]() |
01ae452507 | ||
![]() |
61f248899a | ||
![]() |
8dc60f61c1 | ||
![]() |
d3f2ac7513 | ||
![]() |
369b0a378c | ||
![]() |
683ac78ca2 | ||
![]() |
0ae0343fc7 | ||
![]() |
9a0f2c3601 | ||
![]() |
73844f7202 | ||
![]() |
c8ff17f4a2 | ||
![]() |
9db50ed077 | ||
![]() |
156fe73bee | ||
![]() |
92773a5770 | ||
![]() |
52557ee979 | ||
![]() |
6d2c2aecff | ||
![]() |
f8824e1fb2 | ||
![]() |
e56630e71d | ||
![]() |
c97ba6b928 | ||
![]() |
ea0a1b743a | ||
![]() |
802d092b13 | ||
![]() |
e681ba3218 | ||
![]() |
3c451586d7 | ||
![]() |
c7277521f3 | ||
![]() |
489ae66e96 | ||
![]() |
fdd08cbead | ||
![]() |
3b241392d4 | ||
![]() |
1ec36fc657 | ||
![]() |
9673225648 | ||
![]() |
a0d7f1dadb | ||
![]() |
13d4a1bb6a | ||
![]() |
7b9d730a23 | ||
![]() |
f5e955a015 | ||
![]() |
afecbccb0f | ||
![]() |
d151eb56fc | ||
![]() |
b846401c73 | ||
![]() |
74cb1f589c | ||
![]() |
23feb4cf8f | ||
![]() |
7bd6adefd8 | ||
![]() |
b8bec35a0c | ||
![]() |
0e72c606ab | ||
![]() |
505f503cc3 | ||
![]() |
600c39db91 | ||
![]() |
cdd6174cfa | ||
![]() |
071a7acc9d | ||
![]() |
592bea8109 | ||
![]() |
f619a4b85e | ||
![]() |
345c982b3b | ||
![]() |
90987d3ee4 | ||
![]() |
3a585ea7c2 | ||
![]() |
b2092eaea9 | ||
![]() |
8e329ca2b3 | ||
![]() |
b37aba00e2 | ||
![]() |
47288e9a4c | ||
![]() |
186911a51a | ||
![]() |
d2c250324b | ||
![]() |
ea52fcbce1 | ||
![]() |
62f5f690c1 | ||
![]() |
2ccf5954d4 | ||
![]() |
6658b1fa2b | ||
![]() |
5462fc6b3c | ||
![]() |
90f10ccfa6 | ||
![]() |
b5f5e05336 | ||
![]() |
b0363802d8 | ||
![]() |
291e16e549 | ||
![]() |
363f5c1ab8 | ||
![]() |
af226b2437 | ||
![]() |
9f97e9aad4 | ||
![]() |
a5c7fc6ad9 | ||
![]() |
df83ee4c8f | ||
![]() |
1108a6f37d | ||
![]() |
e80a3a0a71 | ||
![]() |
ffa104602c | ||
![]() |
f4e85127d6 | ||
![]() |
aa958504af | ||
![]() |
b10e621fce | ||
![]() |
456c987218 | ||
![]() |
e9725bd350 | ||
![]() |
9febc572a3 | ||
![]() |
93da88369f | ||
![]() |
66ed417d45 | ||
![]() |
476860acbb | ||
![]() |
2371068d01 | ||
![]() |
0e66eafe5a | ||
![]() |
3ff236c494 | ||
![]() |
9bcba4b92c | ||
![]() |
a8e723381c | ||
![]() |
f5a37ae2fd | ||
![]() |
4537444db5 | ||
![]() |
21a4305ee1 | ||
![]() |
2f64f18095 | ||
![]() |
2f4c6a6b0e | ||
![]() |
da2d035200 | ||
![]() |
c43a1988ae | ||
![]() |
fbd89a7e30 | ||
![]() |
819c4c5742 | ||
![]() |
7787923d05 | ||
![]() |
d12bf047b4 | ||
![]() |
fb87431ba5 | ||
![]() |
58db06d845 | ||
![]() |
fd54e5ac27 | ||
![]() |
06a188cc62 | ||
![]() |
cd5b5b2d7c | ||
![]() |
e7edc39b34 | ||
![]() |
ffd9c6241a | ||
![]() |
b9d375652c | ||
![]() |
a1e18ae4a6 | ||
![]() |
991909d794 | ||
![]() |
f998293760 | ||
![]() |
4c30c09792 | ||
![]() |
efd358d734 | ||
![]() |
6e860fb148 | ||
![]() |
8ce2922902 | ||
![]() |
e2e9167210 | ||
![]() |
0bf6167e16 | ||
![]() |
e381c70842 | ||
![]() |
35a20ae260 | ||
![]() |
065a0a8b00 | ||
![]() |
b2ab15c2e1 | ||
![]() |
cf9c3310fc | ||
![]() |
8bf55b3c62 | ||
![]() |
fbe2705ebe | ||
![]() |
415a6d36ff | ||
![]() |
068ed2816a | ||
![]() |
f8b6c33290 | ||
![]() |
e462387fca | ||
![]() |
4b4944264b | ||
![]() |
ba1cd83d9e | ||
![]() |
f2633e4a57 | ||
![]() |
8e7d2eaa84 | ||
![]() |
ff23a4a471 | ||
![]() |
9a1ceaa5c8 | ||
![]() |
fd9ee94437 | ||
![]() |
4f49a8a9d4 | ||
![]() |
a2a50927e9 | ||
![]() |
42d3ec9917 | ||
![]() |
2fdbabc13c | ||
![]() |
5e63d8301e | ||
![]() |
977a0b8e6d | ||
![]() |
65e2cccde0 | ||
![]() |
6963c7e25b | ||
![]() |
8960ee365a | ||
![]() |
8af3a933cf | ||
![]() |
7f0083aa1d | ||
![]() |
14cf0e09df | ||
![]() |
c83421a2b5 | ||
![]() |
d0e32849b2 | ||
![]() |
50b2b8adfd | ||
![]() |
613aa8c579 | ||
![]() |
803665404e | ||
![]() |
6d5d88f01e | ||
![]() |
6846010416 | ||
![]() |
0c90cd799d | ||
![]() |
bcd8c3e790 | ||
![]() |
6607a48357 | ||
![]() |
7265121b24 | ||
![]() |
216091a366 | ||
![]() |
7f411d1593 | ||
![]() |
e7c8c1c8f2 | ||
![]() |
bd2da7fe3f | ||
![]() |
89da072427 | ||
![]() |
b0d37c1e78 | ||
![]() |
a4a121694c | ||
![]() |
6e17780e01 | ||
![]() |
ad2371cfae | ||
![]() |
8ccc9fe56c | ||
![]() |
8747745a14 | ||
![]() |
33e292a6bc | ||
![]() |
cbf84a9d2b | ||
![]() |
25575b14c7 | ||
![]() |
0b999f4165 | ||
![]() |
737ff51893 | ||
![]() |
5a2eb9fb50 | ||
![]() |
d0a0a0f8cf | ||
![]() |
32a2a4dbd9 | ||
![]() |
da1fc3fd70 | ||
![]() |
131acc5e56 | ||
![]() |
21179c2e30 | ||
![]() |
a1589401b6 | ||
![]() |
ced5b78420 | ||
![]() |
a4e487d298 | ||
![]() |
5c754bd994 | ||
![]() |
51f4f27b2b | ||
![]() |
3a34f63415 | ||
![]() |
85cd44df3c | ||
![]() |
e0283b2d2e | ||
![]() |
fb62e0494b | ||
![]() |
251948bdbd | ||
![]() |
a98cdeeb16 | ||
![]() |
0066f93fb4 | ||
![]() |
3c887d30e3 | ||
![]() |
1dba594949 | ||
![]() |
afafa5ec2e | ||
![]() |
44223ea332 | ||
![]() |
a425395fe3 | ||
![]() |
f8f5095b3d | ||
![]() |
de6be52293 | ||
![]() |
215b8e4537 | ||
![]() |
122920d3ee | ||
![]() |
14cbd0bbee | ||
![]() |
66746d151f | ||
![]() |
682bfa2732 | ||
![]() |
a4e7dea9e3 | ||
![]() |
faa84c61cf | ||
![]() |
73d82a6347 | ||
![]() |
5791310bb1 | ||
![]() |
8aab0160d3 | ||
![]() |
3cd9c28ebc | ||
![]() |
1249f8496e | ||
![]() |
4128a5d8d4 | ||
![]() |
f33ddc94fb | ||
![]() |
3103728c15 | ||
![]() |
7bda30aca4 | ||
![]() |
274233fe08 | ||
![]() |
23ff9fa8d1 | ||
![]() |
8372154384 | ||
![]() |
68c4d6f704 | ||
![]() |
e2916e3e4a | ||
![]() |
20d87d93c5 | ||
![]() |
91e18eed73 | ||
![]() |
ddc0dd7194 | ||
![]() |
9c08398f51 | ||
![]() |
def73ec118 | ||
![]() |
4c318f09c4 | ||
![]() |
bb0eef2b96 | ||
![]() |
457ff78849 | ||
![]() |
bbca4cc224 | ||
![]() |
ad4a204edf | ||
![]() |
4415f5bb91 | ||
![]() |
1b52c46b81 | ||
![]() |
ab418b827e | ||
![]() |
193477e2da | ||
![]() |
d37d77a257 | ||
![]() |
63398ef3ba | ||
![]() |
45514849e2 | ||
![]() |
b55e096fef | ||
![]() |
432e7680a4 | ||
![]() |
4b0dc5819b | ||
![]() |
fbc5bfc27f | ||
![]() |
69b8a3b3b3 | ||
![]() |
56e2d451f4 | ||
![]() |
fc79642788 | ||
![]() |
645c2d90ac | ||
![]() |
a525f03371 | ||
![]() |
fa546af28f | ||
![]() |
4c01461316 | ||
![]() |
e36ee32def | ||
![]() |
a6b6d98a94 | ||
![]() |
f4c01f670c | ||
![]() |
b2cdbe8c8d |
30
.gitattributes
vendored
|
@ -1,22 +1,10 @@
|
|||
# .gitattributes for SolveSpace
|
||||
|
||||
# Set default behaviour, in case users don't have core.autocrlf set.
|
||||
* text=auto
|
||||
|
||||
# Explicitly declare text files we want to always be normalized and converted
|
||||
# to native line endings on checkout.
|
||||
*.cpp text
|
||||
*.h text
|
||||
*.txt text
|
||||
|
||||
# Declare files that will always have CRLF line endings on checkout.
|
||||
*.sln text eol=crlf
|
||||
|
||||
# Denote all files that are truly binary and should not be modified.
|
||||
*.gz binary
|
||||
*.ico binary
|
||||
*.jpg binary
|
||||
*.lib binary
|
||||
*.png binary
|
||||
|
||||
# end .gitattributes
|
||||
*.cpp text
|
||||
*.h text
|
||||
*.txt text
|
||||
*.gz binary
|
||||
*.ico binary
|
||||
*.jpg binary
|
||||
*.lib binary
|
||||
*.png binary
|
||||
*.slvs binary
|
||||
|
|
18
.github/ISSUE_TEMPLATE.md
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
### System information
|
||||
|
||||
SolveSpace version: (e.g. 3.0~3dd2fc00; go to Help → About...)
|
||||
|
||||
Operating system: (e.g. Debian testing)
|
||||
|
||||
### Expected behavior
|
||||
|
||||
What should have happened?
|
||||
|
||||
### Actual behavior
|
||||
|
||||
What actually happened?
|
||||
|
||||
### Additional information
|
||||
|
||||
For bugs, please attach a savefile that shows the problematic behavior.
|
||||
You can attach `.slvs` files by archiving them into a `.zip` first.
|
5
.gitignore
vendored
|
@ -1,6 +1,8 @@
|
|||
/CMakeCache.txt
|
||||
/build*/
|
||||
*.trace # OpenGL apitrace files
|
||||
/test/**/*.diff.*
|
||||
/test/**/*.curr.*
|
||||
*.trace
|
||||
/debian/tmp/
|
||||
/debian/*.log
|
||||
/debian/*.substvars
|
||||
|
@ -10,3 +12,4 @@
|
|||
/debian/libslvs1/
|
||||
/debian/libslvs1-dev/
|
||||
/obj-*/
|
||||
/*.slvs
|
||||
|
|
13
.gitmodules
vendored
|
@ -5,9 +5,18 @@
|
|||
[submodule "extlib/libpng"]
|
||||
path = extlib/libpng
|
||||
url = https://github.com/glennrp/libpng
|
||||
[submodule "extlib/libfreetype"]
|
||||
path = extlib/libfreetype
|
||||
[submodule "extlib/freetype"]
|
||||
path = extlib/freetype
|
||||
url = http://git.sv.nongnu.org/r/freetype/freetype2.git
|
||||
[submodule "extlib/libdxfrw"]
|
||||
path = extlib/libdxfrw
|
||||
url = https://github.com/solvespace/libdxfrw.git
|
||||
[submodule "extlib/pixman"]
|
||||
path = extlib/pixman
|
||||
url = https://github.com/solvespace/pixman
|
||||
[submodule "extlib/cairo"]
|
||||
path = extlib/cairo
|
||||
url = https://github.com/solvespace/cairo
|
||||
[submodule "extlib/angle"]
|
||||
path = extlib/angle
|
||||
url = https://github.com/solvespace/angle
|
||||
|
|
|
@ -4,6 +4,7 @@ os:
|
|||
- osx
|
||||
sudo: required
|
||||
dist: trusty
|
||||
osx_image: xcode8.2
|
||||
install:
|
||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./.travis/install-debian.sh; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./.travis/install-macos.sh; fi
|
||||
|
@ -20,3 +21,9 @@ deploy:
|
|||
repo: solvespace/solvespace
|
||||
tags: true
|
||||
condition: "$TRAVIS_OS_NAME == osx"
|
||||
notifications:
|
||||
irc:
|
||||
channels:
|
||||
- "chat.freenode.net#solvespace"
|
||||
use_notice: true
|
||||
skip_join: true
|
||||
|
|
|
@ -4,5 +4,10 @@ if echo $TRAVIS_TAG | grep ^v; then BUILD_TYPE=RelWithDebInfo; else BUILD_TYPE=D
|
|||
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE
|
||||
# We build without the GUI until Travis updates to an Ubuntu version with GTK 3.22.
|
||||
cmake .. -DCMAKE_C_COMPILER=clang-3.9 -DCMAKE_CXX_COMPILER=clang++-3.9 \
|
||||
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
|
||||
-DENABLE_GUI=OFF \
|
||||
-DENABLE_SANITIZERS=ON
|
||||
make VERBOSE=1
|
||||
make test_solvespace
|
||||
|
|
|
@ -5,10 +5,5 @@ if echo $TRAVIS_TAG | grep ^v; then BUILD_TYPE=RelWithDebInfo; else BUILD_TYPE=D
|
|||
mkdir build
|
||||
cd build
|
||||
cmake -DCMAKE_OSX_DEPLOYMENT_TARGET=10.7 -DCMAKE_BUILD_TYPE=$BUILD_TYPE ..
|
||||
if ! make VERBOSE=1; then
|
||||
echo "Sigh, transient build failure. Retrying..."
|
||||
if ! make VERBOSE=1; then
|
||||
echo "Okay, this is probably an actual bug."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
make VERBOSE=1
|
||||
make test_solvespace
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
#!/bin/sh -xe
|
||||
|
||||
wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
|
||||
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
|
||||
sudo add-apt-repository -y 'deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-3.9 main'
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -q -y \
|
||||
cmake cmake-data libpng12-dev zlib1g-dev libjson0-dev libfontconfig1-dev \
|
||||
libgtkmm-2.4-dev libpangomm-1.4-dev libgl1-mesa-dev libglu-dev libglew-dev \
|
||||
libfreetype6-dev dpkg-dev
|
||||
libgtkmm-3.0-dev libpangomm-1.4-dev libcairo2-dev libgl1-mesa-dev libglu-dev \
|
||||
libfreetype6-dev dpkg-dev libstdc++-5-dev clang-3.9 clang++-3.9 lcov
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#!/bin/sh -xe
|
||||
|
||||
brew update
|
||||
brew install freetype cairo
|
||||
|
|
76
CHANGELOG.md
|
@ -1,6 +1,82 @@
|
|||
Changelog
|
||||
=========
|
||||
|
||||
3.0
|
||||
---
|
||||
|
||||
New sketch features:
|
||||
* Extrude, lathe, translate and rotate groups can now use the "assembly"
|
||||
boolean operation, to increase performance.
|
||||
* Translate and rotate groups can create n-dimensional arrays using
|
||||
the "difference" and "assembly" boolean operations.
|
||||
* A new sketch in workplane group can be created based on existing workplane.
|
||||
* TTF text request has two additional points on the right side, which allow
|
||||
constraining the width of text.
|
||||
* Image requests can now be created, similar to TTF text requests.
|
||||
This replaces the "style → background image" feature.
|
||||
* Irrelevant points (e.g. arc center point) are not counted when estimating
|
||||
the bounding box used to compute chord tolerance.
|
||||
* When adding a constraint which has a label and is redundant with another
|
||||
constraint, the constraint is added as a reference, avoiding an error.
|
||||
* Datum points can be copied and pasted.
|
||||
|
||||
New constraint features:
|
||||
* When dragging an arc or rectangle point, it will be automatically
|
||||
constrained to other points with a click.
|
||||
* When selecting a constraint, the requests it constraints can be selected
|
||||
in the text window.
|
||||
* When selecting an entity, the constraints applied to it can be selected
|
||||
in the text window.
|
||||
|
||||
New export/import features:
|
||||
* Three.js: allow configuring projection for exported model, and initially
|
||||
use the current viewport projection.
|
||||
* Wavefront OBJ: a material file is exported alongside the model, containing
|
||||
mesh color information.
|
||||
* DXF/DWG: 3D DXF files are imported as construction entities, in 3d.
|
||||
|
||||
New rendering features:
|
||||
* The "Show/hide hidden lines" button is now a tri-state button that allows
|
||||
showing all lines (on top of shaded mesh), stippling occluded lines
|
||||
or not drawing them at all.
|
||||
* The "Show/hide outlines" button is now independent from "Show/hide edges".
|
||||
|
||||
New measurement/analysis features:
|
||||
* New command for measuring total length of selected entities,
|
||||
"Analyze → Measure Perimeter".
|
||||
* New command for measuring center of mass, with live updates as the sketch
|
||||
changes, "Analyze → Center of Mass".
|
||||
* When selecting a point and a line, projected distance to to current
|
||||
workplane is displayed.
|
||||
|
||||
Other new features:
|
||||
* New command-line interface, for batch exporting and more.
|
||||
* New link to match the on-screen size of the sketch with its actual size,
|
||||
"view → set to full scale".
|
||||
* When zooming to fit, constraints are also considered.
|
||||
* When clicking on an entity that shares a place with other entities,
|
||||
the entity from the current group is selected.
|
||||
* When dragging an entity that shares a place with other entities,
|
||||
the entity from a request is selected. For example, dragging a point on
|
||||
a face of an extrusion coincident with the source sketch plane will
|
||||
drag the point from the source sketch.
|
||||
* In expressions, numbers can contain the digit group separator, "_".
|
||||
* The "=" key is bound to "Zoom In", like "+" key.
|
||||
* The numpad decimal separator key is bound to "." regardless of locale.
|
||||
* On Windows, full-screen mode is implemented.
|
||||
|
||||
Bugs fixed:
|
||||
* A point in 3d constrained to any line whose length is free no longer
|
||||
causes the line length to collapse.
|
||||
* Curve-line constraints (in 3d), parallel constraints (in 3d), and
|
||||
same orientation constraints are more robust.
|
||||
* Adding some constraints (vertical, midpoint, etc) twice errors out
|
||||
immediately, instead of later and in a confusing way.
|
||||
* Constraining a newly placed point to a hovered entity does not cause
|
||||
spurious changes in the sketch.
|
||||
* Points highlighted with "Analyze → Show Degrees of Freedom" are drawn
|
||||
on top of all other geometry.
|
||||
|
||||
2.3
|
||||
---
|
||||
|
||||
|
|
365
CMakeLists.txt
|
@ -1,5 +1,12 @@
|
|||
# cmake configuration
|
||||
|
||||
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
|
||||
message(FATAL_ERROR
|
||||
"In-tree builds are not supported; please perform an out-of-tree build:\n"
|
||||
" rm -rf CMakeCache.txt CMakeFiles/\n"
|
||||
" mkdir build && cd build && cmake ..")
|
||||
endif()
|
||||
|
||||
cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
|
||||
cmake_policy(VERSION 3.1.0)
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}
|
||||
|
@ -7,8 +14,6 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}
|
|||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED YES)
|
||||
|
||||
include(CheckIncludeFile)
|
||||
|
||||
# for /MT on MSVC
|
||||
set(CMAKE_USER_MAKE_RULES_OVERRIDE
|
||||
"${CMAKE_SOURCE_DIR}/cmake/c_flag_overrides.cmake")
|
||||
|
@ -25,29 +30,218 @@ include(GetGitCommitHash)
|
|||
# set(GIT_COMMIT_HASH 0000000000000000000000000000000000000000)
|
||||
|
||||
project(solvespace)
|
||||
set(solvespace_VERSION_MAJOR 2)
|
||||
set(solvespace_VERSION_MINOR 3)
|
||||
set(solvespace_VERSION_MAJOR 3)
|
||||
set(solvespace_VERSION_MINOR 0)
|
||||
string(SUBSTRING "${GIT_COMMIT_HASH}" 0 8 solvespace_GIT_HASH)
|
||||
|
||||
if(NOT WIN32 AND NOT APPLE)
|
||||
set(GUI gtk2 CACHE STRING "GUI toolkit to use (one of: gtk2 gtk3)")
|
||||
set(ENABLE_GUI ON CACHE BOOL
|
||||
"Whether the graphical interface is enabled (command line interface always is)")
|
||||
set(ENABLE_TESTS ON CACHE BOOL
|
||||
"Whether the test suite will be built and run")
|
||||
set(ENABLE_COVERAGE OFF CACHE BOOL
|
||||
"Whether code coverage information will be collected")
|
||||
set(ENABLE_SANITIZERS OFF CACHE BOOL
|
||||
"Whether to enable Clang's AddressSanitizer and UndefinedBehaviorSanitizer")
|
||||
|
||||
set(OPENGL 2 CACHE STRING "OpenGL version to use (one of: 1 2)")
|
||||
|
||||
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
|
||||
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
|
||||
|
||||
if(NOT CMAKE_C_COMPILER_ID STREQUAL CMAKE_CXX_COMPILER_ID)
|
||||
message(FATAL_ERROR "C and C++ compilers should be supplied by the same vendor")
|
||||
endif()
|
||||
|
||||
# compiler
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
|
||||
# GCC 4.8/4.9 ship with broken but present <regex>. meh.
|
||||
message(FATAL_ERROR "GCC 5.0+ is required")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# common compiler flags
|
||||
|
||||
if(MINGW)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static-libgcc")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libgcc -static-libstdc++")
|
||||
|
||||
if(TRIPLE STREQUAL "i686-w64-mingw32")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse2")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(APPLE OR CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
|
||||
endif()
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed ${CMAKE_EXE_LINKER_FLAGS}")
|
||||
endif()
|
||||
|
||||
if(ENABLE_SANITIZERS)
|
||||
if(NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
message(FATAL_ERROR "Sanitizers are only available when using Clang/Clang++")
|
||||
endif()
|
||||
set(SANITIZE_FLAGS "-O1 -fno-omit-frame-pointer -fno-optimize-sibling-calls")
|
||||
set(SANITIZE_FLAGS "${SANITIZE_FLAGS} -fsanitize=address,integer")
|
||||
set(SANITIZE_FLAGS "${SANITIZE_FLAGS} -fno-sanitize-recover=integer")
|
||||
# We assume IEEE floats, which means DIV/0 is defined; but ubsan doesn't do so by default.
|
||||
set(SANITIZE_FLAGS "${SANITIZE_FLAGS} -fno-sanitize=float-divide-by-zero")
|
||||
set(SANITIZE_FLAGS "${SANITIZE_FLAGS} -fno-sanitize=unsigned-integer-overflow")
|
||||
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${SANITIZE_FLAGS}")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SANITIZE_FLAGS}")
|
||||
endif()
|
||||
|
||||
# dependencies
|
||||
|
||||
message(STATUS "Using in-tree libdxfrw")
|
||||
add_subdirectory(extlib/libdxfrw)
|
||||
|
||||
if(WIN32)
|
||||
include(FindVendoredPackage)
|
||||
include(AddVendoredSubdirectory)
|
||||
|
||||
find_vendored_package(Freetype freetype
|
||||
WITH_ZLIB OFF
|
||||
WITH_BZip2 OFF
|
||||
WITH_PNG OFF
|
||||
WITH_HarfBuzz OFF
|
||||
FREETYPE_LIBRARY freetype
|
||||
FREETYPE_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extlib/freetype/include)
|
||||
|
||||
find_vendored_package(ZLIB zlib
|
||||
ZLIB_LIBRARY zlibstatic
|
||||
ZLIB_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/extlib/zlib)
|
||||
list(APPEND ZLIB_INCLUDE_DIR ${CMAKE_BINARY_DIR}/extlib/zlib)
|
||||
|
||||
find_vendored_package(PNG libpng
|
||||
SKIP_INSTALL_ALL ON
|
||||
PNG_LIBRARY png_static
|
||||
PNG_PNG_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/extlib/libpng)
|
||||
list(APPEND PNG_PNG_INCLUDE_DIR ${CMAKE_BINARY_DIR}/extlib/libpng)
|
||||
|
||||
message(STATUS "Using in-tree pixman")
|
||||
add_vendored_subdirectory(extlib/pixman)
|
||||
set(PIXMAN_FOUND YES)
|
||||
set(PIXMAN_LIBRARY pixman)
|
||||
set(PIXMAN_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extlib/pixman/pixman)
|
||||
list(APPEND PIXMAN_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/extlib/pixman/pixman)
|
||||
|
||||
message(STATUS "Using in-tree cairo")
|
||||
add_vendored_subdirectory(extlib/cairo)
|
||||
set(CAIRO_FOUND YES)
|
||||
set(CAIRO_LIBRARIES cairo)
|
||||
set(CAIRO_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extlib/cairo/src)
|
||||
list(APPEND CAIRO_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/extlib/cairo/src)
|
||||
|
||||
if(ENABLE_GUI)
|
||||
if(OPENGL STREQUAL "2")
|
||||
message(STATUS "Using in-tree ANGLE")
|
||||
set(ANGLE_STATIC ON CACHE INTERNAL "")
|
||||
set(ANGLE_ENABLE_D3D9 ON CACHE INTERNAL "")
|
||||
set(ANGLE_ENABLE_D3D11 ON CACHE INTERNAL "")
|
||||
set(ANGLE_ENABLE_OPENGL OFF CACHE INTERNAL "")
|
||||
set(ANGLE_ENABLE_ESSL OFF CACHE INTERNAL "")
|
||||
set(ANGLE_ENABLE_GLSL OFF CACHE INTERNAL "")
|
||||
set(ANGLE_ENABLE_HLSL ON CACHE INTERNAL "")
|
||||
add_vendored_subdirectory(extlib/angle)
|
||||
set(OPENGL_LIBRARIES EGL GLESv2)
|
||||
set(OPENGL_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/extlib/angle/include)
|
||||
else()
|
||||
find_package(OpenGL REQUIRED)
|
||||
endif()
|
||||
|
||||
if(MSVC AND ${CMAKE_SIZEOF_VOID_P} EQUAL 4)
|
||||
message(STATUS "Using prebuilt SpaceWare")
|
||||
set(SPACEWARE_FOUND TRUE)
|
||||
set(SPACEWARE_INCLUDE_DIR
|
||||
"${CMAKE_SOURCE_DIR}/extlib/si")
|
||||
set(SPACEWARE_LIBRARIES
|
||||
"${CMAKE_SOURCE_DIR}/extlib/si/siapp.lib")
|
||||
endif()
|
||||
endif()
|
||||
elseif(APPLE)
|
||||
set(CMAKE_FIND_FRAMEWORK LAST)
|
||||
|
||||
find_package(ZLIB REQUIRED)
|
||||
find_package(PNG REQUIRED)
|
||||
find_package(Freetype REQUIRED)
|
||||
|
||||
find_library(CAIRO_LIBRARIES cairo REQUIRED)
|
||||
find_path(CAIRO_INCLUDE_DIRS cairo.h PATH_SUFFIXES cairo)
|
||||
|
||||
if(ENABLE_GUI)
|
||||
find_package(OpenGL REQUIRED)
|
||||
find_library(APPKIT_LIBRARY AppKit REQUIRED)
|
||||
endif()
|
||||
else() # Linux and compatible systems
|
||||
find_package(PkgConfig REQUIRED)
|
||||
|
||||
find_package(Backtrace)
|
||||
find_package(SpaceWare)
|
||||
|
||||
find_package(ZLIB REQUIRED)
|
||||
find_package(PNG REQUIRED)
|
||||
find_package(Freetype REQUIRED)
|
||||
pkg_check_modules(CAIRO REQUIRED cairo)
|
||||
|
||||
if(ENABLE_GUI)
|
||||
find_package(OpenGL REQUIRED)
|
||||
pkg_check_modules(FONTCONFIG REQUIRED fontconfig)
|
||||
pkg_check_modules(JSONC REQUIRED json-c)
|
||||
pkg_check_modules(GTKMM REQUIRED gtkmm-3.0>=3.16 pangomm-1.4 x11)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ENABLE_COVERAGE)
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL GNU)
|
||||
find_program(GCOV gcov)
|
||||
elseif(CMAKE_CXX_COMPILER_ID MATCHES Clang)
|
||||
find_program(LLVM_COV llvm-cov)
|
||||
|
||||
if(LLVM_COV)
|
||||
set(GCOV ${CMAKE_CURRENT_BINARY_DIR}/llvm-gcov.sh)
|
||||
file(WRITE ${GCOV} "#!/bin/sh -e\n${LLVM_COV} gcov $*")
|
||||
execute_process(COMMAND chmod +x ${GCOV})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_program(LCOV lcov)
|
||||
find_program(GENHTML genhtml)
|
||||
if(NOT GCOV OR NOT LCOV OR NOT GENHTML)
|
||||
message(FATAL_ERROR "gcov/llvm-cov and lcov are required for producing coverage reports")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_program(XGETTEXT xgettext)
|
||||
find_program(MSGINIT msginit)
|
||||
find_program(MSGMERGE msgmerge)
|
||||
if(XGETTEXT AND MSGINIT AND MSGMERGE)
|
||||
set(HAVE_GETTEXT TRUE)
|
||||
else()
|
||||
message(WARNING "Gettext not found, translations will not be updated")
|
||||
set(HAVE_GETTEXT FALSE)
|
||||
endif()
|
||||
|
||||
# solvespace-only compiler flags
|
||||
|
||||
if(WIN32)
|
||||
add_definitions(
|
||||
-D_CRT_SECURE_NO_DEPRECATE
|
||||
-D_CRT_SECURE_NO_WARNINGS
|
||||
-D_SCL_SECURE_NO_WARNINGS
|
||||
-D_WIN32_WINNT=0x500
|
||||
-DWINVER=0x0601
|
||||
-D_WIN32_WINNT=0x0601
|
||||
-D_WIN32_IE=_WIN32_WINNT
|
||||
-DISOLATION_AWARE_ENABLED
|
||||
-DWIN32
|
||||
-DWIN32_LEAN_AND_MEAN
|
||||
-DUNICODE
|
||||
-D_UNICODE
|
||||
-DNOMINMAX
|
||||
-D_UNICODE)
|
||||
-D_USE_MATH_DEFINES)
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
|
@ -55,141 +249,56 @@ if(MSVC)
|
|||
# they have their own __inline; this breaks `static inline` functions.
|
||||
# We do not want to care and so we fix this with a definition.
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Dinline=__inline")
|
||||
# Same for the (C99) __func__ special variable; we use it only in C++ code.
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D__func__=__FUNCTION__")
|
||||
|
||||
# We rely on these /we flags. They correspond to the GNU-style flags below as
|
||||
# follows: /w4062=-Wswitch
|
||||
set(WARNING_FLAGS "${WARNING_FLAGS} /we4062")
|
||||
endif()
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL GNU OR CMAKE_CXX_COMPILER_ID STREQUAL Clang)
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
set(WARNING_FLAGS "-Wall -Wextra -Wno-unused-parameter")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARNING_FLAGS}")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 ${WARNING_FLAGS}")
|
||||
endif()
|
||||
|
||||
if(MINGW)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static-libgcc")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libgcc -static-libstdc++")
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
|
||||
endif()
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed ${CMAKE_EXE_LINKER_FLAGS}")
|
||||
endif()
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed ${CMAKE_EXE_LINKER_FLAGS}")
|
||||
endif()
|
||||
|
||||
if(SANITIZE)
|
||||
if(NOT (CMAKE_C_COMPILER_ID STREQUAL Clang AND CMAKE_CXX_COMPILER_ID STREQUAL Clang))
|
||||
message(ERROR "Sanitizers are only available in Clang/Clang++")
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
set(WARNING_FLAGS "${WARNING_FLAGS} -Wfloat-conversion")
|
||||
endif()
|
||||
set(SANITIZE_FLAGS "-O1 -fno-omit-frame-pointer -fno-optimize-sibling-calls")
|
||||
set(SANITIZE_FLAGS "${SANITIZE_FLAGS} -fsanitize=address,undefined,integer")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${SANITIZE_FLAGS}")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SANITIZE_FLAGS}")
|
||||
# We rely on these -Werror flags.
|
||||
set(WARNING_FLAGS "${WARNING_FLAGS} -Werror=switch")
|
||||
endif()
|
||||
|
||||
# dependencies
|
||||
|
||||
find_package(OpenGL REQUIRED)
|
||||
|
||||
message(STATUS "Using in-tree libdxfrw")
|
||||
add_subdirectory(extlib/libdxfrw)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARNING_FLAGS}")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNING_FLAGS}")
|
||||
|
||||
if(WIN32)
|
||||
# Configure Freetype first. If done later, it will notice that
|
||||
# zlib is available, try to use it and promptly break on MSVC
|
||||
# in a very obscure way. Given that the only use of zlib, bzip2
|
||||
# and png support is in support for extremely obsolete Unix fonts,
|
||||
# we don't care.
|
||||
find_package(Freetype)
|
||||
set(CMAKE_RC_FLAGS "${CMAKE_RC_FLAGS} -l0")
|
||||
endif()
|
||||
|
||||
if(NOT FREETYPE_FOUND)
|
||||
message(STATUS "Using in-tree libfreetype")
|
||||
|
||||
add_subdirectory(extlib/libfreetype EXCLUDE_FROM_ALL)
|
||||
|
||||
set(FREETYPE_LIBRARY
|
||||
freetype)
|
||||
set(FREETYPE_INCLUDE_DIRS
|
||||
"${CMAKE_SOURCE_DIR}/extlib/libfreetype/include")
|
||||
find_package(Freetype REQUIRED)
|
||||
if(ENABLE_COVERAGE)
|
||||
if(NOT (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR
|
||||
CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
|
||||
message(FATAL_ERROR "Code coverage is only available on GCC and Clang")
|
||||
endif()
|
||||
|
||||
find_package(ZLIB)
|
||||
|
||||
if(NOT ZLIB_FOUND)
|
||||
message(STATUS "Using in-tree zlib")
|
||||
add_subdirectory(extlib/zlib EXCLUDE_FROM_ALL)
|
||||
|
||||
message(STATUS "Using in-tree libpng")
|
||||
set(ZLIB_LIBRARY
|
||||
zlibstatic)
|
||||
set(ZLIB_INCLUDE_DIR
|
||||
"${CMAKE_SOURCE_DIR}/extlib/zlib"
|
||||
"${CMAKE_BINARY_DIR}/extlib/zlib")
|
||||
find_package(ZLIB REQUIRED)
|
||||
if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
message(FATAL_ERROR "Code coverage produces reliable results only on Debug builds")
|
||||
endif()
|
||||
|
||||
find_package(PNG)
|
||||
|
||||
if(NOT PNG_FOUND)
|
||||
message(STATUS "Using in-tree libpng")
|
||||
|
||||
set(SKIP_INSTALL_ALL
|
||||
ON)
|
||||
add_subdirectory(extlib/libpng EXCLUDE_FROM_ALL)
|
||||
|
||||
set(PNG_LIBRARY
|
||||
png16_static)
|
||||
set(PNG_PNG_INCLUDE_DIR
|
||||
"${CMAKE_SOURCE_DIR}/extlib/libpng"
|
||||
"${CMAKE_BINARY_DIR}/extlib/libpng")
|
||||
find_package(PNG REQUIRED)
|
||||
endif()
|
||||
|
||||
if(NOT MINGW)
|
||||
message(STATUS "Using prebuilt SpaceWare")
|
||||
set(SPACEWARE_FOUND TRUE)
|
||||
set(SPACEWARE_INCLUDE_DIR
|
||||
"${CMAKE_SOURCE_DIR}/extlib/si")
|
||||
set(SPACEWARE_LIBRARIES
|
||||
"${CMAKE_SOURCE_DIR}/extlib/si/siapp.lib")
|
||||
endif()
|
||||
elseif(APPLE)
|
||||
set(CMAKE_FIND_FRAMEWORK LAST)
|
||||
|
||||
find_package(PNG REQUIRED)
|
||||
find_package(Freetype REQUIRED)
|
||||
find_library(APPKIT_LIBRARY AppKit REQUIRED)
|
||||
else() # Linux and compatible systems
|
||||
find_package(SpaceWare)
|
||||
|
||||
# Use freedesktop's pkg-config to locate everything.
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(ZLIB REQUIRED zlib)
|
||||
pkg_check_modules(PNG REQUIRED libpng)
|
||||
pkg_check_modules(FONTCONFIG REQUIRED fontconfig)
|
||||
pkg_check_modules(JSONC REQUIRED json-c)
|
||||
pkg_check_modules(GLEW REQUIRED glew)
|
||||
pkg_check_modules(FREETYPE REQUIRED freetype2)
|
||||
|
||||
set(HAVE_GTK TRUE)
|
||||
if(GUI STREQUAL "gtk3")
|
||||
set(HAVE_GTK3 TRUE)
|
||||
pkg_check_modules(GTKMM REQUIRED gtkmm-3.0 pangomm-1.4 x11)
|
||||
elseif(GUI STREQUAL "gtk2")
|
||||
set(HAVE_GTK2 TRUE)
|
||||
pkg_check_modules(GTKMM REQUIRED gtkmm-2.4 pangomm-1.4 x11)
|
||||
else()
|
||||
message(FATAL_ERROR "GUI unrecognized: ${GUI}")
|
||||
endif()
|
||||
# With -fexceptions, every call becomes a branch. While technically accurate,
|
||||
# this is not useful for us.
|
||||
set(COVERAGE_FLAGS -fno-exceptions --coverage)
|
||||
set(COVERAGE_LIBRARY --coverage)
|
||||
endif()
|
||||
|
||||
# components
|
||||
|
||||
add_subdirectory(tools)
|
||||
add_subdirectory(res)
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(exposed)
|
||||
if(ENABLE_TESTS)
|
||||
add_subdirectory(test)
|
||||
endif()
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
|
||||
add_subdirectory(bench)
|
||||
else()
|
||||
message(STATUS "Benchmarking disabled in debug builds.")
|
||||
endif()
|
||||
|
|
250
CONTRIBUTING.md
Normal file
|
@ -0,0 +1,250 @@
|
|||
Contributing to SolveSpace
|
||||
==========================
|
||||
|
||||
Contributing bug reports
|
||||
------------------------
|
||||
|
||||
Bug reports are always welcome! When reporting a bug, please include the following:
|
||||
|
||||
* The version of SolveSpace (use Help → About...);
|
||||
* The operating system;
|
||||
* The save file that reproduces the incorrect behavior, or, if trivial or impossible,
|
||||
instructions for reproducing it.
|
||||
|
||||
GitHub does not allow attaching `*.slvs` files, but it does allow attaching `*.zip` files,
|
||||
so any savefiles should first be archived.
|
||||
|
||||
Contributing code
|
||||
-----------------
|
||||
|
||||
SolveSpace is written in C++, and currently targets all compilers compliant with C++11.
|
||||
This includes GCC 5 and later, Clang 3.3 and later, and Visual Studio 12 (2013) and later.
|
||||
|
||||
### High-level conventions
|
||||
|
||||
#### Portability
|
||||
|
||||
SolveSpace aims to consist of two general parts: a fully portable core, and platform-specific
|
||||
UI and support code. Anything outside of `src/platform/` should only use standard C++11,
|
||||
and rely on `src/platform/unixutil.cpp` and `src/platform/w32util.cpp` to interact with
|
||||
the OS where this cannot be done through the C++11 standard library.
|
||||
|
||||
#### Libraries
|
||||
|
||||
SolveSpace primarily relies on the C++11 STL. STL has well-known drawbacks, but is also
|
||||
widely supported, used, and understood. SolveSpace also includes a fair amount of use of
|
||||
bespoke containers List and IdList; these provide STL iterators, and can be used when
|
||||
convenient, such as when reusing other code.
|
||||
|
||||
One notable departure here is the STL I/O threads. SolveSpace does not use STL I/O threads
|
||||
for two reasons: (i) the interface is borderline unusable, and (ii) on Windows it is not
|
||||
possible to open files with Unicode paths through STL.
|
||||
|
||||
When using external libraries (other than to access platform features), the libraries
|
||||
should satisfy the following conditions:
|
||||
|
||||
* Portable, and preferably not interacting with the platform at all;
|
||||
* Can be included as a CMake subproject, to facilitate Windows, Android, etc. builds;
|
||||
* Use a license less restrictive than GPL (BSD/MIT, Apache2, MPL, etc.)
|
||||
|
||||
#### String encoding
|
||||
|
||||
Internally, SolveSpace exclusively stores and uses UTF-8 for all purposes; any `std::string`
|
||||
may be assumed to be encoded in UTF-8. On Windows, UTF-8 strings are converted to and from
|
||||
wide strings at the boundary; see [UTF-8 Everywhere][utf8] for details.
|
||||
|
||||
[utf8]: http://utf8everywhere.org/
|
||||
|
||||
#### String formatting
|
||||
|
||||
For string formatting, a wrapper around `sprintf`, `ssprintf`, is used. A notable
|
||||
pitfall when using it is trying to pass an `std::string` argument without first converting
|
||||
it to a C string with `.c_str()`.
|
||||
|
||||
#### Filesystem access
|
||||
|
||||
For filesystem access, the C standard library is used. The `ssfopen` and `ssremove`
|
||||
wrappers are provided that accept UTF-8 encoded paths.
|
||||
|
||||
#### Assertions
|
||||
|
||||
To ensure that internal invariants hold, the `ssassert` function is used, e.g.
|
||||
`ssassert(!isFoo, "Unexpected foo condition");`. Unlike the standard `assert` function,
|
||||
the `ssassert` function is always enabled, even in release builds. It is more valuable
|
||||
to discover a bug through a crash than to silently generate incorrect results, and crashes
|
||||
do not result in losing more than a few minutes of work thanks to the autosave feature.
|
||||
|
||||
### Use of C++ features
|
||||
|
||||
The conventions described in this section should be used for all new code, but there is a lot
|
||||
of existing code in SolveSpace that does not use them. This is fine; don't touch it if it works,
|
||||
but if you need to modify it anyway, might as well modernize it.
|
||||
|
||||
#### Exceptions
|
||||
|
||||
Exceptions are not used primarily because SolveSpace's testsuite uses measurement
|
||||
of branch coverage, important for the critical parts such as the geometric kernel.
|
||||
Every function call with exceptions enabled introduces a branch, making branch coverage
|
||||
measurement useless.
|
||||
|
||||
#### Operator overloading
|
||||
|
||||
Operator overloading is not used primarily for historical reasons. Instead, method such
|
||||
as `Plus` are used.
|
||||
|
||||
#### Member visibility
|
||||
|
||||
Member visibility is not used for implementation hiding. Every member field and function
|
||||
is `public`.
|
||||
|
||||
#### Constructors
|
||||
|
||||
Constructors are not used for initialization, chiefly because indicating an error
|
||||
in a constructor would require throwing an exception, nor does it use constructors for
|
||||
blanket zero-initialization because of the performance impact of doing this for common
|
||||
POD classes like `Vector`.
|
||||
|
||||
Instances can be zero-initialized using the aggregate-initialization syntax, e.g. `Foo foo = {};`.
|
||||
This zero-initializes the POD members and default-initializes the non-POD members, generally
|
||||
being an equivalent of `memset(&foo, 0, sizeof(foo));` but compatible with STL containers.
|
||||
|
||||
#### Input- and output-arguments
|
||||
|
||||
Functions accepting an input argument take it either by-value (`Vector v`) or
|
||||
by-const-reference (`const Vector &v`). Generally, passing by-value is safer as the value
|
||||
cannot be aliased by something else, but passing by-const-reference is faster, as a copy is
|
||||
eliminated. Small values should always be passed by-value, and otherwise functions that do not
|
||||
capture pointers into their arguments should take them by-const-reference. Use your judgement.
|
||||
|
||||
Functions accepting an output argument always take it by-pointer (`Vector *v`). This makes
|
||||
it immediately visible at the call site as it is seen that the address is taken. Arguments
|
||||
are never passed by-reference, except when needed for interoperability with STL, etc.
|
||||
|
||||
#### Iteration
|
||||
|
||||
`foreach`-style iteration is preferred for both STL and `List`/`IdList` containers as it indicates
|
||||
intent clearly, as opposed to `for`-style.
|
||||
|
||||
#### Const correctness
|
||||
|
||||
Functions that do not mutate `this` should be marked as `const`; when iterating a collection
|
||||
without mutating any of its elements, `for(const Foo &elem : collection)` is preferred to indicate
|
||||
the intent.
|
||||
|
||||
### Coding style
|
||||
|
||||
Code is formatted by the following rules:
|
||||
|
||||
* Code is indented using 4 spaces, with no trailing spaces, and lines are wrapped
|
||||
at 100 columns;
|
||||
* Braces are placed at the end of the line with the declaration or control flow statement;
|
||||
* Braces are used with every control flow statement, even if there is only one statement
|
||||
in the body;
|
||||
* There is no space after control flow keywords (`if`, `while`, etc.);
|
||||
* Identifiers are formatted in camel case; variables start with a lowercase letter
|
||||
(`exampleVariable`) and functions start with an uppercase letter (`ExampleFunction`).
|
||||
|
||||
For example:
|
||||
|
||||
```c++
|
||||
std::string SolveSpace::Dirname(std::string filename) {
|
||||
int slash = filename.rfind(PATH_SEP);
|
||||
if(slash >= 0) {
|
||||
return filename.substr(0, slash);
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
```
|
||||
|
||||
Debugging code
|
||||
--------------
|
||||
|
||||
SolveSpace releases are throughly tested but sometimes they contain crash
|
||||
bugs anyway. The reason for such crashes can be determined only if the executable
|
||||
was built with debug information.
|
||||
|
||||
### Debugging a released version
|
||||
|
||||
The Linux distributions usually include separate debug information packages.
|
||||
On a Debian derivative (e.g. Ubuntu), these can be installed with:
|
||||
|
||||
apt-get install solvespace-dbg
|
||||
|
||||
The macOS releases include the debug information, and no further action
|
||||
is needed.
|
||||
|
||||
The Windows releases include the debug information on the GitHub
|
||||
[release downloads page](https://github.com/solvespace/solvespace/releases).
|
||||
|
||||
### Debugging a custom build
|
||||
|
||||
If you are building SolveSpace yourself on a Unix-like platform,
|
||||
configure or re-configure SolveSpace to produce a debug build, and
|
||||
then re-build it:
|
||||
|
||||
cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Debug [other cmake args...]
|
||||
make
|
||||
|
||||
If you are building SolveSpace yourself using the Visual Studio IDE,
|
||||
select Debug from the Solution Configurations list box on the toolbar,
|
||||
and build the solution.
|
||||
|
||||
### Debugging with gdb
|
||||
|
||||
gdb is a debugger that is mostly used on Linux. First, run SolveSpace
|
||||
under debugging:
|
||||
|
||||
gdb [path to solvespace executable]
|
||||
(gdb) run
|
||||
|
||||
Then, reproduce the crash. After the crash, attach the output in
|
||||
the console, as well as output of the following gdb commands to
|
||||
a bug report:
|
||||
|
||||
(gdb) backtrace
|
||||
(gdb) info locals
|
||||
|
||||
If the crash is not easy to reproduce, please generate a core file,
|
||||
which you can use to resume the debugging session later, and provide
|
||||
any other information that is requested:
|
||||
|
||||
(gdb) generate-core-file
|
||||
|
||||
This will generate a large file called like `core.1234` in the current
|
||||
directory; it can be later re-loaded using `gdb --core core.1234`.
|
||||
|
||||
### Debugging with lldb
|
||||
|
||||
lldb is a debugger that is mostly used on macOS. First, run SolveSpace
|
||||
under debugging:
|
||||
|
||||
lldb [path to solvespace executable]
|
||||
(lldb) run
|
||||
|
||||
Then, reproduce the crash. After the crash, attach the output in
|
||||
the console, as well as output of the following gdb commands to
|
||||
a bug report:
|
||||
|
||||
(lldb) backtrace all
|
||||
(lldb) frame variable
|
||||
|
||||
If the crash is not easy to reproduce, please generate a core file,
|
||||
which you can use to resume the debugging session later, and provide
|
||||
any other information that is requested:
|
||||
|
||||
(lldb) process save-core "core"
|
||||
|
||||
This will generate a large file called `core` in the current
|
||||
directory; it can be later re-loaded using `lldb -c core`.
|
||||
|
||||
### Debugging GUI-related bugs on Linux
|
||||
|
||||
There are several environment variables available that make crashes
|
||||
earlier and errors more informative. Before running SolveSpace, run
|
||||
the following commands in your shell:
|
||||
|
||||
export G_DEBUG=fatal_warnings
|
||||
export LIBGL_DEBUG=1
|
||||
export MESA_DEBUG=1
|
76
README.md
|
@ -9,10 +9,10 @@ This repository contains the source code of [SolveSpace][], a parametric
|
|||
Installation
|
||||
------------
|
||||
|
||||
### Mac OS X (>=10.6 64-bit), Debian (>=jessie) and Ubuntu (>=trusty)
|
||||
### macOS (>=10.6 64-bit), Windows (>=Vista 32-bit)
|
||||
|
||||
Binary packages for Mac OS X and Debian derivatives are available
|
||||
via [GitHub releases][rel].
|
||||
Binary packages for macOS and Windows are available via
|
||||
[GitHub releases][rel].
|
||||
|
||||
[rel]: https://github.com/solvespace/solvespace/releases
|
||||
|
||||
|
@ -25,14 +25,14 @@ Building on Linux
|
|||
|
||||
### Building for Linux
|
||||
|
||||
You will need CMake, libpng, zlib, json-c, fontconfig, freetype, gtkmm 2.4,
|
||||
pangomm 1.4, OpenGL, OpenGL GLU and OpenGL GLEW, and optionally, the Space Navigator
|
||||
client library.
|
||||
You will need CMake, zlib, libpng, cairo, freetype. To build the GUI, you will need
|
||||
fontconfig, gtkmm 3.0 (version 3.16 or later), pangomm 1.4, OpenGL and OpenGL GLU, and
|
||||
optionally, the Space Navigator client library.
|
||||
On a Debian derivative (e.g. Ubuntu) these can be installed with:
|
||||
|
||||
apt-get install libpng12-dev libjson-c-dev libfreetype6-dev \
|
||||
libfontconfig1-dev libgtkmm-2.4-dev libpangomm-1.4-dev \
|
||||
libgl-dev libglu-dev libglew-dev libspnav-dev cmake
|
||||
apt-get install cmake zlib1g-dev libpng-dev libcairo2-dev libfreetype6-dev
|
||||
apt-get install libjson-c-dev libfontconfig1-dev libgtkmm-3.0-dev libpangomm-1.4-dev \
|
||||
libgl-dev libglu-dev libspnav-dev
|
||||
|
||||
Before building, check out the necessary submodules:
|
||||
|
||||
|
@ -42,19 +42,20 @@ After that, build SolveSpace as following:
|
|||
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release
|
||||
make
|
||||
sudo make install
|
||||
|
||||
A fully functional port to GTK3 is available, but not recommended
|
||||
for use due to bugs in this toolkit.
|
||||
The graphical interface is built as `build/bin/solvespace`, and the command-line interface
|
||||
is built as `build/bin/solvespace-cli`. It is possible to build only the command-line interface
|
||||
by passing the `-DENABLE_GUI=OFF` flag to the cmake invocation.
|
||||
|
||||
### Building for Windows
|
||||
|
||||
You will need CMake, a Windows cross-compiler, and Wine with binfmt support.
|
||||
You will need CMake and a Windows cross-compiler.
|
||||
On a Debian derivative (e.g. Ubuntu) these can be installed with:
|
||||
|
||||
apt-get install cmake mingw-w64 wine-binfmt
|
||||
apt-get install cmake mingw-w64
|
||||
|
||||
Before building, check out the necessary submodules:
|
||||
|
||||
|
@ -64,27 +65,31 @@ After that, build 32-bit SolveSpace as following:
|
|||
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-mingw32.cmake ..
|
||||
make solvespace
|
||||
cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-mingw32.cmake \
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
make
|
||||
|
||||
Or, build 64-bit SolveSpace as following:
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-mingw64.cmake ..
|
||||
make solvespace
|
||||
cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-mingw64.cmake \
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
make
|
||||
|
||||
The application is built as `build/src/solvespace.exe`.
|
||||
The graphical interface is built as `build/bin/solvespace.exe`, and the command-line interface
|
||||
is built as `build/bin/solvespace-cli.exe`.
|
||||
|
||||
Space Navigator support will not be available.
|
||||
|
||||
Building on Mac OS X
|
||||
--------------------
|
||||
Building on macOS
|
||||
-----------------
|
||||
|
||||
You will need XCode tools, CMake, libpng and Freetype. Assuming you use
|
||||
You will need XCode tools, CMake, libpng and Freetype. To build tests, you
|
||||
will need cairo. Assuming you use
|
||||
[homebrew][], these can be installed with:
|
||||
|
||||
brew install cmake libpng freetype
|
||||
brew install cmake libpng freetype cairo
|
||||
|
||||
XCode has to be installed via AppStore; it requires a free Apple ID.
|
||||
|
||||
|
@ -96,26 +101,28 @@ After that, build SolveSpace as following:
|
|||
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release
|
||||
make
|
||||
|
||||
The app bundle is built in `build/src/solvespace.app`.
|
||||
The application is built in `build/bin/solvespace.app`, the graphical interface executable
|
||||
is `build/bin/solvespace.app/Contents/MacOS/solvespace`, and the command-line interface executable
|
||||
is `build/bin/solvespace.app/Contents/MacOS/solvespace-cli`.
|
||||
|
||||
[homebrew]: http://brew.sh/
|
||||
|
||||
Building on Windows
|
||||
-------------------
|
||||
|
||||
You will need [cmake][cmakewin] and Visual C++.
|
||||
You will need [git][gitwin], [cmake][cmakewin] and Visual C++.
|
||||
|
||||
### GUI build
|
||||
### Building with Visual Studio IDE
|
||||
|
||||
Check out the git submodules. Create a directory `build` in
|
||||
the source tree and point cmake-gui to the source tree and that directory.
|
||||
Press "Configure" and "Generate", then open `build\solvespace.sln` with
|
||||
Visual C++ and build it.
|
||||
|
||||
### Command-line build
|
||||
### Building with Visual Studio in a command prompt
|
||||
|
||||
First, ensure that git and cl (the Visual C++ compiler driver) are in your
|
||||
`%PATH%`; the latter is usually done by invoking `vcvarsall.bat` from your
|
||||
|
@ -124,10 +131,10 @@ Visual Studio install. Then, run the following in cmd or PowerShell:
|
|||
git submodule update --init
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -G "NMake Makefiles"
|
||||
cmake .. -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release
|
||||
nmake
|
||||
|
||||
### MSVC build
|
||||
### Building with MinGW
|
||||
|
||||
It is also possible to build SolveSpace using [MinGW][mingw], though
|
||||
Space Navigator support will be disabled.
|
||||
|
@ -138,12 +145,19 @@ in bash:
|
|||
git submodule update --init
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release
|
||||
make
|
||||
|
||||
[gitwin]: https://git-scm.com/download/win
|
||||
[cmakewin]: http://www.cmake.org/download/#latest
|
||||
[mingw]: http://www.mingw.org/
|
||||
|
||||
Contributing
|
||||
------------
|
||||
|
||||
See the [guide for contributors](CONTRIBUTING.md) for the best way to file issues, contribute code,
|
||||
and debug SolveSpace.
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
|
|
20
appveyor.yml
|
@ -1,4 +1,4 @@
|
|||
version: 2.2.{build}
|
||||
version: 3.0.{build}
|
||||
clone_depth: 1
|
||||
before_build:
|
||||
- git submodule update --init
|
||||
|
@ -6,23 +6,25 @@ before_build:
|
|||
- cd build
|
||||
- set tag=x%APPVEYOR_REPO_TAG_NAME%
|
||||
- if %tag:~,2% == xv (set BUILD_TYPE=RelWithDebInfo) else (set BUILD_TYPE=Debug)
|
||||
- cmake -G"Visual Studio 12" -T v120_xp -DCMAKE_BUILD_TYPE=%BUILD_TYPE% ..
|
||||
- cmake -G"Visual Studio 12" -T v120 ..
|
||||
build_script:
|
||||
- msbuild "src\solvespace.vcxproj" /verbosity:minimal /property:Configuration=%BUILD_TYPE% /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
|
||||
- msbuild "src\solvespace-cli.vcxproj" /verbosity:minimal /property:Configuration=%BUILD_TYPE% /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
|
||||
- msbuild "test\solvespace-testsuite.vcxproj" /verbosity:minimal /property:Configuration=%BUILD_TYPE% /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
|
||||
test_script:
|
||||
- bin\%BUILD_TYPE%\solvespace-testsuite.exe
|
||||
artifacts:
|
||||
- path: build\src\Debug\solvespace.exe
|
||||
- path: build\bin\%BUILD_TYPE%\solvespace.exe
|
||||
name: solvespace.exe
|
||||
- path: build\src\Debug\solvespace.pdb
|
||||
name: solvespace.pdb
|
||||
- path: build\src\RelWithDebInfo\solvespace.exe
|
||||
name: solvespace.exe
|
||||
- path: build\src\RelWithDebInfo\solvespace.pdb
|
||||
- path: build\bin\%BUILD_TYPE%\solvespace-cli.exe
|
||||
name: solvespace-cli.exe
|
||||
- path: build\bin\%BUILD_TYPE%\solvespace.pdb
|
||||
name: solvespace.pdb
|
||||
deploy:
|
||||
- provider: GitHub
|
||||
auth_token:
|
||||
secure: P9/pf2nM+jlWKe7pCjMp41HycBNP/+5AsmE/TETrDUoBOa/9WFHelqdVFrbRn9IC
|
||||
description: ""
|
||||
artifact: solvespace.exe
|
||||
artifact: solvespace.exe,solvespace-cli.exe,solvespace.pdb
|
||||
on:
|
||||
appveyor_repo_tag: true
|
||||
|
|
17
bench/CMakeLists.txt
Normal file
|
@ -0,0 +1,17 @@
|
|||
# benchmark runner
|
||||
|
||||
foreach(pkg_config_lib CAIRO)
|
||||
include_directories(${${pkg_config_lib}_INCLUDE_DIRS})
|
||||
link_directories(${${pkg_config_lib}_LIBRARY_DIRS})
|
||||
endforeach()
|
||||
|
||||
add_executable(solvespace-benchmark
|
||||
harness.cpp
|
||||
$<TARGET_PROPERTY:resources,EXTRA_SOURCES>)
|
||||
|
||||
target_link_libraries(solvespace-benchmark
|
||||
solvespace-core
|
||||
solvespace-headless)
|
||||
|
||||
add_dependencies(solvespace-benchmark
|
||||
resources)
|
78
bench/harness.cpp
Normal file
|
@ -0,0 +1,78 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Our harness for running benchmarks.
|
||||
//
|
||||
// Copyright 2016 whitequark
|
||||
//-----------------------------------------------------------------------------
|
||||
#include "solvespace.h"
|
||||
|
||||
static bool RunBenchmark(std::function<void()> setupFn,
|
||||
std::function<bool()> benchFn,
|
||||
std::function<void()> teardownFn,
|
||||
size_t minIter = 5, double minTime = 5.0) {
|
||||
// Warmup
|
||||
setupFn();
|
||||
if(!benchFn()) {
|
||||
fprintf(stderr, "Benchmark failed\n");
|
||||
return false;
|
||||
}
|
||||
teardownFn();
|
||||
|
||||
// Benchmark
|
||||
size_t iter = 0;
|
||||
double time = 0.0;
|
||||
while(iter < minIter || time < minTime) {
|
||||
setupFn();
|
||||
auto testStartTime = std::chrono::steady_clock::now();
|
||||
benchFn();
|
||||
auto testEndTime = std::chrono::steady_clock::now();
|
||||
teardownFn();
|
||||
|
||||
std::chrono::duration<double> testTime = testEndTime - testStartTime;
|
||||
time += testTime.count();
|
||||
iter += 1;
|
||||
}
|
||||
|
||||
// Report
|
||||
fprintf(stdout, "Iterations: %zd\n", iter);
|
||||
fprintf(stdout, "Time: %.3f s\n", time);
|
||||
fprintf(stdout, "Per iter.: %.3f s\n", time / (double)iter);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
std::vector<std::string> args = InitPlatform(argc, argv);
|
||||
|
||||
std::string mode;
|
||||
Platform::Path filename;
|
||||
if(args.size() == 3) {
|
||||
mode = args[1];
|
||||
filename = Platform::Path::From(args[2]);
|
||||
} else {
|
||||
fprintf(stderr, "Usage: %s [mode] [filename]\n", args[0].c_str());
|
||||
fprintf(stderr, "Mode can be one of: load.\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
bool result = false;
|
||||
if(mode == "load") {
|
||||
result = RunBenchmark(
|
||||
[] {
|
||||
SS.Init();
|
||||
},
|
||||
[&] {
|
||||
if(!SS.LoadFromFile(filename))
|
||||
return false;
|
||||
SS.AfterNewFile();
|
||||
return true;
|
||||
},
|
||||
[] {
|
||||
SK.Clear();
|
||||
SS.Clear();
|
||||
});
|
||||
} else {
|
||||
fprintf(stderr, "Unknown mode \"%s\"\n", mode.c_str());
|
||||
}
|
||||
|
||||
return (result == true ? 0 : 1);
|
||||
}
|
10
cmake/AddVendoredSubdirectory.cmake
Normal file
|
@ -0,0 +1,10 @@
|
|||
# Equivalent to add_subdirectory(... EXCLUDE_FROM_ALL), but also disables
|
||||
# all warnings.
|
||||
|
||||
include(DisableWarnings)
|
||||
|
||||
function(add_vendored_subdirectory PATH)
|
||||
disable_warnings()
|
||||
|
||||
add_subdirectory(${PATH} EXCLUDE_FROM_ALL)
|
||||
endfunction()
|
15
cmake/DisableWarnings.cmake
Normal file
|
@ -0,0 +1,15 @@
|
|||
# Disables all warnings on MSVC and GNU-compatible compilers.
|
||||
|
||||
function(disable_warnings)
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w" PARENT_SCOPE)
|
||||
elseif(CMAKE_C_COMPILER_ID STREQUAL "MSVC")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W0" PARENT_SCOPE)
|
||||
endif()
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w" PARENT_SCOPE)
|
||||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W0" PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
54
cmake/FindVendoredPackage.cmake
Normal file
|
@ -0,0 +1,54 @@
|
|||
# Find the given library in the system locations, or build in-tree if not found.
|
||||
#
|
||||
# Arguments:
|
||||
# PKG_NAME - name of the package as passed to find_package
|
||||
# PKG_PATH - name of the source tree relative to extlib/
|
||||
#
|
||||
# The rest of the arguments are VARIABLE VALUE pairs. If the library is not found,
|
||||
# every VARIABLE will be set to VALUE and find_package will be rerun with the REQUIRED flag.
|
||||
# Regardless of where the library was found, only the specfied VARIABLEs that start with
|
||||
# ${PKG_NAME} will be set in the parent scope.
|
||||
#
|
||||
# All warnings in the in-tree package are disabled.
|
||||
|
||||
include(DisableWarnings)
|
||||
|
||||
function(find_vendored_package PKG_NAME PKG_PATH)
|
||||
find_package(${PKG_NAME})
|
||||
|
||||
set(cfg_name)
|
||||
foreach(item ${ARGN})
|
||||
if(NOT cfg_name)
|
||||
set(cfg_name ${item})
|
||||
else()
|
||||
set(${cfg_name} ${item} CACHE INTERNAL "")
|
||||
set(cfg_name)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
disable_warnings()
|
||||
|
||||
string(TOUPPER ${PKG_NAME} VAR_NAME)
|
||||
if(NOT ${VAR_NAME}_FOUND)
|
||||
message(STATUS "Using in-tree ${PKG_PATH}")
|
||||
set(${VAR_NAME}_IN_TREE YES CACHE INTERNAL "")
|
||||
|
||||
add_subdirectory(extlib/${PKG_PATH} EXCLUDE_FROM_ALL)
|
||||
find_package(${PKG_NAME} REQUIRED)
|
||||
elseif(${VAR_NAME}_IN_TREE)
|
||||
add_subdirectory(extlib/${PKG_PATH} EXCLUDE_FROM_ALL)
|
||||
endif()
|
||||
|
||||
# Now put everything we just discovered into the cache.
|
||||
set(cfg_name)
|
||||
foreach(item ${ARGN} ${VAR_NAME}_FOUND)
|
||||
if(NOT cfg_name)
|
||||
set(cfg_name ${item})
|
||||
else()
|
||||
if(cfg_name MATCHES "^${VAR_NAME}")
|
||||
set(${cfg_name} "${${cfg_name}}" CACHE INTERNAL "")
|
||||
endif()
|
||||
set(cfg_name)
|
||||
endif()
|
||||
endforeach()
|
||||
endfunction()
|
|
@ -13,11 +13,11 @@
|
|||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>${solvespace_VERSION_MAJOR}.${solvespace_VERSION_MINOR}</string>
|
||||
<string>${solvespace_VERSION_MAJOR}.${solvespace_VERSION_MINOR}~${solvespace_GIT_HASH}</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>${solvespace_VERSION_MAJOR}.${solvespace_VERSION_MINOR}</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>© 2008-2015 Jonathan Westhues and other authors</string>
|
||||
<string>© 2008-2016 Jonathan Westhues and other authors</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
<key>NSMainNibFile</key>
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
SET(CMAKE_SYSTEM_NAME Windows)
|
||||
set(CMAKE_SYSTEM_NAME Windows)
|
||||
|
||||
SET(TRIPLE i686-w64-mingw32)
|
||||
set(TRIPLE i686-w64-mingw32)
|
||||
|
||||
SET(CMAKE_C_COMPILER ${TRIPLE}-gcc)
|
||||
SET(CMAKE_CXX_COMPILER ${TRIPLE}-g++)
|
||||
SET(CMAKE_RC_COMPILER ${TRIPLE}-windres)
|
||||
set(CMAKE_C_COMPILER ${TRIPLE}-gcc)
|
||||
set(CMAKE_CXX_COMPILER ${TRIPLE}-g++)
|
||||
set(CMAKE_RC_COMPILER ${TRIPLE}-windres)
|
||||
|
||||
SET(CMAKE_FIND_ROOT_PATH /usr/${TRIPLE})
|
||||
set(CMAKE_FIND_ROOT_PATH /usr/${TRIPLE})
|
||||
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
|
||||
set(ENV{PKG_CONFIG_LIBDIR} /usr/${TRIPLE}/lib/pkgconfig)
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
SET(CMAKE_SYSTEM_NAME Windows)
|
||||
set(CMAKE_SYSTEM_NAME Windows)
|
||||
|
||||
SET(TRIPLE x86_64-w64-mingw32)
|
||||
set(TRIPLE x86_64-w64-mingw32)
|
||||
|
||||
SET(CMAKE_C_COMPILER ${TRIPLE}-gcc)
|
||||
SET(CMAKE_CXX_COMPILER ${TRIPLE}-g++)
|
||||
SET(CMAKE_RC_COMPILER ${TRIPLE}-windres)
|
||||
set(CMAKE_C_COMPILER ${TRIPLE}-gcc)
|
||||
set(CMAKE_CXX_COMPILER ${TRIPLE}-g++)
|
||||
set(CMAKE_RC_COMPILER ${TRIPLE}-windres)
|
||||
|
||||
SET(CMAKE_FIND_ROOT_PATH /usr/${TRIPLE})
|
||||
set(CMAKE_FIND_ROOT_PATH /usr/${TRIPLE})
|
||||
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
|
||||
set(ENV{PKG_CONFIG_LIBDIR} /usr/${TRIPLE}/lib/pkgconfig)
|
||||
|
|
|
@ -5,18 +5,13 @@
|
|||
*
|
||||
* Copyright 2008-2013 Jonathan Westhues.
|
||||
*---------------------------------------------------------------------------*/
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
#ifdef WIN32
|
||||
# include <windows.h>
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#ifdef HAVE_STDINT_H
|
||||
# include <stdint.h>
|
||||
#endif
|
||||
#include <stdint.h>
|
||||
|
||||
#include <slvs.h>
|
||||
|
||||
|
@ -36,7 +31,7 @@ static void *CheckMalloc(size_t n)
|
|||
* An example of a constraint in 3d. We create a single group, with some
|
||||
* entities and constraints.
|
||||
*---------------------------------------------------------------------------*/
|
||||
void Example3d(void)
|
||||
void Example3d()
|
||||
{
|
||||
/* This will contain a single group, which will arbitrarily number 1. */
|
||||
Slvs_hGroup g = 1;
|
||||
|
@ -88,7 +83,7 @@ void Example3d(void)
|
|||
* along the reference frame's xy plane. In a second group, we create some
|
||||
* entities in that group and dimension them.
|
||||
*---------------------------------------------------------------------------*/
|
||||
void Example2d(void)
|
||||
void Example2d()
|
||||
{
|
||||
Slvs_hGroup g;
|
||||
double qw, qx, qy, qz;
|
||||
|
@ -254,7 +249,7 @@ void Example2d(void)
|
|||
}
|
||||
}
|
||||
|
||||
int main(void)
|
||||
int main()
|
||||
{
|
||||
sys.param = CheckMalloc(50*sizeof(sys.param[0]));
|
||||
sys.entity = CheckMalloc(50*sizeof(sys.entity[0]));
|
||||
|
|
1
extlib/angle
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 6fbcce0938caaccdbea44d826759aa2e587fe2f7
|
1
extlib/cairo
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit d4724ee921c4fa399ccbd0019c3d6917452e0ffd
|
1
extlib/freetype
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 069083cccd73d1d68da68116c8d050bb62cdfe0e
|
|
@ -1 +1 @@
|
|||
Subproject commit 8f958955f54668c142ded760dc951ffd16d9c71b
|
||||
Subproject commit 6f362317bf3f176b613be48512a88b78125c79f4
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 44accb9e2e5b00696cf50a869b68afa2ce3dd389
|
|
@ -1 +1 @@
|
|||
Subproject commit 5b6a6f914b734f38d3ea96d70bfc67acd8b47414
|
||||
Subproject commit e9c3d83d5a04835806287f1e8c0f2d3a962d6673
|
1
extlib/pixman
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 5561dfc3f7e992454076ff3f10a0554c6b407e19
|
|
@ -1 +1 @@
|
|||
Subproject commit 50893291621658f355bc5b4d450a8d06a563053d
|
||||
Subproject commit 2fa463bacfff79181df1a5270fb67cc679a53e71
|
232
res/CMakeLists.txt
Normal file
|
@ -0,0 +1,232 @@
|
|||
# First, set up registration functions for the kinds of resources we handle.
|
||||
set(resource_root ${CMAKE_CURRENT_SOURCE_DIR}/)
|
||||
set(resource_list)
|
||||
if(WIN32)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/win32/versioninfo.rc.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/win32/versioninfo.rc)
|
||||
|
||||
set(rc_file ${CMAKE_CURRENT_BINARY_DIR}/resources.rc)
|
||||
file(WRITE ${rc_file} "// Autogenerated; do not edit\n")
|
||||
file(APPEND ${rc_file} "#include <windows.h>\n")
|
||||
file(APPEND ${rc_file} "#include \"${CMAKE_CURRENT_BINARY_DIR}/win32/versioninfo.rc\"\n")
|
||||
|
||||
function(add_resource name)
|
||||
set(source ${CMAKE_CURRENT_SOURCE_DIR}/${name})
|
||||
|
||||
if(${ARGC} GREATER 1)
|
||||
set(id ${ARGV1})
|
||||
else()
|
||||
string(REPLACE ${resource_root} "" id ${source})
|
||||
endif()
|
||||
if(${ARGC} GREATER 2)
|
||||
set(type ${ARGV2})
|
||||
else()
|
||||
set(type RCDATA)
|
||||
endif()
|
||||
file(SHA512 "${source}" hash)
|
||||
file(APPEND ${rc_file} "${id} ${type} \"${source}\" // ${hash}\n")
|
||||
# CMake doesn't track file dependencies across directories, so we force
|
||||
# a reconfigure (which changes the RC file because of the hash above)
|
||||
# every time a resource is changed.
|
||||
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${source}")
|
||||
endfunction()
|
||||
elseif(APPLE)
|
||||
set(app_resource_dir ${CMAKE_BINARY_DIR}/bin/solvespace.app/Contents/Resources)
|
||||
set(cli_resource_dir ${CMAKE_BINARY_DIR}/res)
|
||||
|
||||
function(add_resource name)
|
||||
set(source ${CMAKE_CURRENT_SOURCE_DIR}/${name})
|
||||
set(target_app ${app_resource_dir}/${name})
|
||||
set(target_cli ${cli_resource_dir}/${name})
|
||||
set(resource_list "${resource_list};${target_app};${target_cli}" PARENT_SCOPE)
|
||||
|
||||
get_filename_component(target_app_dir ${target_app} DIRECTORY)
|
||||
get_filename_component(target_cli_dir ${target_cli} DIRECTORY)
|
||||
add_custom_command(
|
||||
OUTPUT ${target_app} ${target_cli}
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${target_app_dir}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${source} ${target_app}
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${target_cli_dir}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${source} ${target_cli}
|
||||
COMMENT "Copying resource ${name}"
|
||||
DEPENDS ${source}
|
||||
VERBATIM)
|
||||
endfunction()
|
||||
|
||||
function(add_xib name)
|
||||
set(source ${CMAKE_CURRENT_SOURCE_DIR}/${name})
|
||||
get_filename_component(basename ${name} NAME_WE)
|
||||
set(target ${app_resource_dir}/${basename}.nib)
|
||||
set(resource_list "${resource_list};${target}" PARENT_SCOPE)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${target}
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${app_resource_dir}
|
||||
COMMAND ibtool --errors --warnings --notices --output-format human-readable-text
|
||||
--compile ${target} ${source}
|
||||
COMMENT "Building Interface Builder file ${name}"
|
||||
DEPENDS ${source}
|
||||
VERBATIM)
|
||||
endfunction()
|
||||
|
||||
function(add_iconset name)
|
||||
set(source ${CMAKE_CURRENT_SOURCE_DIR}/${name})
|
||||
get_filename_component(basename ${name} NAME_WE)
|
||||
set(target ${app_resource_dir}/${basename}.icns)
|
||||
set(resource_list "${resource_list};${target}" PARENT_SCOPE)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${target}
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${app_resource_dir}
|
||||
COMMAND iconutil -c icns -o ${target} ${source}
|
||||
COMMENT "Building icon set ${name}"
|
||||
DEPENDS ${source}
|
||||
VERBATIM)
|
||||
endfunction()
|
||||
else() # Unix
|
||||
include(GNUInstallDirs)
|
||||
|
||||
set(app_resource_dir ${CMAKE_BINARY_DIR}/res)
|
||||
|
||||
function(add_resource name)
|
||||
set(source ${CMAKE_CURRENT_SOURCE_DIR}/${name})
|
||||
set(target ${app_resource_dir}/${name})
|
||||
set(resource_list "${resource_list};${target}" PARENT_SCOPE)
|
||||
|
||||
get_filename_component(target_dir ${target} DIRECTORY)
|
||||
add_custom_command(
|
||||
OUTPUT ${target}
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${target_dir}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${source} ${target}
|
||||
COMMENT "Copying resource ${name}"
|
||||
DEPENDS ${source}
|
||||
VERBATIM)
|
||||
|
||||
get_filename_component(name_dir ${name} DIRECTORY)
|
||||
install(FILES ${source}
|
||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/solvespace/${name_dir})
|
||||
endfunction()
|
||||
endif()
|
||||
|
||||
function(add_resources)
|
||||
foreach(name ${ARGN})
|
||||
add_resource(${name})
|
||||
set(resource_list "${resource_list}" PARENT_SCOPE)
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
# Second, register all resources.
|
||||
if(WIN32)
|
||||
add_resource(win32/icon.ico 4000 ICON)
|
||||
add_resource(win32/manifest.xml 2 RT_MANIFEST)
|
||||
elseif(APPLE)
|
||||
add_iconset (cocoa/AppIcon.iconset)
|
||||
add_xib (cocoa/MainMenu.xib)
|
||||
add_xib (cocoa/SaveFormatAccessory.xib)
|
||||
else()
|
||||
add_resource(freedesktop/solvespace-48x48.png)
|
||||
|
||||
configure_file(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/freedesktop/solvespace.desktop.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/freedesktop/solvespace.desktop)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/freedesktop/solvespace.desktop
|
||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications)
|
||||
|
||||
foreach(SIZE 16x16 24x24 32x32 48x48)
|
||||
install(FILES freedesktop/solvespace-${SIZE}.png
|
||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/${SIZE}/apps
|
||||
RENAME solvespace.png)
|
||||
install(FILES freedesktop/solvespace-${SIZE}.png
|
||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/${SIZE}/mimetypes
|
||||
RENAME application.x-solvespace.png)
|
||||
endforeach()
|
||||
|
||||
foreach(SIZE 16x16 24x24 32x32 48x48)
|
||||
install(FILES freedesktop/solvespace-${SIZE}.xpm
|
||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/pixmaps)
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
add_resources(
|
||||
banner.txt
|
||||
icons/graphics-window/angle.png
|
||||
icons/graphics-window/arc.png
|
||||
icons/graphics-window/assemble.png
|
||||
icons/graphics-window/bezier.png
|
||||
icons/graphics-window/circle.png
|
||||
icons/graphics-window/construction.png
|
||||
icons/graphics-window/equal.png
|
||||
icons/graphics-window/extrude.png
|
||||
icons/graphics-window/horiz.png
|
||||
icons/graphics-window/image.png
|
||||
icons/graphics-window/in3d.png
|
||||
icons/graphics-window/lathe.png
|
||||
icons/graphics-window/length.png
|
||||
icons/graphics-window/line.png
|
||||
icons/graphics-window/ontoworkplane.png
|
||||
icons/graphics-window/other-supp.png
|
||||
icons/graphics-window/parallel.png
|
||||
icons/graphics-window/perpendicular.png
|
||||
icons/graphics-window/pointonx.png
|
||||
icons/graphics-window/point.png
|
||||
icons/graphics-window/rectangle.png
|
||||
icons/graphics-window/ref.png
|
||||
icons/graphics-window/same-orientation.png
|
||||
icons/graphics-window/sketch-in-3d.png
|
||||
icons/graphics-window/sketch-in-plane.png
|
||||
icons/graphics-window/step-rotate.png
|
||||
icons/graphics-window/step-translate.png
|
||||
icons/graphics-window/symmetric.png
|
||||
icons/graphics-window/tangent-arc.png
|
||||
icons/graphics-window/text.png
|
||||
icons/graphics-window/trim.png
|
||||
icons/graphics-window/vert.png
|
||||
icons/text-window/constraint.png
|
||||
icons/text-window/edges.png
|
||||
icons/text-window/faces.png
|
||||
icons/text-window/occluded-visible.png
|
||||
icons/text-window/occluded-stippled.png
|
||||
icons/text-window/occluded-invisible.png
|
||||
icons/text-window/mesh.png
|
||||
icons/text-window/normal.png
|
||||
icons/text-window/outlines.png
|
||||
icons/text-window/point.png
|
||||
icons/text-window/shaded.png
|
||||
icons/text-window/workplane.png
|
||||
locales.txt
|
||||
locales/en_US.po
|
||||
locales/uk_UA.po
|
||||
fonts/unifont.hex.gz
|
||||
fonts/private/0-check-false.png
|
||||
fonts/private/1-check-true.png
|
||||
fonts/private/2-radio-false.png
|
||||
fonts/private/3-radio-true.png
|
||||
fonts/private/4-stipple-dot.png
|
||||
fonts/private/5-stipple-dash-long.png
|
||||
fonts/private/6-stipple-dash.png
|
||||
fonts/private/7-stipple-zigzag.png
|
||||
fonts/unicode.lff.gz
|
||||
shaders/imesh.frag
|
||||
shaders/imesh.vert
|
||||
shaders/imesh_point.frag
|
||||
shaders/imesh_point.vert
|
||||
shaders/imesh_tex.frag
|
||||
shaders/imesh_texa.frag
|
||||
shaders/imesh_tex.vert
|
||||
shaders/mesh.frag
|
||||
shaders/mesh.vert
|
||||
shaders/mesh_fill.frag
|
||||
shaders/mesh_fill.vert
|
||||
shaders/edge.frag
|
||||
shaders/edge.vert
|
||||
shaders/outline.vert
|
||||
threejs/three-r76.js.gz
|
||||
threejs/hammer-2.0.8.js.gz
|
||||
threejs/SolveSpaceControls.js)
|
||||
|
||||
# Third, distribute the resources.
|
||||
add_custom_target(resources
|
||||
DEPENDS ${resource_list})
|
||||
if(WIN32)
|
||||
set_property(TARGET resources PROPERTY EXTRA_SOURCES ${rc_file})
|
||||
endif()
|
1
res/banner.txt
Normal file
|
@ -0,0 +1 @@
|
|||
SolveSpace!
|
Before Width: | Height: | Size: 891 B After Width: | Height: | Size: 891 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 586 B After Width: | Height: | Size: 586 B |
Before Width: | Height: | Size: 626 B After Width: | Height: | Size: 626 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 626 B After Width: | Height: | Size: 626 B |
Before Width: | Height: | Size: 746 B After Width: | Height: | Size: 746 B |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 218 B After Width: | Height: | Size: 218 B |
Before Width: | Height: | Size: 243 B After Width: | Height: | Size: 243 B |
Before Width: | Height: | Size: 228 B After Width: | Height: | Size: 228 B |
Before Width: | Height: | Size: 231 B After Width: | Height: | Size: 231 B |
Before Width: | Height: | Size: 936 B After Width: | Height: | Size: 936 B |
Before Width: | Height: | Size: 932 B After Width: | Height: | Size: 932 B |
Before Width: | Height: | Size: 932 B After Width: | Height: | Size: 932 B |
Before Width: | Height: | Size: 950 B After Width: | Height: | Size: 950 B |
Before Width: | Height: | Size: 336 B After Width: | Height: | Size: 336 B |
Before Width: | Height: | Size: 338 B After Width: | Height: | Size: 338 B |
Before Width: | Height: | Size: 348 B After Width: | Height: | Size: 348 B |
Before Width: | Height: | Size: 352 B After Width: | Height: | Size: 352 B |
|
@ -2,7 +2,7 @@
|
|||
Version=1.0
|
||||
Name=SolveSpace
|
||||
Comment=A parametric 2d/3d CAD
|
||||
Exec=/usr/bin/solvespace
|
||||
Exec=${CMAKE_INSTALL_FULL_BINDIR}/solvespace
|
||||
Icon=solvespace
|
||||
Type=Application
|
||||
Categories=Graphics
|
BIN
res/icons/graphics-window/angle.png
Normal file
After Width: | Height: | Size: 819 B |
BIN
res/icons/graphics-window/arc.png
Normal file
After Width: | Height: | Size: 686 B |
BIN
res/icons/graphics-window/assemble.png
Normal file
After Width: | Height: | Size: 454 B |
BIN
res/icons/graphics-window/bezier.png
Normal file
After Width: | Height: | Size: 710 B |
BIN
res/icons/graphics-window/circle.png
Normal file
After Width: | Height: | Size: 801 B |
BIN
res/icons/graphics-window/construction.png
Normal file
After Width: | Height: | Size: 739 B |
BIN
res/icons/graphics-window/equal.png
Normal file
After Width: | Height: | Size: 920 B |
BIN
res/icons/graphics-window/extrude.png
Normal file
After Width: | Height: | Size: 620 B |
BIN
res/icons/graphics-window/horiz.png
Normal file
After Width: | Height: | Size: 418 B |
BIN
res/icons/graphics-window/image.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
res/icons/graphics-window/in3d.png
Normal file
After Width: | Height: | Size: 512 B |
BIN
res/icons/graphics-window/lathe.png
Normal file
After Width: | Height: | Size: 401 B |
BIN
res/icons/graphics-window/length.png
Normal file
After Width: | Height: | Size: 480 B |
BIN
res/icons/graphics-window/line.png
Normal file
After Width: | Height: | Size: 511 B |
BIN
res/icons/graphics-window/ontoworkplane.png
Normal file
After Width: | Height: | Size: 412 B |
BIN
res/icons/graphics-window/other-supp.png
Normal file
After Width: | Height: | Size: 916 B |
BIN
res/icons/graphics-window/parallel.png
Normal file
After Width: | Height: | Size: 531 B |
BIN
res/icons/graphics-window/perpendicular.png
Normal file
After Width: | Height: | Size: 427 B |
BIN
res/icons/graphics-window/point.png
Normal file
After Width: | Height: | Size: 394 B |
BIN
res/icons/graphics-window/pointonx.png
Normal file
After Width: | Height: | Size: 596 B |
BIN
res/icons/graphics-window/rectangle.png
Normal file
After Width: | Height: | Size: 418 B |
BIN
res/icons/graphics-window/ref.png
Normal file
After Width: | Height: | Size: 413 B |
BIN
res/icons/graphics-window/same-orientation.png
Normal file
After Width: | Height: | Size: 673 B |
BIN
res/icons/graphics-window/sketch-in-3d.png
Normal file
After Width: | Height: | Size: 597 B |
BIN
res/icons/graphics-window/sketch-in-plane.png
Normal file
After Width: | Height: | Size: 507 B |
BIN
res/icons/graphics-window/step-rotate.png
Normal file
After Width: | Height: | Size: 871 B |
BIN
res/icons/graphics-window/step-translate.png
Normal file
After Width: | Height: | Size: 411 B |
BIN
res/icons/graphics-window/symmetric.png
Normal file
After Width: | Height: | Size: 515 B |
BIN
res/icons/graphics-window/tangent-arc.png
Normal file
After Width: | Height: | Size: 666 B |
BIN
res/icons/graphics-window/text.png
Normal file
After Width: | Height: | Size: 784 B |
BIN
res/icons/graphics-window/trim.png
Normal file
After Width: | Height: | Size: 575 B |
BIN
res/icons/graphics-window/vert.png
Normal file
After Width: | Height: | Size: 515 B |
BIN
res/icons/text-window/constraint.png
Normal file
After Width: | Height: | Size: 557 B |
BIN
res/icons/text-window/edges.png
Normal file
After Width: | Height: | Size: 703 B |
BIN
res/icons/text-window/faces.png
Normal file
After Width: | Height: | Size: 683 B |
BIN
res/icons/text-window/mesh.png
Normal file
After Width: | Height: | Size: 1.1 KiB |