From FreeCAD Documentation
Jump to navigation Jump to search
  • Use Sourcetrail (Language extension guide) or implement something similar. Right-click → find references should zoom out to show the entire graph, and highlight the definition and its uses
  • Breakpoints
  • Needs a "main object occurrence" feature to force an object to appear at a specific point in the top-level directory structure (inside folders and parts and other directory-like objects), regardless of whether it is used in another operation (e.g. just because someone adds an object to a "fuse" operation doesn't mean that it should be moved to a deep nesting of transformations and disappear from the main, easily-accessed part of the tree).
  • Hierarchical Edge Bundles: Visualization of Adjacency Relations in Hierarchical Data for really large graphs], hopefully we won't have graphs that large, but some insights on improving legibility are interesting and probably applicable to smaller graphs.
  • Meta functions ("macros" in the LISP/Scheme programming sense) to query the graph, filter some nodes to be hidden etc. Can also be used to represent modifications in the nodal editor in the history, see [Version control]
  • Meta nodes to control the appearance of the nodal editor itself
  • cache / freeze some objects to stop propagation of recomputes (there are already some existing solutions for that in some workbenches, e.g. Lattice2)
  • When modifying a function, bump up the version number (use Semantic Verisoning: major.minor.third.build_counter manual bump of major; same API = same minor; internal changes = bump third number; use an internal build_counter and translate it to bumps to allow re-numbering). If the current version is used somewhere, add an "upgrade node" and a "downgrade node" inside the function definition; the upgrade node is a function node translating from old inputs to a new group of nodes; it can use the older versions (which turns them into dependencies) or the new version; by "inlining" this function (i.e. it is a macro, in the LISP/Scheme sense) the old node can be upgraded into a new one; if some wrapper nodes are needed before/after the new node to obtain the old functionality, they will be included in the replacement.
  • right click → properties should show a property view and FCInfo for the node
  • separate preview nodes

New objects/nodes:

  • "Parametric" (function) and "Use" (call) objects
    • "Default values" field (to bind a parameter sheet so that it's displayed within the object's properties, this is useful e.g. when defining functions: they should have some default values, but those values are used inside nested objects and this creates an apparent dependency cycle. The branch from realthunder contains a bind() expression which solves this problem, it would be useful to attach an entire parameter sheet instead of adding parameters one by one)
  • select&sequence node, which takes operations and applies them in order (like PartDesign), but also allows selecting sub-parts of an image or geometry to operate on and then deselect to get back to the big picture. Allow for making some features optional (controlled by a checkbox in the tree / a boolean input). Allow basing features off of de-activated features (for the base plane of a sketch for example)
  • diff feature to show the diff between the shapes for two inputs, overlay them in transparent versions, animate etc.
  • bus to gather many outputs along a single line into a list, instead of a myriad of wires
  • monad: some nodes can produce a collection of values through a single output pin, the following nodes are mapped over all these values until the multi-stream is unpacked. Allows for "diff" and "bus" features above. Make the preview displays aware of the stream/monad and be able to pick a preview / end view transformer. The monad can specify an operation which is applied to the multiple values at each step to combine for display, and that combined version is used by default at the end if there is no unpacking of the multiple values, or to transform a 3D model into a techdraw drawing for all previews & for the output.
    • Pair monad: to compare two initial inputs as they are processed by a DAG of operations by using a diff as the intermediate & final view
    • Stream monad: to animate or make an input evolve over time, the intermediate and final views can show the current result or aggregate the results (through a diff + time decay to highlight the recently-changed parts, or through an opacity + compound filter, to make a sort of motion blur with a transparent overlay of the previous versions)
    • Tree of objects monad: allows updating elements of a hierarchical grouping of objects (Parts / folders / Bodies / Compounds), without loosing the hierarchy.
  • Per-node preview filters and monad preview filters: node previews can show a small portion of the output (either hide some geometry or define the camera position / zoom to fit some geometry, or some page / part of page or image for 2D stuff, or frame for animations). It should be possible to combine e.g. a zoom/hide preview from the node with
  • "Make a copy of the contents of this function here 1" → inlines the function without any elision, keeps a pass-through object for the parameters and result, it serves as an annotation
  • "Apply changes" → available for a few functions which e.g. only modify the position or other properties of one or more objects, this applies the changes and discards the function call
  • "Make non-parametric" → replaces the input by f(input)
  • "Show contents" → inlines in the view, but it's still a function; the contents should be non-modifiable, but "go to definition" should select in the definition the node that was clicked. Support breakpoints and previews (as separate nodes placed outside of the scope of the function (which can be shown via a colour effect), to avoid confusion) which affect only this invocation of the function.