Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Changelog from upsteam #48

Open
wants to merge 66 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
f2f6fb3
supports newest jcsg (now without dynamic version syntax, since maven…
miho Feb 6, 2017
e6d6b3c
plane changed
miho Feb 7, 2017
8a7a439
playground for new renderer
miho Feb 7, 2017
ea8ca86
use vvecmath snapshot
miho Feb 7, 2017
938de1f
splitting works (but more cases should be excluded)
miho Feb 7, 2017
185b971
improved polygon splitting
miho Feb 8, 2017
be9068c
improved polygon splitting
miho Feb 8, 2017
7f87b76
fixed issues with plane intersection in new algorithm
miho Feb 9, 2017
0a99a06
more debugging
miho Feb 10, 2017
c59f3f9
new algorithm seems to work!
miho Feb 12, 2017
95101ec
added some additional checks to the new algorithm.
miho Feb 12, 2017
3800f3d
uses new vvecmath (should compile again)
miho Feb 12, 2017
dadf4f0
works with newest vvecmath library (TODO improve usage of stored/muta…
miho Feb 13, 2017
cf8b8da
Update README.md
miho Feb 14, 2017
98d1dbc
Version 0.5.3 with support for vvecmath 0.3.6
miho Jun 21, 2017
10aecbf
we are on snapshot again
miho Jun 21, 2017
fb47ebd
license header was missing in some files
miho Jun 21, 2017
61922aa
uses gradle 4.0
miho Jun 21, 2017
7aafea6
uses new vvecmath version with improved api for creating vectors
miho Jun 22, 2017
e3d2df9
snapshot
miho Jun 22, 2017
b0c8a59
uses new vvecmath version
miho Jun 22, 2017
4c8e768
uses new vvecmath version
miho Jun 22, 2017
44d50fb
snapshot
miho Jun 22, 2017
28979c2
Extrusion API improved. This will make extruding along paths much eas…
miho Jun 26, 2017
668f1d9
snapshot
miho Jun 26, 2017
bf4ea99
documentation improved
miho Jul 6, 2017
a220552
Merge branch 'master' of github.com:miho/JCSG
miho Jul 6, 2017
fb0ebd8
encapsulated polygon plane
miho Jul 12, 2017
041b3be
ignore eclipse files
madhephaestus Jul 21, 2017
2240d77
removing unused depdancy that causes a circular inclusion of an older
madhephaestus Jul 21, 2017
cefce7f
Merge pull request #39 from madhephaestus/dependancy-resolution
miho Jul 21, 2017
dcce1e3
fixes issue #42 for STL files : https://github.com/miho/JCSG/issues/42
miho Aug 18, 2017
cf00df3
triangulation of polygons possible via public api
miho Apr 7, 2018
436f848
moved to snapshot
miho Apr 7, 2018
09a5583
Update plane when flipping polygon
May 28, 2018
f2b4c4b
Merge pull request #46 from pderoovere/polygon-flip-plane-normal
miho Jun 27, 2018
1fea35a
Adding JDK 9 and 10 to the build matrix
miho Jul 24, 2018
e7ee8b0
preparing jdk10 support
miho Jul 24, 2018
0ac8acb
Compiles with JDK 10
miho Jul 24, 2018
370898f
Volume computation implemented:
miho Oct 27, 2018
727eb88
Update .travis.yml
miho Oct 27, 2018
ab3f96c
mention VCSG and extension libraries
miho Dec 20, 2018
5b1aa99
Fixed bintray plugin version
miho Dec 20, 2018
93b869e
Update build.gradle
miho Dec 20, 2018
13f9a9d
Update build.gradle
miho Dec 20, 2018
bca7f9c
Update build.gradle
miho Dec 20, 2018
b6d14a3
Update README.md
miho Dec 29, 2018
ed4ac1f
Update README.md
miho Dec 29, 2018
af6b7df
Update README.md
miho Dec 29, 2018
47f4ae8
Update README.md
miho Dec 29, 2018
25b0559
Update README.md
miho Dec 29, 2018
52db041
Update README.md
miho Jan 28, 2019
5801d91
Update README.md
miho Jan 28, 2019
3e29225
Minimal supported version is JDK 11 now
miho Aug 3, 2019
00f08a2
We need JavaFX support (should be a separate library in the future)
miho Aug 3, 2019
2f49430
Compiles on JDK 11.
miho Aug 3, 2019
a4c723e
Jar file now has an automatic module name
miho Aug 3, 2019
8026aa4
we use jdk 11 and 12 for travis
miho Aug 3, 2019
a984f24
travis related fix
miho Aug 3, 2019
a6d1512
fixed automatic module name
miho Aug 3, 2019
ca8c2d7
Update README.md
miho Aug 3, 2019
f9b4451
tests need more memory
miho Aug 3, 2019
e4faecf
Merge branch 'master' of github.com:miho/JCSG
miho Aug 3, 2019
1645be3
fix for issue #52
miho Aug 3, 2019
3b73084
Fixed problem with bounds (#61). Updated gradle and playground ideas …
miho May 31, 2020
ab42ebc
Update README.md
miho Sep 3, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
/build/
/.gradle/
/.idea/
/.nb-gradle/
/.nb-gradle/
/bin/
/.settings/
/.classpath
/.project
/.vscode/
14 changes: 9 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@ sudo: false

language: java
jdk:
- oraclejdk8
#- oraclejdk8
#- oraclejdk9
- openjdk11
- openjdk12
# - oraclejdk10 openjdk 10 is broken on travis (maybe they use the wrong download link?)

before_install:
- "export DISPLAY=:99.0"
- "export TERM=dumb"
- "sh -e /etc/init.d/xvfb start"
# before_install:
# - "export DISPLAY=:99.0"
# - "export TERM=dumb"
# - "sh -e /etc/init.d/xvfb start"

install:
- TERM=dumb ./gradlew --refresh-dependencies --stacktrace
Expand Down
23 changes: 20 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
JCSG
=======

[![Build Status](https://travis-ci.org/miho/JCSG.png?branch=master)](https://travis-ci.org/miho/JCSG) [ ![Download](https://api.bintray.com/packages/miho/JCSG/jcsg/images/download.svg) ](https://bintray.com/miho/JCSG/jcsg/_latestVersion)
[![Build Status](https://travis-ci.org/miho/JCSG.png?branch=master)](https://travis-ci.org/miho/JCSG)
[![Javadocs](https://www.javadoc.io/badge/eu.mihosoft.vrl.jcsg/jcsg.svg)](https://www.javadoc.io/doc/eu.mihosoft.vrl.jcsg/jcsg)
<a href="https://foojay.io/today/works-with-openjdk">
<img align="right"
src="https://github.com/foojayio/badges/raw/main/works_with_openjdk/Works-with-OpenJDK.png"
width="100">
</a>

<br>


Java implementation of BSP based CSG (Constructive Solid Geometry). It is the only simple and free Java implementation I am aware of. This implementation uses an optimized CSG algorithm based on [csg.js](https://github.com/evanw/csg.js) (see `CSG` and `Node` classes). Thanks to the author for creating the [csg.js](https://github.com/evanw/csg.js) library.

There's also the related [VCSG](https://github.com/miho/VCSG) library, a [plugin for VRL-Studio](https://github.com/VRL-Studio/VRL-JCSG) and two extension libraries: [JCSG-MeshExtension](https://github.com/miho/JCSG-MeshExtensions) and [JCSG-PathExtension](https://github.com/miho/JCSG-PathExtensions).

In addition to CSG this library provides the following features:

- optimized `difference()` and `union()` operations (many thanks to Sebastian Reiter)
Expand All @@ -28,7 +39,7 @@ To see what's possible with JCSG try [JFXScad](https://github.com/miho/JFXScad).

### Requirements

- Java >= 1.8
- Java >= 11
- Internet connection (dependencies are downloaded automatically)
- IDE: [Gradle](http://www.gradle.org/) Plugin (not necessary for command line usage)

Expand All @@ -43,7 +54,7 @@ Navigate to the [Gradle](http://www.gradle.org/) project (e.g., `path/to/JCSG`)

#### Bash (Linux/OS X/Cygwin/other Unix-like shell)

sh gradlew assemble
bash gradlew assemble

#### Windows (CMD)

Expand Down Expand Up @@ -80,3 +91,9 @@ try {
Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
}
```

## Thanks to

- [JetBrains](https://www.jetbrains.com) for their [IntelliJ IDEA](https://www.jetbrains.com/idea/) license(s)

- Evan Wallace for creating the JavaScript library [csg.js](https://github.com/evanw/csg.js)
34 changes: 23 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@ plugins {
id 'application'
id 'java'
id 'maven-publish'
id 'net.nemerosa.versioning' version '1.5.0'
id 'com.jfrog.bintray' version '1.6'
id 'org.openjfx.javafxplugin' version '0.0.7'
//id 'net.nemerosa.versioning' version '2.8.2'
id 'com.jfrog.bintray' version '1.8.4'
}

sourceCompatibility = '1.8'
sourceCompatibility = '11'
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'

//apply from: 'http://gradle-plugins.mihosoft.eu/latest/vlicenseheader.gradle'
//repairHeaders.licenseHeaderText = new File(projectDir,'./license-template.txt')

task wrapper(type: Wrapper, description: 'Creates and deploys the Gradle wrapper to the current directory.') {
gradleVersion = '3.3'
wrapper {
gradleVersion = '6.4'
}

if (!hasProperty('mainClass')) {
Expand All @@ -26,6 +27,8 @@ mainClassName = mainClass
repositories {
mavenCentral()
jcenter()

mavenLocal()
}

// javadoc is way too strict for my taste.
Expand Down Expand Up @@ -60,10 +63,10 @@ dependencies {

testCompile group: 'junit', name: 'junit', version: '4.+'

compile group: 'eu.mihosoft.ext.org.fxyz', name: 'extfxyz', version: '0.4'
compile group: 'eu.mihosoft.ext.org.fxyz', name: 'extfxyz', version: '0.4', classifier: 'sources'
compile group: 'eu.mihosoft.vvecmath', name: 'vvecmath', version: '0.3.2'
compile group: 'eu.mihosoft.vvecmath', name: 'vvecmath', version: '0.3.2', classifier: 'sources'
// compile group: 'eu.mihosoft.ext.org.fxyz', name: 'extfxyz', version: '0.4'
//compile group: 'eu.mihosoft.ext.org.fxyz', name: 'extfxyz', version: '0.4', classifier: 'sources'
compile group: 'eu.mihosoft.vvecmath', name: 'vvecmath', version: '0.3.8'
compile group: 'eu.mihosoft.vvecmath', name: 'vvecmath', version: '0.3.8', classifier: 'sources'
compile 'org.slf4j:slf4j-simple:1.6.1'
}

Expand Down Expand Up @@ -94,15 +97,24 @@ jar {
'Created-By': System.properties['java.version'] + " (" + System.properties['java.vendor'] + " " + System.properties['java.vm.version'] + ")",
'Build-Date': project.buildDate,
'Build-Time': project.buildTime,
'Build-Revision': versioning.info.commit,
//'Build-Revision': versioning.info.commit,
'Specification-Title': project.name,
'Specification-Version': project.version,
'Implementation-Title': project.name,
'Implementation-Version': project.version
'Implementation-Version': project.version,
'Automatic-Module-Name': "eu.mihosoft.jcsg"
)
}
}

javafx {
modules = [ 'javafx.graphics', 'javafx.fxml']
}

test {
maxHeapSize = '2G'
}


def pomConfig = {
name 'jcsg'
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
group = eu.mihosoft.vrl.jcsg
version = 0.5.2
version = 0.5.8-SNAPSHOT
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Fri Feb 03 21:44:21 CET 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-bin.zip
41 changes: 30 additions & 11 deletions gradlew
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
#!/usr/bin/env bash
#!/usr/bin/env sh

#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

##############################################################################
##
Expand Down Expand Up @@ -28,16 +44,16 @@ APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"

warn ( ) {
warn () {
echo "$*"
}

die ( ) {
die () {
echo
echo "$*"
echo
Expand Down Expand Up @@ -154,16 +170,19 @@ if $cygwin ; then
esac
fi

# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
APP_ARGS=$(save "$@")

# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"

# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [[ "$(uname)" == "Darwin" ]] && [[ "$HOME" == "$PWD" ]]; then
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi

exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
exec "$JAVACMD" "$@"
Loading