EASY-ROB™ Application Programming Interface
v9.301
|
Method class for 3D Pdf Export. More...
#include <ER_CAPI.H>
Static Public Member Functions | |
static ER_DllExport char * | U3DPdf_ExportVer (void) |
3D Export Version More... | |
static ER_DllExport int | U3DPdf_ExportAPI (int pdf_flag, char *s=NULL) |
Control 3D PDF and HTML Export To open the created 3D Pdf file, Adobe Reader up to version XI is required. To open the created 3D Html (WebGL) file, a suitable browser (Edge, Firefox, Chrome) is required. see also U3DHtml_ExportAPI() method to define a Html Template file with user defined placeholder. Parameter pdf_flag is one of_3DPDF_EXPORT_GET_MODE, _3DPDF_EXPORT_ACTIVATE, _3DPDF_EXPORT_DEACTIVATE, _3DPDF_EXPORT_INIT, _3DPDF_EXPORT_START, _3DPDF_EXPORT_PAUSE, _3DPDF_EXPORT_STOP, _3DPDF_EXPORT_SAVE, _3DPDF_EXPORT_EXPORT, _3DPDF_EXPORT_SHOW, _3DPDF_EXPORT_RESTART, _3DPDF_EXPORT_GET_LIC_OPTIONS, _3DPDF_EXPORT_GET_LICENSE_TEXT, _3DPDF_EXPORT_SET_FILE, _3DPDF_EXPORT_SET_PASSWORD or _3DPDF_EXPORT_SET_LABEL _3DPDF_EXPORT_SET_KEYFRAMES_MAX _3DPDF_EXPORT_GET_KEYFRAMES _3DPDF_EXPORT_RESET_LAYOUT _3DPDF_EXPORT_LOAD_LAYOUT_FILE _3DPDF_EXPORT_SAVE_LAYOUT_FILE Parameter s is an individual string, depending on pdf_flag Explanations Before using the 3D Export, make sure that the "EASY-ROB PlugIn Dialog 3D Export" is closed. This can be verified with _3DPDF_EXPORT_GET_MODE. The return value is one of _3DPDF_EXPORT_MODE_FREE - 3D Export currently not in use, does mean it is ready to for API usage _3DPDF_EXPORT_MODE_ERROR - 3D Export currently on error _3DPDF_EXPORT_MODE_DLG - PlugIn Dialog for 3D Export is open _3DPDF_EXPORT_MODE_API - already in API usage Step_I If _3DPDF_EXPORT_GET_MODE returns _3DPDF_EXPORT_MODE_FREE, you can activate and initialize the 3D Export with _3DPDF_EXPORT_ACTIVATE and _3DPDF_EXPORT_INIT. In the next step, define all necessary callback function, see U3DPdf_ExportAPI_SetCallbackMsg() for feedback messages U3DPdf_ExportAPI_SetCallbackSaveStatus() for status messages when saving the 3D file U3DPdf_ExportAPI_SetCallbackProgress() for ExportU3DScene and Generate3DPdf progress messages when saving the 3D file U3DPdf_ExportAPI_SetCallbackProgressExportU3DScene() for ExportU3DScene progress messages when saving the 3D file U3DPdf_ExportAPI_SetCallbackProgressGenerate3DPdf() for Generate3DPdf progress messages when saving the 3D file Step_II The API for 3D Export is ready to use now. To start the recording, use _3DPDF_EXPORT_START Everytime EASY-ROB causes a grafical update, an additional key frame is recorded. During recording you can set labels with _3DPDF_EXPORT_SET_LABEL Use _3DPDF_EXPORT_PAUSE to pause and continue the recording. Before you stop and save the recording you should define a file name for the created pdf or html (WebGL) file. If you want to save the 3D capture as an HTML (WebGL) file, use the U3DHtml_ExportAPI() method to specify the html template file and define the custom placeholder. Option: The password protecting the pdf file and allows it to open only for certain users. Step_III Finally use _3DPDF_EXPORT_SAVE or _3DPDF_EXPORT_STOP to create the 3D file and wait until _3DPDF_EXPORT_SAVE_STATUS_SAVE_DONE, see U3DPdf_ExportAPI_SetCallbackSaveStatus(). Use _3DPDF_EXPORT_DEACTIVATE to terminate the API usage. This sets the 3D Export back to _3DPDF_EXPORT_MODE_FREE and will free the complete used memory. Remarks Use _3DPDF_EXPORT_EXPORT directly after Step_I to save the 3D Scene without animation. After Step_III you can immediately continue with Step_II , it is not necessary to activate the 3D Export API several times. More... | |
static ER_DllExport int | U3DHtml_ExportAPI (int html_flag, char *sn=NULL, char *sv=NULL) |
Control 3D HTML Export To open the created 3D Html file, a suitable browser (Edge, Firefox, Chrome) is required. see also U3DPdf_ExportAPI() method Parameter html_flag is one of _3DHTML_EXPORT_CLEAR_PARAMETER_USR _3DHTML_EXPORT_SET_PARAMETER_USR _3DHTML_EXPORT_SET_PARAMETER_DEFAULT _3DHTML_EXPORT_SET_PARAMETER_TITLE _3DHTML_EXPORT_SET_PARAMETER_HEADER _3DHTML_EXPORT_SET_PARAMETER_IMAGELINK _3DHTML_EXPORT_LOAD_TEMPLATE_FILE Parameter sn and sv are an individual strings, depending on html_flag Explanations Before using the 3D Export, make sure that the "EASY-ROB PlugIn Dialog 3D Export" is closed. This can be verified with _3DPDF_EXPORT_GET_MODE. The return value is one of _3DPDF_EXPORT_MODE_FREE - 3D Export currently not in use, does mean it is ready to for API usage _3DPDF_EXPORT_MODE_ERROR - 3D Export currently on error _3DPDF_EXPORT_MODE_DLG - PlugIn Dialog for 3D Export is open _3DPDF_EXPORT_MODE_API - already in API usage Step_I,Step_II,Step_III see description of Step_I, II an III' in method U3DPdf_ExportAPI() Remarks Use html_flag _3DHTML_EXPORT_LOAD_TEMPLATE_FILE to set an existing template file name. If no Html template file is set, the predefined html template file '3D-WebGL-HTML-Template.html' is used.This template file should be located in the current folder of your work cell, in the application folder or in the user folder, see ER_CAPI_SYS_STATUS::get_system_folder_file() The Html template file can be customized using Cascading Style Sheets (CSS) Example: 3D WebGL Export showing the 'AutoPath' - Collision-free path planning functionality for collision free path planning. '3D-WebGL-AutoPath.html' More... | |
static ER_DllExport int | U3DPdf_ExportAPI_SetCallbackMsg (int callback_fct_id, void(*ptr_MsgFct)(char *)) |
Defines a callback function for output messages during 3D PDF file Export Parameter callback_fct_id is 1 or 2 for two different output streams. More... | |
static ER_DllExport int | U3DPdf_ExportAPI_SetCallbackSaveStatus (void(*ptr_SaveStatusFct)(int)) |
Defines a callback function for status messages when saving the 3D PDF file Parameter save_status in Callback_API_SaveStatus(int save_status) is one of _3DPDF_EXPORT_SAVE_STATUS_UNDEF, _3DPDF_EXPORT_SAVE_STATUS_RECORD, _3DPDF_EXPORT_SAVE_STATUS_SAVE_BEGIN, _3DPDF_EXPORT_SAVE_STATUS_SAVE_BEGIN_THREAD, _3DPDF_EXPORT_SAVE_STATUS_SAVE_DONE, _3DPDF_EXPORT_SAVE_STATUS_SAVE_ABORT, _3DPDF_EXPORT_SAVE_STATUS_SAVE_ERROR or _3DPDF_EXPORT_SAVE_STATUS_KEYFRAMES_MAX Remarks save_status _3DPDF_EXPORT_SAVE_STATUS_RECORD confirmed that the recording is startedA pdf_flag _3DPDF_EXPORT_STOP, see U3DPdf_ExportAPI() causes _3DPDF_EXPORT_SAVE_STATUS_SAVE_BEGIN or _3DPDF_EXPORT_SAVE_STATUS_SAVE_BEGIN_THREAD to confirm that the 3D Pdf Export is started directly or running in a Thread.If the 3D Pdf file was created successfully, it will be confirmed with _3DPDF_EXPORT_SAVE_STATUS_SAVE_DONE. In other cases the save_status is _3DPDF_EXPORT_SAVE_STATUS_SAVE_ABORT or _3DPDF_EXPORT_SAVE_STATUS_SAVE_ERRORMake sure that 3D Pdf file is not open in the Adobe Reader. More... | |
static ER_DllExport int | U3DPdf_ExportAPI_SetCallbackProgress (void(*ptr_ProgressFct)(double)) |
Defines one single callback function for ExportU3DScene progress and Generate3DPdf progress messages when saving the 3D PDF file Parameter progress in Callback_API_Progress(double progress) is between 0 and 1 for 100%Define U3DPdf_ExportAPI_SetCallbackSaveStatus() to receive _3DPDF_EXPORT_SAVE_STATUS_SAVE_DONE when saving the 3D PDF file is completed. Remarks To define one callback function for ExportU3DScene progress (Save Step A) and one for Generate3DPdf progress (Save Step B), use U3DPdf_ExportAPI_SetCallbackProgressExportU3DScene() and U3DPdf_ExportAPI_SetCallbackProgressGenerate3DPdf() More... | |
static ER_DllExport int | U3DPdf_ExportAPI_SetCallbackProgressExportU3DScene (void(*ptr_ProgressFctExportU3DScene)(double)) |
Defines a callback function for ExportU3DScene progress messages when saving the 3D PDF file Parameter progress in Callback_API_ProgressExportU3DScene(double progress) is between 0 and 1 for 100%Define U3DPdf_ExportAPI_SetCallbackSaveStatus() to receive _3DPDF_EXPORT_SAVE_STATUS_SAVE_DONE when saving the 3D PDF file is completed. Remarks When saving the 3D PDF file, ExportU3DScene is Save Step A. Save Step B generates the 3DPdf file, use U3DPdf_ExportAPI_SetCallbackProgressGenerate3DPdf() Use U3DPdf_ExportAPI_SetCallbackProgress() to define one single callback function for both Save Steps. More... | |
static ER_DllExport int | U3DPdf_ExportAPI_SetCallbackProgressGenerate3DPdf (void(*ptr_ProgressFctGenerate3DPdf)(double)) |
Defines a callback function for Generate3DPdf progress messages when saving the 3D PDF file Parameter progress in Callback_API_ProgressGenerate3DPdf(double progress) is between 0 and 1 for 100%Define U3DPdf_ExportAPI_SetCallbackSaveStatus() to receive _3DPDF_EXPORT_SAVE_STATUS_SAVE_DONE when saving the 3D PDF file is completed. Remarks When saving the 3D PDF file, ExportU3DScene is Save Step A and Generate3DPdf is Save Step B. For Save Step A use U3DPdf_ExportAPI_SetCallbackProgressExportU3DScene() Use U3DPdf_ExportAPI_SetCallbackProgress() to define one single callback function for both Save Steps. More... | |
Additional Inherited Members | |
Static Public Attributes inherited from ER_CAPI_USER_IO | |
static ER_CAPI_USER_IO_FILE | er_capi_user_io_file |
Method class to load and save work cells-, robots-, tool-files, etc. More... | |
static ER_CAPI_USER_IO_DIALOG | er_capi_user_io_dialog |
Method class, supplies dialogs, i.e. to enter and show values. More... | |
static ER_CAPI_USER_IO_PICK | er_capi_user_io_pick |
Method class to "pick" objects such as devices, tags, polygon, vertices, measure distances, ... More... | |
static ER_CAPI_USER_IO_CRUISE | er_capi_user_io_cruise |
Method class to manipulate the 3D Scene. More... | |
static ER_CAPI_USER_IO_3DPDF | er_capi_user_io_3dpdf |
Method class for 3D Pdf Export. More... | |
Static Public Attributes inherited from ER_CAPI | |
static ER_CAPI_USER_IO | er_capi_user_io |
Method class for interaction with EASY-ROB. More... | |
static ER_CAPI_DEVICES | er_capi_devices |
Method class to create, attach, update devices, for kinematics calculations and for trajectory planning and -execution. More... | |
static ER_CAPI_SIM | er_capi_sim |
Method class for simulation settings. More... | |
static ER_CAPI_TARGETS | er_capi_targets |
Method class for paths and tags. More... | |
static ER_CAPI_CAD | er_capi_cad |
Method class for for 3D CAD Data import and -export, changing attributes and positions. More... | |
static ER_CAPI_SYS | er_capi_sys |
Method class for mathematical calculations, simulation status, units. More... | |
Method class for 3D Pdf Export.
|
static |
Control 3D HTML Export
To open the created 3D Html file, a suitable browser (Edge, Firefox, Chrome) is required.
see also U3DPdf_ExportAPI() method
Parameter html_flag
is one of
_3DHTML_EXPORT_CLEAR_PARAMETER_USR _3DHTML_EXPORT_SET_PARAMETER_USR _3DHTML_EXPORT_SET_PARAMETER_DEFAULT _3DHTML_EXPORT_SET_PARAMETER_TITLE _3DHTML_EXPORT_SET_PARAMETER_HEADER _3DHTML_EXPORT_SET_PARAMETER_IMAGELINK _3DHTML_EXPORT_LOAD_TEMPLATE_FILE
Parameter sn
and sv
are an individual strings, depending on html_flag
Explanations
Before using the 3D Export, make sure that the "EASY-ROB PlugIn Dialog 3D Export" is closed. This can be verified with _3DPDF_EXPORT_GET_MODE.
The return value is one of
_3DPDF_EXPORT_MODE_FREE - 3D Export currently not in use, does mean it is ready to for API usage
_3DPDF_EXPORT_MODE_ERROR - 3D Export currently on error
_3DPDF_EXPORT_MODE_DLG - PlugIn Dialog for 3D Export is open
_3DPDF_EXPORT_MODE_API - already in API usage
Step_I,Step_II,Step_III
see description of Step_I, II an III' in method U3DPdf_ExportAPI()
Remarks
Use html_flag
_3DHTML_EXPORT_LOAD_TEMPLATE_FILE to set an existing template file name. If no Html template file is set, the predefined html template file '3D-WebGL-HTML-Template.html' is used.
This template file should be located in the current folder of your work cell, in the application folder or in the user folder, see ER_CAPI_SYS_STATUS::get_system_folder_file()
The Html template file can be customized using Cascading Style Sheets (CSS)
Example:
3D WebGL Export showing the 'AutoPath' - Collision-free path planning functionality for collision free path planning. '3D-WebGL-AutoPath.html'
[in] | html_flag | |
[in] | sn | individual string or name of parameter, depending on html_flag |
[in] | sv | value of parameter, depending on html_flag |
0 | - _3DHTML_EXPORT_OK |
1 | - _3DHTML_EXPORT_ERROR |
-1 | - _3DHTML_EXPORT_VALUES, Error |
|
static |
Control 3D PDF and HTML Export
To open the created 3D Pdf file, Adobe Reader up to version XI is required.
To open the created 3D Html (WebGL) file, a suitable browser (Edge, Firefox, Chrome) is required.
see also U3DHtml_ExportAPI() method to define a Html Template file with user defined placeholder.
Parameter pdf_flag
is one of
_3DPDF_EXPORT_GET_MODE, _3DPDF_EXPORT_ACTIVATE, _3DPDF_EXPORT_DEACTIVATE, _3DPDF_EXPORT_INIT, _3DPDF_EXPORT_START, _3DPDF_EXPORT_PAUSE, _3DPDF_EXPORT_STOP, _3DPDF_EXPORT_SAVE, _3DPDF_EXPORT_EXPORT, _3DPDF_EXPORT_SHOW, _3DPDF_EXPORT_RESTART, _3DPDF_EXPORT_GET_LIC_OPTIONS, _3DPDF_EXPORT_GET_LICENSE_TEXT, _3DPDF_EXPORT_SET_FILE, _3DPDF_EXPORT_SET_PASSWORD or _3DPDF_EXPORT_SET_LABEL _3DPDF_EXPORT_SET_KEYFRAMES_MAX _3DPDF_EXPORT_GET_KEYFRAMES _3DPDF_EXPORT_RESET_LAYOUT _3DPDF_EXPORT_LOAD_LAYOUT_FILE _3DPDF_EXPORT_SAVE_LAYOUT_FILE
Parameter s
is an individual string, depending on pdf_flag
Explanations
Before using the 3D Export, make sure that the "EASY-ROB PlugIn Dialog 3D Export" is closed. This can be verified with _3DPDF_EXPORT_GET_MODE.
The return value is one of
_3DPDF_EXPORT_MODE_FREE - 3D Export currently not in use, does mean it is ready to for API usage
_3DPDF_EXPORT_MODE_ERROR - 3D Export currently on error
_3DPDF_EXPORT_MODE_DLG - PlugIn Dialog for 3D Export is open
_3DPDF_EXPORT_MODE_API - already in API usage
Step_I
If _3DPDF_EXPORT_GET_MODE returns _3DPDF_EXPORT_MODE_FREE, you can activate and initialize the 3D Export with _3DPDF_EXPORT_ACTIVATE and _3DPDF_EXPORT_INIT.
In the next step, define all necessary callback function, see
U3DPdf_ExportAPI_SetCallbackMsg() for feedback messages
U3DPdf_ExportAPI_SetCallbackSaveStatus() for status messages when saving the 3D file
U3DPdf_ExportAPI_SetCallbackProgress() for ExportU3DScene and Generate3DPdf progress messages when saving the 3D file
U3DPdf_ExportAPI_SetCallbackProgressExportU3DScene() for ExportU3DScene progress messages when saving the 3D file
U3DPdf_ExportAPI_SetCallbackProgressGenerate3DPdf() for Generate3DPdf progress messages when saving the 3D file
Step_II
The API for 3D Export is ready to use now.
To start the recording, use _3DPDF_EXPORT_START
Everytime EASY-ROB causes a grafical update, an additional key frame is recorded.
During recording you can set labels with _3DPDF_EXPORT_SET_LABEL
Use _3DPDF_EXPORT_PAUSE to pause and continue the recording.
Before you stop and save the recording you should define a file name for the created pdf or html (WebGL) file.
If you want to save the 3D capture as an HTML (WebGL) file, use the U3DHtml_ExportAPI() method to specify the html template file and define the custom placeholder.
Option: The password protecting the pdf file and allows it to open only for certain users.
Step_III
Finally use _3DPDF_EXPORT_SAVE or _3DPDF_EXPORT_STOP to create the 3D file and wait until _3DPDF_EXPORT_SAVE_STATUS_SAVE_DONE, see U3DPdf_ExportAPI_SetCallbackSaveStatus().
Use _3DPDF_EXPORT_DEACTIVATE to terminate the API usage. This sets the 3D Export back to _3DPDF_EXPORT_MODE_FREE and will free the complete used memory.
Remarks
Use _3DPDF_EXPORT_EXPORT directly after Step_I to save the 3D Scene without animation.
After Step_III you can immediately continue with Step_II , it is not necessary to activate the 3D Export API several times.
[in] | pdf_flag | |
[in] | s | individual string, depending on pdf_flag |
0 | - _3DPDF_EXPORT_OK |
1 | - _3DPDF_EXPORT_ERROR |
-1 | - _3DPDF_EXPORT_VALUE, Error |
|
static |
Defines a callback function for output messages during 3D PDF file Export
Parameter callback_fct_id
is 1 or 2 for two different output streams.
[in] | callback_fct_id | |
[in] | ptr_MsgFct | (char *msg) callback function pointer |
0 | - Ok |
1 | - Error |
|
static |
Defines one single callback function for ExportU3DScene progress and Generate3DPdf progress messages when saving the 3D PDF file
Parameter progress
in Callback_API_Progress(double progress) is between 0 and 1 for 100%
Define U3DPdf_ExportAPI_SetCallbackSaveStatus() to receive _3DPDF_EXPORT_SAVE_STATUS_SAVE_DONE when saving the 3D PDF file is completed.
Remarks
To define one callback function for ExportU3DScene progress (Save Step A) and one for Generate3DPdf progress (Save Step B),
use U3DPdf_ExportAPI_SetCallbackProgressExportU3DScene() and U3DPdf_ExportAPI_SetCallbackProgressGenerate3DPdf()
[in] | ptr_ProgressFct | (double) callback function pointer |
0 | - Ok |
1 | - Error |
|
static |
Defines a callback function for ExportU3DScene progress messages when saving the 3D PDF file
Parameter progress
in Callback_API_ProgressExportU3DScene(double progress) is between 0 and 1 for 100%
Define U3DPdf_ExportAPI_SetCallbackSaveStatus() to receive _3DPDF_EXPORT_SAVE_STATUS_SAVE_DONE when saving the 3D PDF file is completed.
Remarks
When saving the 3D PDF file, ExportU3DScene is Save Step A.
Save Step B generates the 3DPdf file, use U3DPdf_ExportAPI_SetCallbackProgressGenerate3DPdf()
Use U3DPdf_ExportAPI_SetCallbackProgress() to define one single callback function for both Save Steps.
[in] | ptr_ProgressFctExportU3DScene | (double) callback function pointer |
0 | - Ok |
1 | - Error |
|
static |
Defines a callback function for Generate3DPdf progress messages when saving the 3D PDF file
Parameter progress
in Callback_API_ProgressGenerate3DPdf(double progress) is between 0 and 1 for 100%
Define U3DPdf_ExportAPI_SetCallbackSaveStatus() to receive _3DPDF_EXPORT_SAVE_STATUS_SAVE_DONE when saving the 3D PDF file is completed.
Remarks
When saving the 3D PDF file, ExportU3DScene is Save Step A and Generate3DPdf is Save Step B.
For Save Step A use U3DPdf_ExportAPI_SetCallbackProgressExportU3DScene()
Use U3DPdf_ExportAPI_SetCallbackProgress() to define one single callback function for both Save Steps.
[in] | ptr_ProgressFctGenerate3DPdf | (double) callback function pointer |
0 | - Ok |
1 | - Error |
|
static |
Defines a callback function for status messages when saving the 3D PDF file
Parameter save_status
in Callback_API_SaveStatus(int save_status) is one of _3DPDF_EXPORT_SAVE_STATUS_UNDEF, _3DPDF_EXPORT_SAVE_STATUS_RECORD, _3DPDF_EXPORT_SAVE_STATUS_SAVE_BEGIN, _3DPDF_EXPORT_SAVE_STATUS_SAVE_BEGIN_THREAD, _3DPDF_EXPORT_SAVE_STATUS_SAVE_DONE, _3DPDF_EXPORT_SAVE_STATUS_SAVE_ABORT, _3DPDF_EXPORT_SAVE_STATUS_SAVE_ERROR or _3DPDF_EXPORT_SAVE_STATUS_KEYFRAMES_MAX
Remarks
save_status
_3DPDF_EXPORT_SAVE_STATUS_RECORD confirmed that the recording is started
A pdf_flag
_3DPDF_EXPORT_STOP, see U3DPdf_ExportAPI() causes _3DPDF_EXPORT_SAVE_STATUS_SAVE_BEGIN or _3DPDF_EXPORT_SAVE_STATUS_SAVE_BEGIN_THREAD to confirm that the 3D Pdf Export is started directly or running in a Thread.
If the 3D Pdf file was created successfully, it will be confirmed with _3DPDF_EXPORT_SAVE_STATUS_SAVE_DONE.
In other cases the save_status
is _3DPDF_EXPORT_SAVE_STATUS_SAVE_ABORT or _3DPDF_EXPORT_SAVE_STATUS_SAVE_ERROR
Make sure that 3D Pdf file is not open in the Adobe Reader.
[in] | ptr_SaveStatusFct | (int) callback function pointer |
0 | - Ok |
1 | - Error |
|
static |
3D Export Version
version | 3DPDF_Export version number |