Power users hub: Difference between revisions

From LabRPS Documentation
Jump to navigation Jump to search
(Created page with " {{TOCright}} 64px ---- This is the place to come if you are an experienced user and want to learn more about customizing and extending LabRPS. LabRPS is extensible by Python code that is run directly in the Python console, or that is loaded from modules at startup. This means that you can modify LabRPS without needing to recompile the program. For example, you can: * '''Create and modify geometry''': you can c...")
 
No edit summary
 
Line 18: Line 18:
* [[Interface Customization|Interface Customization]]: Starting with the beginning: Toolbars and shortcuts
* [[Interface Customization|Interface Customization]]: Starting with the beginning: Toolbars and shortcuts
* [[Macros|Working with Macros]]: Easily record often repeated tasks or Python code
* [[Macros|Working with Macros]]: Easily record often repeated tasks or Python code
* [[Macros_recipes|Macros recipes]]
* [[Customize_Toolbars|Customize Toolbars]]
* [[Installing_more_workbenches|Installing more workbenches]]


== Scripting in LabRPS ==  
== Scripting in LabRPS ==  
Line 33: Line 30:
* [[Gui_Command|Gui Command]]: Adding custom commands to the GUI
* [[Gui_Command|Gui Command]]: Adding custom commands to the GUI
* Using mixed [[Units|Units]] in LabRPS
* Using mixed [[Units|Units]] in LabRPS
* [[Profiling|Profiling]] the Python code
* [[Debugging#Python Debugging|Debugging]] the Python code
*[[Python_Development_Environment|Python Development Environment]] - A simplistic development environment for Python within LabRPS


=== Modules ===  
=== Modules ===  


The functionality of LabRPS is separated in Modules which deal with special data types and applications. LabRPS has built-in modules and Extension Modules (plug-ins). Once plugin modules are installed, they become availible to you as easily as the built-in modules. The modules described below are the default modules, includeed in every LabRPS installation.
The functionality of LabRPS is separated in Modules which deal with special data types and applications. LabRPS has built-in modules and Extension Modules (plug-ins). Once plugin modules are installed, they become availible to you as easily as the built-in modules. The modules described below are the default modules, includeed in every LabRPS installation.
* The [[Builtin modules|Builtin modules]] are the principal LabRPS modules. They contain tools for manipulating general LabRPS configurations, documents and their contents.
* [[Workbench creation|Workbench creation]] shows you how to create your own workbench
====Working with Meshes====
* [[Mesh Scripting|Mesh Scripting]]: How to interact with the [[Mesh_Workbench|Mesh Workbench]]
====Working with Parts====
* [[Part_Workbench|The Part Workbench]]: How [http://en.wikipedia.org/wiki/Open_CASCADE Open CASCADE Technology] tools and structure is used in LabRPS
* [[Topological data scripting|Topological data scripting]]: How to interact with the Part Module
* [[PythonOCC|PythonOCC]]: How to unleash the whole Open CASCADE power
* [[Mesh to Part|Mesh to Part]]: Converting between object types
====Accessing the Coin scenegraph====
* [[Scenegraph|The Coin/Inventor scenegraph]]: How the LabRPS scene representation works
* [[Pivy|Pivy]]: How to access and modify the scenegraph
===Controlling the Qt interface===
* [[PySide|PySide]]: How to access the interface, and modify its contents
* [[Embedding LabRPSGui|Using the LabRPS GUI]] in another Qt application with PyQt
===Working with parametric objects===
* [[Scripted_objects|Scripted objects]]: how to make 100% Python-scripted objects.
** [[Scripted_objects_with_attachment|Scripted objects with attachment]]: how to make scripted objects attachable to other objects.
** [[Scripted_objects_saving_attributes|Scripted objects saving attributes]]: how to save and restore attributes of the proxy class with {{incode|dumps}} and {{incode|loads}}.
** [[Scripted_objects_migration|Scripted objects migration]]: how to migrate old scripted objects to a new class.
===Examples===
* [[Code snippets|Code snippets]] : A collection of pieces of LabRPS Python code, to serve as ingredients in your scripts...
* [[Line drawing function|Line drawing function]]: How to build a simple tool to draw lines
* [[Dialog creation|Dialog creation]]: How to construct dialogs with Qt designer, and use them in LabRPS
* [[Embedding LabRPS|Embedding LabRPS]]: How to import LabRPS as a Python module in other applications
* The [[Draft_Workbench|Draft Workbench]] adds basic 2d drawing functions to LabRPS. It is written entirely in Python, so it can be a good example if you want to write your own modules.
* [[LabRPS vector math library|LabRPS vector math library]] : A couple of handy functions to manipulate LabRPS vectors. This library is also included in the Draft module.


== API Functions ==  
== API Functions ==  


The complete API documentation of LabRPS is located at http://www.labrps.com/api/ . It contains both C++ and Python APIs, and is not totally well formatted yet, which can be confusing when looking for python-only code. An easier to browse version can be found [[:Category:API|here]]. Note that it can be incomplete, since it is updated manually. For more accurate information, browse the modules directly from LabRPS's Python console.
The complete API documentation of LabRPS is located at http://www.labrps.com/api/ . It contains both C++ and Python APIs, and is not totally well formatted yet, which can be confusing when looking for python-only code.
 
Related: [[Exposing_C%2B%2B_to_Python|Exposing C++ to Python]]


== Advanced modification ==  
== Advanced modification ==  
Line 92: Line 44:
* [[Installing_on_Windows|Installing on Windows]]: Using the windows installer
* [[Installing_on_Windows|Installing on Windows]]: Using the windows installer
* [[Compile_on_Windows|Compiling LabRPS on Windows]] and [[Compile_on_Linux|Compiling LabRPS on Linux]]
* [[Compile_on_Windows|Compiling LabRPS on Windows]] and [[Compile_on_Linux|Compiling LabRPS on Linux]]
* [[Branding|Branding]]: Simple modifications you can do to the source code to change some aspects of LabRPS
* [[Extra_python_modules|Extra python modules]] : Extend the LabRPS python interpreter with these powerful modules!


== Python tutorials ==  
== Python tutorials ==  
Line 116: Line 66:
* [http://vizzzion.org/?id=pyqt Programming Qt applications in python] : A more in-depth tutorial covering all the process of working with qt and python
* [http://vizzzion.org/?id=pyqt Programming Qt applications in python] : A more in-depth tutorial covering all the process of working with qt and python


'''Pivy''' - How to interact with LabRPS's 3D scenes
* [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.108.947&rep=rep1&type=pdf Pivy - Embedding a Dynamic Scripting Language into a Scene Graph Library] : Thesis that explains Pivy in detail
* [http://ftp.ntua.gr/mirror/python/pycon/dc2004/papers/47/ High Level 3D Graphics Programming in Python] : Pivy example from Pycon 2004
* [https://www.semanticscholar.org/paper/Integrating-Pivy-into-Studierstube-4.2-Gruber/08c9a89c8326c87f81c2d83428029fbfb6c2ae64 Introducing Pivy into studierstube] [https://www.researchgate.net/publication/228737136_Integrating_Pivy_into_Studierstube_42 (Mirror)] : A paper that is not really a tutorial, but that illustrates well how Pivy works (requires an academic account)
== Community projects ==
On the [[LabRPS Community Portal|Community portal]], you can find other LabRPS-based projects run by the LabRPS users community. If you are starting a new LabRPS project, be sure to list it there! We also have a page with things you can do if you would like to [[Help LabRPS|Help LabRPS]].
* [[Scientific_literature|Scientific literature]]: articles that reference or use the LabRPS system in different ways.
</translate>
{{Powerdocnavi}}
{{Powerdocnavi}}
[[Category:Hubs]]
[[Category:Hubs]]

Latest revision as of 15:39, 29 October 2024

Power user hub.png


This is the place to come if you are an experienced user and want to learn more about customizing and extending LabRPS.

LabRPS is extensible by Python code that is run directly in the Python console, or that is loaded from modules at startup. This means that you can modify LabRPS without needing to recompile the program. For example, you can:

  • Create and modify geometry: you can create a new object type, either from scratch or by adapting an existing type.
  • Create custom tools and commands: add your own set of tools that run your code.
  • Modify the interface: create toolbars to put your tools, create special windows, panels, or interfaces for interacting with your tools.
  • Modify the scenegraph representation: LabRPS has separate processes for building up the geometry and displaying that geometry on screen. You have full access to the way the scene contents are displayed on screen, therefore you can modify that representation, interact with it, or add custom behaviour to it. You can also add custom screen widgets, like information, draggers, anchors or temporary entities.

If you'd like to contribute content to these pages, request a wiki account with editor permissions in the forum, and read the WikiPages for the general guidelines that you should follow. For other ways to contribute with the project, see the Help LabRPS page.

Customizing LabRPS

Scripting in LabRPS

General

Modules

The functionality of LabRPS is separated in Modules which deal with special data types and applications. LabRPS has built-in modules and Extension Modules (plug-ins). Once plugin modules are installed, they become availible to you as easily as the built-in modules. The modules described below are the default modules, includeed in every LabRPS installation.

API Functions

The complete API documentation of LabRPS is located at http://www.labrps.com/api/ . It contains both C++ and Python APIs, and is not totally well formatted yet, which can be confusing when looking for python-only code.

Advanced modification

Python tutorials

These are good generic tutorials, not specific to LabRPS, that might interest you if you are totally new to python.

Python

PySide - How to create and manage LabRPS's Qt UI interface from python

The following two references are PyQt specific (not PySide) but may offer some information of use: