Contents Menu Expand Light mode Dark mode Auto light/dark mode
Pynodes v0.1.1 documentation
Light Logo Dark Logo
  • Home
  • Quick Start
  • Gallery
    • Geometry Nodes
      • Arrow modeling
      • Atom Links
      • Balls Push Apart
      • Clone to Mesh Faces
      • Extrude Uniform
      • Fractals Geometry
      • Mesh Transition
      • Mesh Surface to Maze
      • Möbius Band
      • N-th Bézier
      • Polar Coordinate Illustrating
      • Reuleaux Polygon
      • Selection Example
      • Show Index
      • Small Demos
      • Text Examples
      • Tiling Paterns
      • Torus Knot
      • Tulsi Couple
      • Water Wave
    • Shader Nodes
      • Interactive Sphere Field
      • OSL Shader
      • Small Demos
      • Sparkles
      • Toon Shader
      • Water Flow
      • World Shader
    • Simulation Nodes
      • Simulate Particles
  • Available Socket Types
  • API Reference
    • pynodes
      • pynodes.addon
      • pynodes.colors
      • pynodes.core
      • pynodes.datasocks
      • pynodes.geosocks
      • pynodes.nodes
      • pynodes.scene
Back to top
Edit this page

Atom Links#

sweep_mesh_edges

@tree
def sweep_mesh_edges(mesh: Mesh, profile: Curve, trim_radius: Float):

    with frame("Mesh to Curve"):

        curve = mesh.to_curve().trim_length(trim_radius, 100).reverse().trim_length(trim_radius, 100)

    with frame("Curve to Mesh"):

        mesh = curve.to_mesh(profile, True)

    return mesh.set_shade_smooth(False)

link_mesh_atoms

@tree                                     # default, min, max
def link_mesh_atoms(mesh: Mesh, radius: Float = (0.2, 0, 1.2)):

    with frame("Input Mesh"):
        # comment this line to get the mesh from Group Input
        mesh = MeshIcoSphere(2).mesh

    with frame("Get sweeped mesh edges"):
        # call the function defined above
        edges = sweep_mesh_edges(mesh, CurveCircle(radius / 2), radius)

    with frame("Atom spheres"):

        spheres = MeshIcoSphere(radius, subdivisions=3).mesh.on_points(mesh.to_points())

    return edges + spheres
Next
Balls Push Apart
Previous
Arrow modeling
Copyright © 2023, 赛博念咒师
Made with Sphinx and @pradyunsg's Furo