- split in several files after all (will help in
include()
time)? AbstractMesh
is not a subtype ofAbstractGeometry
and henceunion(...)
etc will not work on it. => there needs to be aSurface
type encapsulating this (i.e. deriving fromAbstractGeometry
and containing someMesh
data).
- use
BasicGeometry
- a common name for meshing objects (either
Mesh
orelements
?) => Mesh? or realize - try 2 strategies for n-ary intersection/union:
- merge all structures and compute multiplicity with ray-shooting,
- or reduce with binary op
- merge all structures and compute multiplicity with ray-shooting,
- do something smart for triangle intersections and on-the-fly retriangulation
- check using vs. import
- populate export list
- add a display method that shows the tree
- replace
triangulate_between
by an actual Triangulate call - write a few examples
- use
Dictionaries.jl
- use
Meshes.jl
- make it work with
Makie
andMeshIO
- and suggest a few upstream PR.
- test suite
- what to do for polygons with holes?
- look in
Makie
- in
BasicGeometry
: a list of polygons + list of holes - parity is probably simplest bet (easily allows both non-connected polys and holes)
PolygonXor
type
- in
- look in
- Minkowski difference of polygons
- fix
Offset
for polygon unions - choose a correct value for
Clipper
precision
- check
convex_hull
works
- clarify
Path
: maybe addpoints
iterator andmatrix
abstract conversion. Or makePath
an actual struct type and add accessors. - this needs a plane object type (which could be the image by a 2x3
multmatrix of
:full
). - think of using
LabelledArrays.jl
(SLArray
) as an alternative toStaticVector
forVec
types - add a 1d type (points, segments; paths) for minkowski (/ extrusions)?
- this makes sense;
Clipper.jl
seems happy to do Minkowski with a path
- this makes sense;
- abstract directions (
up
,left
) etc., interpreted differently depending on the dimension. - add a LineNode reference to constructors (i.e. first thing in call stack outside module).
- use an AABB tree (bounding box tree) for intersection detection
- add something for fake-3d objects (embedded in a subspace):
this would represent both
mult_matrix
with zero determinant,mult_matrix
of 2d object with 3d matrix, andproject()
(orcut()
). It would also allow, say, convex hull with a translated 2d object. - before deciding what “should” be done, write a set of examples of what it should do (for various operations, e.g. linear maps, Minkowski, hull) and then decide how to best implement this behavior
- Objects should really have two dimensions: intrinsic and embedding.
E.g. a
square(1)
has dimensions(2,2)
, while its translation by[0,0,1]
has dimensions(2,3)
and an embedding given by the corresponding matrix. - CSG operations may be performed either
- on objects of the same dimension, same embedding
hull
: use embedding to push all objects to same space if possibleminkowski
: ditto
- decide whether to use Square or square as a name
suggestion:
Square
is the raw constructor;square
is the convenience user function
- (which might return e.g. a rounded square)
- also do cylinder, sphere, cube
- add convenience constructors for rounded square, cone, …
- simple syntax for making conditionals (⇒ use those empty objects)
- or also allow
Nothing
in vectors of objects
- or also allow
- import
.stl
and.ply
- STL export
- using
:
for transforms is very tempting:
color(red):
translate([-1,1,1-]):
square(3)
- find something like OpenSCAD' # ! % operators.
(a) prefix multiplication by integer constant
(b) unary operators: + - ! √ ~ ¬
(c) ad-hoc
Transform
with one-letter name, e.g.H*square(1)
- think of replacing parameters by kwargs
∪
,∩
,\
+ ⊕
Minkowski sum; translation- ⊖
Minkowski difference:
hull ?¬
complement×
linear_extrude, rotate_extrude
*
multmatrix; scaling
- think of overloading
{...}
or[...]
(eitherhcat
orvcat
, andbraces
,bracescat
). dump(:({a b})) => :bracescat no: will not work (but could in a macro...) - really really stupid idea: n-dimensional matrix actually arranges objects in a matrix...
- make transformations even lazier, so that they are evaluated only once their subjects (and more importantly, their dimension) are known
- call Clipper to provide offset algorithm
- orientation, area, pointinpolygon
- this provides polygon intersection, difference, …
- also offset and
get_bounds
- draw(path, width) (using Clipper.offset)
- convex hull (in dim 2)
- convex hull (in dim 3)
- convex hull in mixed dimensions makes sense (also: image of 2d object in another plane?).
- : overload extrude() (for paths, angles, numbers)
- minkowski has a convexity parameter
convexity
's place is inSetParameters
- Complex * 2d object
- a move system (= a representation of abstract affine rotations)
- allow
NamedTuple
for this
- allow
- possible via
move(origin, s...; direction, spin)
- anchor/attachment system anchor(square(…), [-1,0]) anchor(square(…), :left) square(…, anchor=:left)
- make difference() a strictly binary operation?
- add a reduce() operator that multiplies all the matrices
- check that it is easy for the user to define arbitrary
Transform
s. - rewrite
attach
usingTransform
- and allow: attach(X) * [ :left => Y, :right => Z, ] # as array or tuple
- 3d Minkowski
- replace minkowski with circle by an offset
StaticArrays.jl
: SDiagonal is currently not a static matrix? julia> SDiagonal(1,2,3) isa StaticMatrix falseRotations.jl
: using the same type for angles and coordinates is not terribly useful (in particular with angles in radians).- Julia: add
cossin
tosincos
(helps with complex units).
- write a full doc about how to define a new transform
- complete the list of exports
- write a minimal regression test
- make this a proper package
- distinguish between core and sub-packages (implementing BOSL2 stuff)?
- create incidence structure on triangulated surface creation? use directed edges structure
- maybe using ~ instead of
-
for reversed faces - and use AABBtree for computing face intersections
- add some visualization (
Makie
?) - export to SVG/STL/PLY
MeshIO
- improve
unit_n_gon
to take advantage of symmetries
- investigate Fibonacci spheres
- Color
- Annotations in 2d
- Annotations in 3d (this might depend on the visualizer though)
- rewrite Annotations in terms of
Transform
- (more generally, metadata)
- add an Annotation type, which passes through all transformations
- (Obsolete): Offset using OpenSCAD
offset()
- things from BOSL2 to look at:
- transforms, distributors, mutators,
- attachments,
- primitives, shapes, shapes2d, masks
- math, vectors, arrays, quaternions, affine, coords geometry, edges, vnf, paths, regions, debug common, strings, constants, errors, bezier, threading, rounding, partitions, knurling, skin, hull, triangulation polyhedra, screws, metric_screws