Gilles,

Sounds good. I've created GEOMETRY-95 to track this. I'm picturing adding new 
example code and a separate page to the userguide, with pictures. I'll have 
more questions for you once I get to the implementation. I also added the tag 
"beta1" to all of the JIRA issues I'd like complete for the 1.0-beta1 release 
(there are currently 5).

-Matt
________________________________
From: Gilles Sadowski <gillese...@gmail.com>
Sent: Sunday, April 19, 2020 11:22 AM
To: Commons Developers List <dev@commons.apache.org>
Subject: Re: [Geometry] CSG?

Hello.

Le sam. 18 avr. 2020 à 05:01, Matt Juntunen
<matt.juntu...@hotmail.com> a écrit :
>
> Hi Gilles,
>
> I like that idea. I'm picturing that as something that could happen after the 
> first beta release. Here is my current roadmap (of sorts):
>
>
>   1.  Wrap up a few issues (GEOMETRY-92, 93, and 94)
>   2.  Release 1.0-beta1
>   3.  Add model-specific example code as you have started with the 
> examples-io module. This would include fleshing out a Mesh class and adding 
> readers and writers for various formats. (I specifically want to add support 
> for obj and stl files since I use those in my day job.) There is a lot of 
> cool stuff we could do here.
>   4.  Work on performance improvements, with a focus on the BSP tree classes.
>   5.  Implement bug fixes and other improvements from 1.0-beta1.
>   6.  Update/rewrite the userguide as you have mentioned.
>   7.  Release 1.0-beta2 (or 1.0 if the API seems solid at that point).
>
> Thoughts?

I'd move point 6 up in the priority list, as it could bring more people
onboard to help with testing actual use-cases (for which BSP might
perhaps be a black box).

> (Also, the paper you referenced looks very interesting. I'll try to take a 
> look. We currently have CSG functionality implemented using BSP trees

This is indeed mentioned in the userguide:
---CUT---
[...] performing boolean operations on polytopes  (union,
intersection, difference, xor, complement) [...]
---CUT---
But then it looks like there is a gap between "BSP can be used to do it"
and how to "just use it" to create, move and transform shapes.

A particular "test" which I would like to try is:
* create a sphere,[1]
* access its mesh ("Triangle3D" ?),
* apply a transform (possibly non-affine) to the set of vertices,
* recreate a BSP tree representation of the resulting mesh (?),
* do the above for a second shape,
* compute the set of visible elements from some vantage point.

Does this make sense?

Best,
Gilles

[1] A primitive to build an icosphere would be a feature request:
https://blender.stackexchange.com/questions/72/what-is-the-difference-between-a-uv-sphere-and-an-icosphere
And perhaps the BSP code is amenable to easy generation of
any of the shapes described there:
https://en.wikipedia.org/wiki/Geodesic_polyhedron

> but I'm interested to see what they have to say. The primary reference for 
> our implementation, and the original commons-math one, is 
> http://www.cs.yorku.ca/~amana/research/bsptSetOp.pdf.)
>
> -Matt
> ________________________________
> From: Gilles Sadowski <gillese...@gmail.com>
> Sent: Friday, April 17, 2020 10:46 AM
> To: Commons Developers List <dev@commons.apache.org>
> Subject: [Geometry] CSG?
>
> Hello.
>
> I guess that the [Geometry] code is readily usable as described
> in e.g. this paper:
>     
> https://www.semanticscholar.org/paper/Constructive-Solid-Geometry-Using-BSP-Tree-Segura-Stine/eeb5014f86750c54a87f214b03246799e970d114
>
> If so, it would help BSP newbies (like me) if the userguide followed
> the approach where "Constructive Solid Geometry" examples are
> used to gradually introduce the more abstract concepts.  [Whereas
> currently, the userguide rather follows the code layout (more or less
> being a summary of the auto-generated API docs) from which it is
> not obvious where one should start to get something useful done.]
>
> To illustrate the concepts, the userguide should probably include
> pictures, and indicate how one could actually see one's work, i.e.
> how to go from BSP to standard file formats, for visualization.[1]
>
> IOW, it seems to me[2] that the userguide should start with
> 1. how to define "primitive" shapes,
> 2. how to combine them (CSG),
> 3. how to transform them,
> 4. how to load/save them, and how those "models" might be
> different from those created programmatically (e.g. "mesh"
> vs "BSP tree").
>
> WDYT?
>
> Best,
> Gilles
>
> [1] Commit
>     
> https://gitbox.apache.org/repos/asf?p=commons-geometry.git;a=commit;h=bf3db751335d75d76f49b4c3c55865d0f4f95f23
> was a step in that direction.
> [2] Maybe because that's what I'm looking for. ;-)
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to