Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breaking Changes ? #230

Open
j-fu opened this issue Nov 24, 2024 · 8 comments
Open

Breaking Changes ? #230

j-fu opened this issue Nov 24, 2024 · 8 comments

Comments

@j-fu
Copy link
Member

j-fu commented Nov 24, 2024

The transition from 0.4 to 0.5 indeed appears to be breaking:see e.g.
JuliaGeometry/TetGen.jl#41

So my questions are:

  • What exactly needs to be changed in existing code to allow for 0.5 ?
  • Is is possible to have code which can uses both v4 and v5 ?

Generally it would be good to have some transition guide which also might be a start for an improved documentation as discussed in #222.

@ffreyer
Copy link
Collaborator

ffreyer commented Nov 25, 2024

I added notes for this to the release https://github.com/JuliaGeometry/GeometryBasics.jl/releases/tag/v0.5.0 and the version bump pr #226

@j-fu
Copy link
Member Author

j-fu commented Nov 26, 2024

There is no mention of TetrahedronP and TriangulateP. How to replace them ?

@j-fu
Copy link
Member Author

j-fu commented Nov 26, 2024

Guess I will need some help with JuliaGeometry/TetGen.jl#42

@ffreyer
Copy link
Collaborator

ffreyer commented Nov 26, 2024

Oh right, the notes I wrote are mostly based on what I changed on top of Simons refactor. I didn't need to do much more than update some mesh types, remove meta and add expand_faceviews(mesh) in some places in Makie.

Seems like the P types are generally gone now because the Point type is now hard-coded as a GeometryBasics.Point instead of P <: GeometryBasics.AbstractPoint.

@ffreyer
Copy link
Collaborator

ffreyer commented Nov 26, 2024

Maybe it would be useful to skim MakieOrg/Makie.jl#4319, especially src/conversions.jl

@j-fu
Copy link
Member Author

j-fu commented Nov 26, 2024

How to specify facet markers in 0.5 ?
When I replace

Mesh(points, meta(facets, markers=markers))

by

Mesh(points, facets;markers=markers)

the markers are intepreted as point markers.

@ffreyer
Copy link
Collaborator

ffreyer commented Nov 26, 2024

Huh, I didn't know that existed before. There are two options: (other than handling them outside)

  1. Move them to MetaMesh as MetaMesh(Mesh(points, facets), markers = markers). GeometryBasics will not touch them at all in this case.
  2. Pass them as FaceView(markers, [typeof(f)(i) for (i, f) in enumerate(facets)]). GeometryBasics will view them as vertex data with custom vertex indices/faces/facets then, where face/facet n happens to grab marker n for each of its vertices. This will cause vertices to get duplicated and reordered by expand_faceviews() if it's ever called.

To me it looks like you're just using the mesh as a container when it comes to markers, so I'd say (1) would be the way to handle this.

@j-fu
Copy link
Member Author

j-fu commented Nov 27, 2024

Ok thanks - JuliaGeometry/TetGen.jl#42 now is in a reasonable state.
BTW I managed to have it compatible with GeometryBasics v0.4 and v0.5 (dispatching via pkgversion(GeometryBasics) in some places).

I really think that some more detailed transition guide is necessary given that 131 packages in General depend on GeometryBasics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants