node editor - pyflow
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Be nice to others! Read the FreeCAD code of conduct!
Re: node editor - pyflow
Hi All,
I have a question on the pythonNode. When I try to click on the edit option in the Python node, no python console opens up. I saw in some videos that an editor (typically the version of python I have on my machine) should open up. Can anyone tell me how to access the editor for the python node?
Best,
Madhu
I have a question on the pythonNode. When I try to click on the edit option in the Python node, no python console opens up. I saw in some videos that an editor (typically the version of python I have on my machine) should open up. Can anyone tell me how to access the editor for the python node?
Best,
Madhu
- microelly2
- Veteran
- Posts: 4688
- Joined: Tue Nov 12, 2013 4:06 pm
- Contact:
Re: node editor - pyflow
I have never worked with the python node because it can be used to embed code into a Document.
We want to avoid this for FreeCAD because there is a risk to distribute dangerous code.
The preferred workflow is:
define nodes of common interest ,write your code and add both to a pyflow packages.
Pyflow packages can be installed and used inside the interface.
The code is in the package, the use case logic in the scenegraph of the FreeCAD document.
Re: node editor - pyflow
I already install opencv-python. But there is an error 'cannot import module named cv2'.
- Attachments
-
- freecad err.png (363.3 KiB) Viewed 1443 times
- microelly2
- Veteran
- Posts: 4688
- Joined: Tue Nov 12, 2013 4:06 pm
- Contact:
Re: node editor - pyflow
But my node cannot work normally.microelly2 wrote: ↑Tue Mar 03, 2020 8:12 amthis is not needed at the moment.
I have only one node ImageT to work with images and it's very alpha and has low priority.
you can use the node editor without cv2.
I am following this video. but already failed in the first step
- microelly2
- Veteran
- Posts: 4688
- Joined: Tue Nov 12, 2013 4:06 pm
- Contact:
Re: node editor - pyflow
To get a surface in 3D Space you have to visualize it
see this:
https://forum.freecadweb.org/viewtopic. ... 90#p368988
Re: node editor - pyflow
sorry, still cannot work.microelly2 wrote: ↑Tue Mar 03, 2020 9:41 amTo get a surface in 3D Space you have to visualize it
see this:
https://forum.freecadweb.org/viewtopic. ... 90#p368988
In the video, clicked the purple circle of the "vectorarray" node than click the green circle.
A "PV_FreeCAD_VectorArray" object will create under "Model>Application>Unnamed"
But I have nothing. even I added a view3D node.
- microelly2
- Veteran
- Posts: 4688
- Joined: Tue Nov 12, 2013 4:06 pm
- Contact:
Re: node editor - pyflow
if there is a view3d node in the tree you may change the viewpoint to "fit all"
the only reason I see at the moment:
what is the value of countC
it must be 1
countA, and count B should be large enough (default values)
what is the outpunt in your report view window?
Re: node editor - pyflow
Hope it is clear enoughmicroelly2 wrote: ↑Tue Mar 03, 2020 12:50 pmif there is a view3d node in the tree you may change the viewpoint to "fit all"
the only reason I see at the moment:
what is the value of countC
it must be 1
countA, and count B should be large enough (default values)
what is the outpunt in your report view window?
- microelly2
- Veteran
- Posts: 4688
- Joined: Tue Nov 12, 2013 4:06 pm
- Contact:
Re: node editor - pyflow
You have to connect the Shape_out pin of the vectorarray with the Shape_in pin of the view3d node.
Next step:
You have to execute the view3d Node
You can connect the exec_out of the vector array with the exec_in of the view3d. In thsi cas an recompute of the source automaticly updates the part representation.
Next step:
You have to execute the view3d Node
You can connect the exec_out of the vector array with the exec_in of the view3d. In thsi cas an recompute of the source automaticly updates the part representation.