Another code example
Just look at the attachments.
It's a simple example. Before I make this code example, I was thinking about placing some constraints to draw a graph or 3D model. We can place a dependent variables (center point, width, radius and etc) and create the other variables which are based on these dependent variables. We can also place constraints between variables to automaticaly calculate the variables' value we want to achieve. In the latter case, we have to solve the equations. I think mixing these two methods is more flexible.
Usually we draw a graph using some kind of UI tool, then you have to click the tool button to start the tool action. Then, you have to select a center point to start placing a circle. Sometimes we hope to have this center point snaped to an exixsting point. This "existing piont" is actually a dependent variable. When you try to place nodes to get such a center point, you usually don't want to place too many nodes. At this time, we can place a code defined node to get an output what we want.
-
NodeBox_eorTVsCOok.png 96.7 KB
-
Code_p0fXS7zXco.png 46.3 KB
- codeTest.7z 1.09 KB
- codeTest.zip 1.37 KB
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by ahuman on 18 Aug, 2021 11:31 AM
I chaged the code.