- use
AbstractGeometry{1}
for this! - concrete subtypes include segments, circular arcs, splines, loop closing
- allow moves to be relative as well as absolute
- circular arc: defined either by angle+center+radius, sagitta+endpoints...
- meshing methods produce polylines
- concrete type for polyline
- operators 1d ↔ 2d: border, interior
path_extrude(surface, profile) => path_extrude(∂surface)
path(element1, element2, ...)
- in GLMakie, (non-convex) polygons are incorrectly triangulated
-
path_extrude
of shape with holes: hole extrusions are reversed - instead of trying funny stuff with symdiff, we could just concatenate everything and do a self-union to regularize
-
matrix*set_parameters
etc.;raise(.8)*mat*cone(3)*lozenge
... -
raise
in 2d - volume - volume - volume
- implement n-ary
setdiff
- hull of 2d points: hull([1,1], ...)
- linear extrude of repositioned 2d mesh: use normal (this would also fix Minkowski)
-
polygon([[0,0], bezier(...)...])
: element type - simplify crossing polygon
- rotation with axis
- highlighed sphere difference
-
minkowski(volume, polygon)
seems broken -
rotate_extrude()
with slide and polygon touching y-axis -
linear_extrude(scale=0)
is a cone: merge points on top - fix problem of triangulating tangent polygons: separately triangulate each connected component
- clarify priority:
linear_extrude(8)*(5*object)
- projection of hollow sphere does not work: replace the temporary fix by something better (but this is likely Clipper's fault)
- simple syntax for making conditionals (⇒ use those empty objects)
- make default
children
return an error and addAbstractGeometryLeaf
-
atol
/rtol
? - auto-compute
offset
npoints from meshing options - likewise for
sweep
(volume case) - check whether
translate(highlight()*s)
works- it should be enough to check that all transformations apply to highlights
- make a nice logo (threaded bolt? some variant of Julia logo?)
- bring back some
Angle
types (with degrees) to allow overloading ofextrude
, e.g.extrude(90°)
; likewise, usecospi
andsinpi
-
using Unitful: °
is probably (almost) enough
-
- add a
symmetry
parameter for circles- (and spheres?)
- a move system (= a representation of abstract affine rotations)
- allow
NamedTuple
for this - possible via
move(origin, s...; direction, spin)
- remove
DataStructures
dependency -
import
: stl, amf, ply, dxf (-> load)- stl and ply would follow from integrating
Meshes.jl
For MeshIO: stl needs decompose(Point3f0, mesh) decompose(GLTriangleFace, mesh) decompose_normals(mesh) - this still needs to somehow merge points in stl (e.g. self-union) ?
- stl and ply would follow from integrating
- replace
include
by something usingFileIO
e.g..cg.jl
? - https://www.usenix.org/legacy/event/usenix05/tech/freenix/full_papers/kirsch/kirsch.pdf : CSG tree normalization (only useful when using
convexity
rendering...) - split
Offset
in two structuresOffsetShape
andOffsetVolume
- make transformations even lazier, so that they are evaluated only once their subjects (and more importantly, their dimension) are known
- check if operator associativity is still needed
- overload
extrude()
(for paths, angles, numbers) - move doc examples to
WGLMakie
- remove
ConvexHull.jl
dependency (use method fromigl
instead?) -
linear_extrude
/prism
? -
rotate_extrude
/revolution
? - replace ad-hoc
plot
methods by correctMakie
interface - make meshing type-stable
- update
iglwrap
and use latest version-
loop
-
minkowski_sum
(might need tetrahedralize) -
upsample
(only useful once we have deformations) -
swept_volume
-
centroid
-
convex_hull
-
offset_surface
-
intersect_with_half_space
-
-
cylinder(..., center)
-
cylinder(h, r1, r2)
- add a parameter to circles, spheres and cylinders to mesh them as circumscribed
- document how to extend (e.g. new object type)
-
multiply
: dispose copies of a mesh (better thanunion
because we compute the child mesh only once) - replace
attributes
by a pointer to the original colored object; this could allow detecting edges etc. -
refine
: shorten all edges until no longer than given length - 2d (just divide edges)
- 3d (split triangles)
- path type: e.g. take a rectangular path, round corners, then create the shape defined by 1-directional offset
- ellipse
- geometry operations:
- point in shape,
- random sample of shape,
- area/volume of shape
- add some relational definitions: mutual tangent, intersection, etc.
- path sweep: use straight skeleton/medial axis for disappearing vertices
- compute medial axis
- compute straight skeleton
- volume \ surface := volume \ extrude(surface)
- propagate
atol
andrtol
through transformation matrices (use largest eigenvalue) - equivalent of OpenSCAD's for loop?!
-
linear_extrude
with twist and scale -
rotate_extrude
with slide (per-turn) along the axis - compute center of gravity (and use it for scaling etc.)
- 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;
- define a path type (for Minkowski + stroke) ?
- probably useful for 3d paths at least
-
TriangleMeshes
: have a way to detect non-pwm meshes and explain why- fix meshes on stl import: a bit harder, IGL does not have a function for this
- also in 2d, regularize polygons (e.g. one backwards loop)
- triangulate faces of
Surface
- allow self-union (for fixing meshes)
- Minkowski sum in mixed dimensions
- half-plane intersection
- swept surfaces (
path_extrude
) - allow planar sweep too?
- volume sweep (use
swept_volume
) ? - fix Clipper's missing sweep? (e.g. adding a few extra points far away (preserving tangents) and removing anything close to those points) [ ] or write a patch for the C++ library?
- find a way to fix path extrusion? either
- write something from scratch...
- cut “by hand” the result of a “butt” extrusion;
- intersect the result of a custom “fill” extrusion;
- patch the
clipper
library...
- lofting/skinning
- allow complement (for intersection)
- half-space intersection
- plane intersection:
slice
- projection
- path wrapping
- wrapped volumes
-
text
- OpenSCAD:
src/FreetypeRenderer.cc
,::render
function - use
Pango
for text andFreeType
for fonts
- OpenSCAD:
- Bézier curves (used as path for
path_extrude
,stroke
,polygon
) -
symmetrize(m, s...) = union(s..., mirror(m, s...))
find some easy syntax allowing alsosymmetrize(m)*s
- 2d Minkowski difference
-
surface(volume)
= instantiate as a mesh (avoids recomputation) -
plot(...; zoom=...)
- anchor/attachment system attach(square(1), :left => circle(3), ) anchor(square(…), [-1,0]) anchor(square(…), :left) square(…, anchor=:left)
- this needs allowing “children” for the primitives, e.g. square(5)*[ position(:top) circle(5), ]
- 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
- check
@code_warntype
everywhere for a start - still slow; see if we can resurrect
CornerTables
(usingClipper
for the hard 2d part). - make objects mutable to store computed mesh
[1,0,0] + annotate("blah", (.5,.5,5))* sphere(3);
Annotation("blah",(1.5,.5,.5), mesh(sphere(3)))
- hook them in existing highlight procedure
- add a LineNode reference to constructors (i.e. first thing in call stack outside module).
-
color
: add more properties (e.g. shininess) to be able to show e.g. metal parts - find some way of referencing parts of objects,
e.g.
cylinder().edge(:top)
references the top edge, and have it accessible through CSG hierarchy (thus, maybe later providing a way to e.g. fillet it?) - get a better syntax for transforms, e.g.
symmetrize = transform(axis,s->s ∪ mirror(axis,s))
?? - add examples (with images) in documentation
- more sophisticated/real examples
- overload
color*object
forcolor::Colorant
- find a way to access
.x
,.y
and.z
forPoint
andVec
types [ ] probably requires makingVec
a separate type fromSArray
(to avoid piracy) - think of using
LabelledArrays.jl
(SLArray
) as an alternative toStaticVector
forVec
types - do something for keyword argument dispatch; e.g. the following should be equivalent: circle(r=1) circle(d=2) circle(radius=1) circle(diameter=2) circle(1) and it should be “open” for adding new keywords, e.g. circle(1, center=[0,0]) # => translate([0,0])* circle(1) square(3, closing=1) # => calls closing(1)*square(3)
- using
:
for transforms is very tempting:
color(red):
translate([-1,1,1-]):
square(3)
-
∪
,∩
,\
: booleans -
+
translation -
⊕
Minkowski sum -
object ± real
= offset -
- ⊖
Minkowski difference -
:
convex hull ? -
×
extrusion (scalar => linear_extrude; interval => rotate_extrude; path => path_extrude) - make kwargs open for user extension (e.g. rounded squares)
- replace minkowski with circle by an offset
-
Rotations.jl
: using the same type for angles and coordinates is not terribly useful (in particular with angles in radians).
- write a full doc about how to define a new transform
- check the list of exports
- write a minimal regression test
- the doc is the test
- add some more complicated examples in the doc to expand the tests
- distinguish between core and sub-packages (implementing BOSL2 stuff)?
- [?] https://www.researchgate.net/publication/220184531_Efficient_Clipping_of_Arbitrary_Polygons/link/0912f510a5ac9191e9000000/download
- export to SVG/STL/PLY
- splines (and enclosed area)
- NURBS
- deformation https://libigl.github.io/tutorial/#chapter-4-shape-deformation
- https://student.cs.uwaterloo.ca/~cs779/Gallery/Winter2018/anietoro/doc/
- add a display method that shows the tree
- icosphere (from Blender)
- improve
unit_n_gon
to take advantage of symmetries - 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
- [?] 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