Pythonocc nodes for Ryven

Overview

Pythonocc-nodes-for-Ryven

Pythonocc nodes for Ryven

Here a way to work on Pythonocc with a node editor, Ryven in that case. To get it functional you will have to execute Ryven in an environment where pythonocc is installed.

Install Ryven: https://github.com/leon-thomm/Ryven

Install Pythonocc : https://github.com/tpaviot/pythonocc-core

You just have to import the Nodes.py file in Ryven, then all nodes are available under the right-click of the mouse.

Here a small example of a definition : https://www.youtube.com/watch?v=lUNYstrfvmg exemple_tutogithub exemple_tutogithub_1

You can load this project saved in this file : demo_example.json

It's just a beginning to explore the possibilities given by matching the two, I've just coded simple functions to see how it works and how it should be to perform complex operations.

Contribute !

The nodes are of course open for contribution, as there are thousands of functions in OpenCascade and thousands of way to developp properly the nodes!

The functions yet implemented in the nodes.py file are :

Gp_nodes = Pnt_Node, Dir_Node, Vec_Node, Ax2_Node, Pln_Node, Trsf_Node,

BRepPrimAPI_nodes = Box_Node, Sphere_Node, Cylinder_Node,

BRepAlgoAPI_nodes = Fuse_Node, Common_Node, Cut_Node,

BRepFilletAPI_nodes = fillet_Node,

Display_nodes = display_Node,

Tools_nodes = List_Node, ExportStep_Node, ExportStl_Node,

Each "nodes" family is a class with a color attributed. Node's name are nearly the same than in Pythonocc

To add a function from Pythonocc you have to generate a code as in the add_function_box_example.py file

