Forums Technical subjects Patchwork 3D R&D and Roadmap Patchwork 3D 2022 – Scripting API improvements

Author Posts

Romaric BOUNY
Keymaster

Hi,

Patchwork 3D 2022 will bring new functions to improve P3D Data API covering.

The first improvement I am talking about today is the possibility to create or read mesh data.
You can create a new surface from mesh data (vertices, normals, uvs,  and vertices indices)
or read mesh data from existing surfaces.

This example shows how to create a plane primitive in a new geometry layer

with this fonction to create the mesh data for the plane :

 

=> This offers new possibilities to develop geometry translators, and automate imports using scripting, or develop interop plugins in modelisation or CAD software.

An example of the possibilities of this API is the AliasToP3D plugin we are developing. More information in this post

 

 



Romaric BOUNY
Keymaster

The second improvement I am talking about today is the configuration API

You can now browse or edit configuration rules and targets
=> the configuration could be automatically generated from well organized layers for example

You can also browse configuration parameters and values
=> This could help to automatically generate camera hierarchy to prepare configuration thumbnails for Lumis or Accel VR (example below)



Romaric BOUNY
Keymaster

Finally, The selection API have been added, leading to new possibilities for your scripts :

You can choose to execute a script only on selected surfaces
Or on the other hand, you can select surfaces at the end of the script, to highlight updated surfaces, or to select filtered surfaces in case of filtering script.

For example, this script selects in Shaper every surface with a “GLASS*” material assigned on the active aspect layer.

Look at the result on this car :

Then with Shift+R to hide unselected surfaces :

 

 

 


  • You must be logged in to reply to this topic.