Program source code and data
This repository contains program source code and data to reproduce the experiments in Sections 5.2 and 5.3 of the paper entitled "An interactive sketch-based CAD interface realizing geometrical and topological editing across multiple objects based on fuzzy logic." By executing commands with JDK 16 on Windows, macOS, or Linux, the experiments are reproduced step by step.
Contents
- Kotlin source code of the implementation of the entire proposed process, including FSC generator, FSC blending, FSC fragmentation, FSC identifier, and IFGS
src/
main/kotlin/jumpaku/curves/experiment/DefaultModules.kt
: FSC identifier
jumpaku-commons/src/
jumpaku-commons-test/src/
jumpaku-curves-core/src/
jumpaku-curves-core-test/src/
jumpaku-curves-fsc/src/
main/kotlin/jumpaku/curves/fsc/generate/Generator.kt
: FSC generatormain/kotlin/jumpaku/curves/fsc/merge/Merger.kt
: FSC blendingmain/kotlin/jumpaku/curves/fsc/fragment/Fragmenter.kt
: FSC fragmentationmain/kotlin/jumpaku/curves/fsc/experimental/snap/point/IFGS.kt
: IFGS
jumpaku-curves-fsc-test/src/
jumpaku-curves-graphics/src/
- Drawn stroke data files and parameter configuration files for the experiments
data/
- Gradle project configuration files for executing commands
build.gradle
settings.gradle
gradle/
gradle.properties
gradlew
gradlew.bat
- README file
README.md
Execution commands
In the directory where this README file is located, the following commands reproduce an experiment specified by <data name>
. On each event of clicking the "Next" button in an opened window, the experiment is reproduced step by step.
- Windows
gradlew.bat run --args="--data=<data name>"
- macOS or Linux
./gradlew run --args="--data=<data name>"
<data name>
can be set to one of the following strings:
- Fig24A
- Fig24B
- Fig24C
- Fig24D
- Fig24E
- Fig24F
- Fig24G
- Fig24H
- Fig24I
- Fig26
- Fig29
- Fig32
Examples of execution commands
- Windows
java --version
# => openjdk 16.0.2 2021-07-20
# => OpenJDK Runtime Environment (build 16.0.2+7-67)
# => OpenJDK 64-Bit Server VM (build 16.0.2+7-67, mixed mode, sharing)
gradlew.bat run --args="--data=Fig32"
- macOS
java --version
# => openjdk 16 2021-03-16
# => OpenJDK Runtime Environment (build 16+36-2231)
# => OpenJDK 64-Bit Server VM (build 16+36-2231, mixed mode, sharing)
./gradlew run --args="--data=Fig32"
- Linux
java --version
# => openjdk 16.0.1 2021-04-20
# => OpenJDK Runtime Environment (build 16.0.1+9-Ubuntu-120.04)
# => OpenJDK 64-Bit Server VM (build 16.0.1+9-Ubuntu-120.04, mixed mode, sharing)
./gradlew run --args="--data=Fig32"
Drawn stroke data file format
A drawn stroke data file for each experiment contains a JSON array each element of which has a string named action
and an object named drawingStroke
.
action
is"Edit"
or"Pick"
, where"Edit"
is for sketching and"Pick"
for tapping.drawingStroke
has an array namedparamPoints
each element of which has an object namedpoint
and a number namedparam
.point
has four numbers namedx
,y
,z
, andr
.x
is an x-coordinate in pixel.y
is a y-coordinate in pixel.z
is always0.0
.r
is always0.0
.
param
is a timestamp in second.
Parameter configuration file format
A parameter configuration file for each experiment contains a JSON object which has four numbers named width
, height
, baseGridSpacing
, and baseGridFuzziness
.
width
is a width of a viewport in pixel.height
is a height of a viewport in pixel.baseGridSpacing
is a base grid spacing in pixel, which is used by IFGS.baseGridFuzziness
is a base grid fuzziness in pixel, which is used by IFGS.