Comments
  • Where is nodes.py?

    Where is nodes.py?

    Is there a step-by-step tutorial which uses a standard file layout?

    I can't find "Ryven-master/Ryven/packages/std" on my Ubunty which is what the video shows.

    opened by WillAdams 8
  • ported to Ryven 3.1 dev and minor refactoring

    ported to Ryven 3.1 dev and minor refactoring

    PR to port this to Ryven 3.1 which is not released yet, so do not merge yet. Ryven 3.1 will be a major upgrade for this project too, see also my comment here.

    opened by leon-thomm 5
  • Example file torus_gcode.json has Unicode error w/ Miniconda

    Example file torus_gcode.json has Unicode error w/ Miniconda

    As noted in the discussion, when this is loaded on a Windows machine:

    Traceback (most recent call last): File "C:\Users\willa\miniconda3\envs\pyoccenv\lib\site-packages\ryven\gui\startup_dialog\StartupDialog.py", line 99, in load_example_project_button_clicked self.open_project(base_dir=abs_path_from_package_dir('examples_projects')) File "C:\Users\willa\miniconda3\envs\pyoccenv\lib\site-packages\ryven\gui\startup_dialog\StartupDialog.py", line 122, in open_project project_str = f.read() File "C:\Users\willa\miniconda3\envs\pyoccenv\lib\encodings\cp1252.py", line 23, in decode return codecs.charmap_decode(input,self.errors,decoding_table)[0] UnicodeDecodeError: 'charmap' codec can't decode byte 0x90 in position 161607: character maps to

    Would this be different for Anaconda vs. Miniconda?

    opened by WillAdams 3
  • Trouble opening saved file

    Trouble opening saved file

    When we load an existing project (*.json file) the 3D viewer window launch freeze the load of the project itself. Conflict between Ryven and the 3D viewer?

    The only way I get to open an existing project is to comment this line in nodes.py :

    display, start_display, add_menu, add_functionto_menu = init_display() to #display, start_display, add_menu, add_functionto_menu = init_display()

    and when the project is loaded uncomment it.

    opened by Tanneguydv 2
  • restructured files, cleaned nodes package, fixed #3

    restructured files, cleaned nodes package, fixed #3

    Detailed changes:

    I resturtured the files into dirs (examples, nodes package).

    I cleaned the nodes package and made a few chanes, in particular:

    • I don't see why the node base should include behavior like having a dynamic number of inputs, most of your nodes are not intended to include that behavior. For example, your display node was crashing under the hood all the time because the node base class tried to set a value to a non-existing output, etc. In fact, I found only one node so far which can make use of this behavior (the List_Node). I changed implementations accordingly.
    • I added labels to inputs
    • Some descriptor renaming (like dir which shadows python's dir class, in those conflict cases you usually appen a _).
    • Lots of small changes to simplify implementations and provide consistent syntax formatting, I think this is much more readable now.

    I did not test every single node, and there are some that are not working 100% as intended, but their behaviour should be mostly equivalent to the old implementations, and your demo example runs without issues.

    opened by leon-thomm 1
Owner
Tanneguy
Tanneguy
Helps to arrange nodes

Relax brush for nodes, helps to arrange nodes easier.

null 336 Dec 15, 2022
sysctl/sysfs settings on a fly for Kubernetes Cluster. No restarts are required for clusters and nodes.

SysBindings Daemon Little toolkit for control the sysctl/sysfs bindings on Kubernetes Cluster on the fly and without unnecessary restarts of cluster o

Wallarm 19 May 6, 2022
Tool to get the top 100 of the fastest nodes in the Tor network. Based on Kirzahk tool.

Tor Network Top 100 IPs Tool to get the top 100 of the fastest nodes in the Tor network. Based on Kirzahk tool. Just execute top100ipstor.py to get th

Juan Manuel 0 Jan 23, 2022
A simple Tor switcher script switches tor nodes in interval of time

Tor_Switcher A simple Tor switcher script switches tor nodes in interval of time This script will switch tor nodes in every interval of time that you

d4rk sh4d0w 2 Nov 15, 2021
Python script to get some stats on nodes in a Blender material nodetree

Python script to get some stats on nodes in a Blender material nodetree. It counts the nodes, the node types and the max deep level for group nodes.

Alek Mugnozzo 2 Sep 3, 2022
Some tentative models that incorporate label propagation to graph neural networks for graph representation learning in nodes, links or graphs.

Some tentative models that incorporate label propagation to graph neural networks for graph representation learning in nodes, links or graphs.

zshicode 1 Nov 18, 2021
Represents a Lavalink client used to manage nodes and connections.

lavaplayer Represents a Lavalink client used to manage nodes and connections. setup pip install lavaplayer setup lavalink you need to java 11* LTS or

HazemMeqdad 37 Nov 21, 2022
Socket programming is a way of connecting two nodes on a network to communicate with each other

Socket Programming in Python Socket programming is a way of connecting two nodes on a network to communicate with each other. One socket(node) listens

Janak raikhola 1 Jul 5, 2022
Pteronode - Script for managing Pterodactyl nodes

pteronode Script for managing Pterodactyl nodes Pteronode allows you to create s

null 9 Sep 28, 2022
Compute execution plan: A DAG representation of work that you want to get done. Individual nodes of the DAG could be simple python or shell tasks or complex deeply nested parallel branches or embedded DAGs themselves.

Hello from magnus Magnus provides four capabilities for data teams: Compute execution plan: A DAG representation of work that you want to get done. In

null 12 Feb 8, 2022
ROS2 nodes for Waveshare Alphabot2-Pi mobile robot.

ROS2 for Waveshare Alphabot2-Pi This repo contains ROS2 packages for the Waveshare Alphabot2-Pi mobile robot: alphabot2: it contains the nodes used to

Michele Rizzo 2 Oct 11, 2022
Addon and nodes for working with structural biology and molecular data in Blender.

Molecular Nodes ?? ?? ?? Buy Me a Coffee to Keep Development Going! Join a Community of Blender SciVis People! What is Molecular Nodes? Molecular Node

Brady Johnston 456 Jan 8, 2023