Routing System
Master Neural Sketch's powerful routing system for precise, elegant, and conflict-free diagram connections.
Neural Sketch's routing system is a sophisticated yet intuitive framework designed to effortlessly manage complex connections in diagrams. From simple lines to intricate, multi-path diagrams, this system ensures visual clarity, seamless intersections, and elegant routing.
Getting Started with Routing
Neural Sketch simplifies diagram connections with intuitive commands:
Basic Connection
Establish a straightforward connection between two blocks:
Arrow Styling
Customize arrows for clarity and emphasis:
Arrow-tip Styling
Neural Sketch allows you to precisely customize arrow-tips independently from line styles. Using the arrow-tip
property, you can adjust the arrowhead shape without affecting line attributes such as thickness, dash patterns, or curves.
This helps keep your diagrams clear and visually consistent.
Basic Example
Here’s how to define a specific arrow-tip style:
Advanced Arrow-tip Options
Arrow-tips can accept additional TikZ customization directly through options:
Comprehensive Arrow-tip Styles
Neural Sketch fully supports all advanced arrow-tip designs available in TikZ:
Supported Arrow-tip Types |
---|
Stealth |
Latex |
Arc Barb |
Bar |
Bracket |
Hooks |
Parenthesis |
Straight Barb |
Tee Barb |
To |
Circle |
Diamond |
Ellipse |
Kite |
Rectangle |
Square |
Triangle |
Turned Square |
Rays |
Rays[n=8] |
Example: Displaying All Arrow-tip Styles
Line Cap Styles
By default, \nskConnect
paths feature round line caps, offering smooth and visually pleasing terminations. Nonetheless, Neural Sketch allows choosing any supported TikZ line cap:
Supported Line Cap Styles |
---|
Butt Cap |
Round Cap |
Fast Round |
Triangle Cap |
Fast Triangle |
Example: Custom Line Caps
Advanced Routing Features
Flexible Bend Types
Control the curvature and angles of your connections.
Automatic Intersection Handling
Neural Sketch elegantly handles intersecting paths, ensuring clear and readable diagrams by automatically generating bridging arcs.
Bridging Arcs (Arrow Hopping)
Activate bridging to visually distinguish crossing paths:
Bridging Options
Fine-tune bridging behavior with these customizable options:
Option | Description | Default |
---|---|---|
bridging | Enables bridging at intersections (true /false ). | false |
bridging-style | Path precedence (over or under ). | under |
bridging-span | Length of the bridging arc. | 8pt |
bridging-gap | Gap around intersection points. | 4pt |
Custom Bend and Routing Angles
Gain precise control over connection angles and curves:
Smooth Corner Radius
Enhance aesthetics with rounded corners on connections:
Practical Example
Combine multiple features for robust, professional diagrams:
Automatic Path Management
Neural Sketch's routing engine efficiently handles all path management automatically, resolving intersections and storing paths seamlessly using the underlying spath3 package. This automation reduces manual complexity, letting you concentrate fully on your diagram's structure and design.
Takeaways
- Simplified routing and intersection resolution.
- Unified, intuitive syntax for all routing scenarios.
- Customizable bridging and bends enhance readability.
- Automatic, intelligent handling of paths.
- Professional, visually appealing diagram results.
Neural Sketch empowers you to craft publication-quality diagrams effortlessly, ensuring clarity, precision, and aesthetic excellence every step of the way.
Reference
\nskConnect
Props
Prop | Type | Default |
---|---|---|
shift-x? | dim | 0mm |
shift-y? | dim | 0mm |
arrow-tip? | token | -> |
arrow-style? | token list | ultra thick, >=Triangle |
bend-direction? | choice | up |
bend-distance? | dimension | 1cm |
bend-type? | choice | none |
bridging? | choice | false |
bridging-gap? | token list | 4pt |
bridging-path? | token list | arc |
bridging-span? | token list | 8pt |
bridging-style? | choice | under |
color? | token list | c__nsk_principal |
corner-radius? | dimension | 3mm |
from | token list | {} |
id? | token list | {} |
route? | token list | -- |
shorten-from? | dimension | 0pt |
shorten-to? | dimension | 0pt |
to | token list | {} |
\nskAngledc
Props
Prop | Type | Default |
---|---|---|
alpha | number | {} |
dir | choice | {} |
dir-align? | token list | down |