-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add python console to 3D view #392
Conversation
Cross referencing with geojupyter/jupytergis#41 where we discussed with David about potentially saving the state of the console |
What is the benefit of keeping the console state in the document? The python APIs modify the document directly, so you would not want to re-run the API calls once they are applied |
I figured it was nice to see the history of executed code to see how the file was modified/what data was loaded etc. I've not played so much with the console in tools like blender/freecad, do they not store the history? Not storing the history makes life simpler so if the benefit is small, let's not do it. |
But if you re-execute these codes, you might mess up your CAD document since their effects are already applied to the doc.
Nope, but their GUI is basically a shortcut to call Python APIs, so you can translate your GUI working session into a Python script. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
For a future PR, we may want to use the StateDB to store the state of the console in the main view (open/close, expanded/hidden)
render(): React.ReactNode { | ||
return ( | ||
<div className="jpcad-toolbar-usertoolbar"> | ||
{this.state.usersList.map(item => { | ||
{this.filterDuplicated(this.state.usersList).map(item => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! I've seen this issue once indeed when using the Python API next to the main view
User-facing changes
doc
variablejcad222.mp4
Code changes