Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
180 commits
Select commit Hold shift + click to select a range
d2ef593
implement FaceProperty
Mar 29, 2022
955b285
Add FaceList type
Mar 11, 2022
062d558
Implement FaceListProperty
Mar 11, 2022
e94742b
add FaceListPropertyWidget skeleton
Mar 11, 2022
54e1586
StyleTag has face list property
Mar 11, 2022
8c48b95
minor style fixes
Mar 11, 2022
8a69d7c
Throw instead of assert-fail in a rare condition
Mar 11, 2022
d54edb1
More consistent property widgets code style
Mar 11, 2022
930b414
Move joint-point aware PathPoint-equality to PathPoint class
Mar 12, 2022
bf795be
Delay conversion of faces to QPainterPath
Mar 12, 2022
e2ea135
simplify FaceListWidget
Mar 13, 2022
0621b50
Face selection mode
Mar 13, 2022
8dbe5d0
remove no longer required code
Mar 13, 2022
319bd04
hover faces
Mar 14, 2022
c53cce5
Merge branch 'implement-faces-property' into implement-facelist-property
Apr 1, 2022
30da911
fix Face list type label confusion
Apr 2, 2022
1ae4ef6
don't overwrite old scene file if serialization fails (only JSON)
Apr 2, 2022
54cd3aa
guard ::contains function with requires-expression
Apr 3, 2022
a501209
fix PathPoint::is_dangling implementation
Apr 3, 2022
6e7a664
add compile option DRAW_POINT_IDS
Apr 7, 2022
edcf5cf
rename PathVector::outline to to_painter_path
Apr 7, 2022
133e298
add Path::to_painter_path method
Apr 7, 2022
9cc12cb
add PathVector::draw_point_ids(QPainter&)
Apr 7, 2022
4a40b28
simplify testutil::Application
Apr 7, 2022
fb15a8c
Graph::faces returns a set instead of a vector
Apr 7, 2022
d5b4234
fix missing const
Apr 7, 2022
96bbb27
provide another (failing) face detection test case
Apr 7, 2022
41487f7
fix Face::contains
Apr 7, 2022
1b33f3b
improve face selection
Apr 7, 2022
789fe54
remove ambiguous Face operator== and operator<
Apr 8, 2022
c4752f2
edges have identity, lose a lot of functionality
Apr 11, 2022
f7d1293
introduce Path{,Vector}Geometry classes
Apr 12, 2022
6a17b69
restore basic PathTool functionality
Apr 18, 2022
76d7f70
basic path tool (without commands)
Apr 21, 2022
1fb292d
Merge branch 'main' into edge-identity
May 13, 2022
d6b3f37
basic path tool works (no branching)
May 22, 2022
f9249a8
branch paths with path tool
May 27, 2022
8f53b30
minor refactoring
May 28, 2022
4a8f963
fix most path.replace cases
Jun 5, 2022
2a6da1f
implement PathAddPointsCommandUndoRedoStackMock
Jun 9, 2022
89901e9
add convenience method for debugging
Jun 9, 2022
bd73dab
fix remove points edge cases
Jun 11, 2022
e69fc8a
refactor tests and add tests
Jun 12, 2022
5537f80
fix add points to path cases
Jun 13, 2022
35395ed
fix PathTool
Jun 14, 2022
d48748b
simplify Scene::contains implementation
Jun 15, 2022
5d050a7
handle add points after removing points with undo.
Jun 15, 2022
df6e5bd
remove obsolete code
Jun 15, 2022
c928f34
control+click closes paths
Jun 15, 2022
9bf8aef
{Add,Remove}PointsCommand takes only one {PathView,OwnedLocatedPath}
Jun 16, 2022
a96df8b
remove obsolete code
Jun 16, 2022
f09fdeb
(de)serializable paths
Jun 16, 2022
fbd9ef5
fix style issues
Jun 24, 2022
453f575
remove PointDialog
Jun 28, 2022
242a1a4
point can have n tangents (two per path)
Jul 3, 2022
9af1bd6
introduce oriented position
Jul 7, 2022
f870eed
remove no longer required file
Jul 17, 2022
7d4f523
replace Path{Vector,}Geometry with Path{,Vector}
Jul 17, 2022
8f09e49
remove Path{,Vector}Geometry-based ctors
Jul 17, 2022
9cf398d
FIx PathVector copy ctor
Jul 17, 2022
b2f244a
remove class PathVectorGeometry
Jul 17, 2022
8a40763
remove no longer required prints
Jul 17, 2022
e08c666
fix PathObject/PathVector reference
Jul 17, 2022
9a82f33
tighter condition for Path::is_valid
Jul 17, 2022
3e39d56
PathVector copy-ctor can deal with empty paths
Jul 17, 2022
d49bf06
implement Ellipse and RectangleObject geometry
Jul 17, 2022
bae6bcf
implement convert action
Jul 17, 2022
90417bd
fix path tool bug and inconvenient behaviour
Jul 18, 2022
9fced4a
fix mirror object
Jul 24, 2022
1fb7a2e
remove PathGeometry class
Aug 6, 2022
f1a7b33
implement Face's rule of 5
Aug 7, 2022
bf650c3
add tests for face detector
Aug 20, 2022
13d998b
Delete PathVector move ctor/assignment
Aug 21, 2022
1bd1f22
improve name PathVector::adopt -> PathVector::copy_from
Aug 21, 2022
92e20fa
drop boost::graph for own face detection algorithm
Aug 27, 2022
df95878
fix face normalization
Aug 27, 2022
f5f404f
fix face detector
Aug 28, 2022
cfa4d4e
more fine-grained control over debug labels
Aug 29, 2022
9228e5d
PathVector::edges returns vector instead of set
Aug 29, 2022
9df7754
remove useless Edge::operator<
Sep 18, 2022
9a23413
fix PathVectorView normalization
Sep 18, 2022
8fcb25c
Add a test to check if normalization works
Sep 18, 2022
7c7ba59
silence warning about pointer type
Sep 18, 2022
14e6af1
add tests with arms
Sep 18, 2022
ba4853a
more ellipse test cases
Sep 18, 2022
eb8562e
replace FaceTest with GraphTest
Sep 18, 2022
43d089f
refactor FaceDetector into a class
Sep 18, 2022
467400b
add grid tests
Sep 18, 2022
02d4178
unify Edge::Direction and Point::Direction
Oct 2, 2022
1a330f6
implement PathVector::bounding_box and Point::bounding_box
Oct 2, 2022
e4153dc
PathVector::to_svg
Oct 2, 2022
c94ffa6
fix ellipse test generator
Oct 2, 2022
f132ec3
fix add_arm test generator
Oct 2, 2022
69e0782
add add_loop test generator
Oct 2, 2022
311094b
consider special case for PathVectorView::is_valid
Oct 2, 2022
bc365c1
simplify facedetector
Oct 2, 2022
8dc0d06
refactor graphtest
Oct 2, 2022
bc5346e
implement PathVectorView::bounding_box
Oct 3, 2022
477094d
PathVectorView stores DEdge instead of Edge*
Oct 3, 2022
8ecd744
update clang-format
Oct 3, 2022
6d4e592
expect loop
Oct 3, 2022
6aa712c
fix path vector view normalization (considering DEdges)
Oct 3, 2022
36f335f
add leaf test generator
Oct 3, 2022
075fff5
add method to check if point is within polygon
Oct 4, 2022
a743cf6
Implement a Line with useful intersection and projection members
Oct 9, 2022
a424e6f
fix polygon_contains
Oct 9, 2022
d4e6401
fix face detector for simple graphs
Oct 9, 2022
9dc94a2
face detector works on dead ends
Oct 10, 2022
4fd5b07
simplifications in graph
Oct 15, 2022
73940de
move graph code into separate file
Oct 15, 2022
4d5ce14
friendly names for parameterized tests
Oct 15, 2022
46f4bb4
don't print the graph into an svg by default
Oct 15, 2022
57ad553
remove boost dependency
Oct 21, 2022
8cf6fe0
fix normalization test
Oct 15, 2022
21d15cf
face detector works on multi-component-graphs
Oct 15, 2022
0667c65
fix edge angle algorithm
Oct 15, 2022
866908a
refactor face detector
Oct 15, 2022
5866890
fix degree for single-edge-loop edge case
Oct 15, 2022
28492e7
add another test case
Oct 15, 2022
26ff43d
refactor PathObject
Oct 16, 2022
bee3ffd
use Face Detector
Oct 16, 2022
9e2c831
use test name for debug svg file
Oct 16, 2022
3030f82
add a special test case
Oct 16, 2022
7ef97a7
improve debug prints
Oct 16, 2022
27a7e2e
allow non-planar graphs
Oct 16, 2022
30670a1
fix face filling
Oct 17, 2022
dc535e7
generalize test cases
Oct 17, 2022
80ae5d1
more useful face test messages
Oct 21, 2022
dc78357
use Face area to detect outer Face
Oct 21, 2022
c9ec658
minor PathVectorView::to_string improvement
Oct 21, 2022
adbcf28
remove unused code test/unit/common.cpp
Oct 21, 2022
3aa8893
add another test case
Oct 21, 2022
4255c02
Extract PathVectorHeap
Oct 21, 2022
622a4a3
extract EllipseMaker
Oct 21, 2022
efa9273
fix area computation
Oct 23, 2022
d06e10a
add face area test
Oct 23, 2022
a9e9b08
Elide edges in to_string to speed up the tests
Oct 23, 2022
a57b1e8
enable all tests
Oct 23, 2022
d3e3977
fix PointGeometry bounding box
Oct 29, 2022
1417b47
add blossom test case
Oct 29, 2022
99b4d3f
fwd-declare Edge in dedge.h
Oct 30, 2022
5aa97e8
add operator*,+,-,/ to PolarCoordinates
Oct 30, 2022
ad3fad3
add a DEdgeConst for DEdge with const Edge*
Oct 30, 2022
94ff3f8
fix DEdge angle computation for single-edge-loops
Oct 30, 2022
4069e16
drop PathVectorView::is_valid
Oct 30, 2022
f8f0eb9
Graph: store out edges separatly
Oct 30, 2022
c236395
Don't require correct FaceDetector for non-planar graphs
Oct 30, 2022
e5086da
add nodiscard
Oct 30, 2022
6163b8d
fix facedetector (almost)
Oct 30, 2022
87978fa
leaner edge to_string
Nov 1, 2022
a7cbeea
extract CCWComparator into separate files
Nov 1, 2022
52dc80d
new CCWComparator test
Nov 1, 2022
bb2733f
fix and simplify CCWComparator
Nov 20, 2022
66bdbf4
blossoms have only one connected component
Nov 20, 2022
2b13493
scale SVG output to make it better accessible by inkscape
Nov 20, 2022
76e9488
fix special-test-3
Nov 20, 2022
2e01e36
PathPoint holds a *const* pointer to PathVector now
Dec 18, 2022
6767983
Path in Edge is const
Dec 18, 2022
2302dce
remove no longer required code
Dec 18, 2022
6034566
move classes in separate files
Dec 18, 2022
8b1bdd5
avoid false positive unused header (config.h) warning
Dec 18, 2022
cc266d4
remove some unused includes
Dec 18, 2022
0c7311d
fix misplaced const
Dec 18, 2022
a42e8f8
fix PathVector to Geom
Dec 18, 2022
7eda573
remove obsolte debug prints
Dec 18, 2022
d36f64c
add new compile option PATH_DRAW_DIRECTION
Dec 18, 2022
feaad52
fix pathtest
Dec 18, 2022
01185c6
slighlty improve PathObject signature
Jan 7, 2023
dd348ee
implement operator== for PathVector
Jan 7, 2023
2cd0e27
minor maintenance
Jan 7, 2023
74624ad
fix pathtest again
Jan 7, 2023
73427ac
Draw Path and Edge Ids
Jan 8, 2023
69c8dd4
clearer Point::to_string
Jan 8, 2023
70f4240
implement cut command (doesn't work yet for multiple cuts at once)
Jan 8, 2023
c0cb97e
implement cut command properly
Jan 9, 2023
0617c37
add knife test
Jan 9, 2023
238dc94
restore subdivide path command
Jan 9, 2023
d1aa0ed
fix Object::join (which is currently not used)
Jan 9, 2023
f32e7c7
drop Normal mode in SelectSimilarTool
Jan 9, 2023
4509a77
style compliance
Jan 9, 2023
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
175 changes: 92 additions & 83 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,148 +1,157 @@
---
Language: Cpp
# BasedOnStyle: LLVM
Language: Cpp
AccessModifierOffset: -2
AlignAfterOpenBracket: Align
#AlignArrayOfStructures: None
AlignConsecutiveMacros: false
AlignConsecutiveAssignments: false
# AlignConsecutiveBitFields: false # not available in clang-format 10
#AlignConsecutiveBitFields: None
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: DontAlign
AlignOperands: true
AlignOperands: Align
AlignTrailingComments: false
AllowAllArgumentsOnNextLine: false
AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: false
# AllowShortEnumsOnASingleLine: true # not available in clang-format 10 on ubuntu.
AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortEnumsOnASingleLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortLambdasOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
# AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: MultiLine
BinPackArguments: false
BinPackParameters: false
AlwaysBreakTemplateDeclarations: No
#AttributeMacros:
# - __capability
BinPackArguments: true
BinPackParameters: true
#BreakBeforeBinaryOperators: NonAssignment
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: false
AfterClass: true
AfterCaseLabel: false
AfterClass: true
AfterControlStatement: MultiLine
AfterEnum: false
AfterFunction: true
AfterNamespace: true
# AfterObjCDeclaration: false
AfterStruct: true
AfterUnion: true
AfterEnum: false
AfterFunction: true
AfterNamespace: true
AfterStruct: true
AfterUnion: true
AfterExternBlock: true
BeforeCatch: false
BeforeElse: false
# BeforeLambdaBody: false # not available in clang-format 10
# BeforeWhile: false # not available in clang-format 10
IndentBraces: false
BeforeCatch: false
BeforeElse: false
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: All
BreakBeforeBraces: Linux
# BreakBeforeInheritanceComma: false
BreakBeforeBinaryOperators: NonAssignment
#BreakBeforeConceptDeclarations: true
BreakBeforeBraces: Custom
BreakBeforeInheritanceComma: false
BreakInheritanceList: BeforeComma
BreakBeforeTernaryOperators: true
# BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeColon
# BreakAfterJavaFieldAnnotations: false
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeComma
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 100
CommentPragmas: '^ IWYU pragma:'
ColumnLimit: 120
CommentPragmas: '^ IWYU pragma:'
#QualifierAlignment: Leave
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ConstructorInitializerIndentWidth: 2
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DeriveLineEnding: true
DerivePointerAlignment: false
DisableFormat: false
# ExperimentalAutoDetectBinPacking: false
DisableFormat: false
#EmptyLineAfterAccessModifier: Never
#EmptyLineBeforeAccessModifier: LogicalBlock
ExperimentalAutoDetectBinPacking: false
#PackConstructorInitializers: NextLine
BasedOnStyle: ''
ConstructorInitializerAllOnOneLineOrOnePerLine: true
AllowAllConstructorInitializersOnNextLine: true
FixNamespaceComments: true
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
SortPriority: 0
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
SortPriority: 0
- Regex: '.*'
Priority: 1
SortPriority: 0
ForEachMacros: []
#IfMacros: []
IncludeBlocks: Preserve
IncludeCategories: []
IncludeIsMainRegex: '(Test)?$'
IncludeIsMainSourceRegex: ''
#IndentAccessModifiers: false
IndentCaseLabels: false
# IndentCaseBlocks: false # not available in clang-format 10
IndentGotoLabels: false
IndentCaseBlocks: false
IndentGotoLabels: true
IndentPPDirectives: AfterHash
# IndentExternBlock: AfterExternBlock # not available in clang-format 10
IndentWidth: 2
IndentExternBlock: AfterExternBlock
#IndentRequires: false
IndentWidth: 2
IndentWrappedFunctionNames: false
# InsertTrailingCommas: Wrapped # not available in clang-format 10
# JavaScriptQuotes: Leave
# JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
InsertTrailingCommas: None
KeepEmptyLinesAtTheStartOfBlocks: true
#LambdaBodyIndentation: Signature
MacroBlockBegin: ''
MacroBlockEnd: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
# ObjCBinPackProtocolList: Auto
# ObjCBlockIndentWidth: 2
# ObjCBreakBeforeNestedBlockParam: true
# ObjCSpaceAfterProperty: false
# ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 2
#PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
#PenaltyBreakOpenParenthesis: 0
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
#PenaltyIndentedWhitespace: 0
PointerAlignment: Left
ReflowComments: true
SortIncludes: true
#PPIndentWidth: -1
#ReferenceAlignment: Left
ReflowComments: false
#RemoveBracesLLVM: false
#SeparateDefinitionBlocks: Leave
#ShortNamespaceLines: 1
#SortIncludes: CaseSensitive
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterCStyleCast: true
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
#SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
#SpaceBeforeParensOptions:
#AfterControlStatements: true
#AfterForeachMacros: true
#AfterFunctionDefinitionName: false
#AfterFunctionDeclarationName: false
#AfterIfMacros: true
#AfterOverloadedOperator: false
#BeforeNonEmptyParentheses: false
#SpaceAroundPointerQualifiers: Default
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2
SpacesInAngles: false
#SpacesInAngles: Never
SpacesInConditionalStatement: false
SpacesInContainerLiterals: false
SpacesInCStyleCastParentheses: false
#SpacesInLineCommentPrefix:
# Minimum: 1
# Maximum: -1
SpacesInParentheses: false
SpacesInSquareBrackets: false
SpaceBeforeSquareBrackets: false
Standard: Latest
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
TabWidth: 2
UseCRLF: false
UseTab: Never
# WhitespaceSensitiveMacros: # not available in clang-format 10 on ubuntu
# - STRINGIZE # not available in clang-format 10 on ubuntu
# - PP_STRINGIZE # not available in clang-format 10 on ubuntu
# - BOOST_PP_STRINGIZE # not available in clang-format 10 on ubuntu
#BitFieldColonSpacing: Both
Standard: Latest
TabWidth: 8
UseCRLF: false
UseTab: Never
WhitespaceSensitiveMacros: []
...

4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ option(USE_QT_5_12 "Allow to use Qt 5.12. Set this option to true for static ana
Builds with this configuration are not supposed to be run."
OFF
)
option(DRAW_POINT_IDS "Draw the id of path points next to the point." OFF)
option(PATH_DRAW_DIRECTION "Draws little arrows to indicate begin, end and direction of path segments." OFF)
option(WERROR "Error on compiler warnings. Not available for MSVC." ON)

if (USE_QT_5_12)
Expand All @@ -28,7 +30,6 @@ find_package(PkgConfig)
find_package(Python3 3.6 REQUIRED COMPONENTS Interpreter Development)
find_package(2Geom REQUIRED)
find_package(fmt 8.0.0 REQUIRED)
find_package(Boost 1.65 REQUIRED COMPONENTS graph)

set(python_major_minor "python${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}")
set(python_major "python${Python3_VERSION_MAJOR}")
Expand Down Expand Up @@ -98,7 +99,6 @@ target_link_libraries(libommpfritt poppler-qt5)
target_link_libraries(libommpfritt -lpthread -lm)
target_link_libraries(libommpfritt 2Geom::2geom)
target_link_libraries(libommpfritt fmt::fmt)
target_link_libraries(libommpfritt Boost::graph)
target_link_libraries(ommpfritt libommpfritt)

if (WIN32)
Expand Down
Loading