Code Monkey home page Code Monkey logo

Comments (6)

philippjfr avatar philippjfr commented on June 11, 2024

These all sound like good and, at least in theory, viable enhancements. There probably is some discussion to be had whether these would go directly onto the existing tools or whether we should add new tools. I'll just ask some questions to clarify a few things:

Take an existing Path and break it - creating two Path entities, but they are still "connected" at the split point.

What does it mean for a path to be broken but still connected? The way I would suggest implementing this is by inserting a NaN value between the two path entities, which would disconnect them visually but still keep them together in terms of the actual data structure. This would allow distinguishing between two completely disconnected paths, which would be stored entirely separately and the "connected" but visually broken up paths.

Connect existing Vertices into a Path (i.e. snap the Path drawing tool to the nearest Vertex within a tolerance).

I suspect this would require a new tool letting you drag between the start/end points between existing paths. I suspect this would require some fairly hairy JS code to perform the snapping by using Bokeh's internal spatial indexing.

Close a Path to create a polygon - possibly consisting of multiple connected Paths, snapping would be required here also.

To some extent this seems like a fairly straightforward extension of 2., solving this in a general way at the bokeh level is problematic however as we would either have to change the glyph type from bokeh's multi_line glyph to a patches glyph or simply change the fill_alpha once the paths are closed.

from earthsim.

jlstevens avatar jlstevens commented on June 11, 2024

The idea of splitting a path at a node was discussed in the meeting we had together today.

What does it mean for a path to be broken but still connected?

I believe that has been clarified. A node can indicate a split between two path without actually splitting the path in terms of how it is visualized or interacted with (though you probably want to show some visual hint that a split is present).

from earthsim.

dharhas avatar dharhas commented on June 11, 2024

This gets back to one of the original capabilities that we decided not to try for in round one. Other software indicate this by giving these nodes a different name and visualization. i.e. Feature Vertices with a larger dot. A primary use case is having arcs along a polygon that are used for refinement or assigning boundary conditions.

from earthsim.

dharhas avatar dharhas commented on June 11, 2024

Related to my description of XMS functionality in #41

from earthsim.

kcpevey avatar kcpevey commented on June 11, 2024

This is my general summary of the path forward (at least the way that I see it):

Create a distinction between vertices and nodes

  • nodes are the stop and end points on a path (a polygon has one, a line has two)
  • vertices are the intermediate points along a path that are not a start or end point
  • in other software platforms this is visualized by vertices being much smaller than nodes
  • if a node or vertex is moved, the connecting paths will also move (it will remain connected)

Add ability to convert between nodes and vertices

Add ability to define a polygon as a series of connected paths.

  • usecase: I have a polygon that defines the exterior of a region to be meshed. I want to specify boundary conditions on only certain segments of the polygon. To do this, I would 'break' the polygon into multiple edges, specify attributes to each individual edge, but still maintain a single polygon to feed to a mesher.

from earthsim.

kcpevey avatar kcpevey commented on June 11, 2024

Add ability to convert between nodes and vertices

This has been completed

The remaining two steps have not been worked on:

Create a distinction between vertices and nodes
Add ability to define a polygon as a series of connected paths.

from earthsim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.