Hoops Visualize HPS  version 2018-SP2
Hoops Visualize HPS 3D Rendering Engine
Looking for a senior C++ dev?
I'm looking for work. Hire me!
HPS::Publish::File Class Reference

The File class provides functions to export Model objects to 3D PDFs via Publish. More...

#include <sprk_publish.h>

Static Public Member Functions

static DocumentKey CreateDocument (char const *in_file_name=nullptr)
 Creates a DocumentKey based on the given PDF file. More...
 
static void ExportPDF (CADModel const &in_cad_model, char const *in_file_name, ExportOptionsKit const &in_options)
 Performs a synchronous Publish export of the given CAD Model with the provided options to a given filename. More...
 
static void ExportPDF (KeyPathArray const &in_key_paths, char const *in_file_name, ExportOptionsKit const &in_options)
 Performs a synchronous Publish export of the given KeyPathArray with the provided options to a given filename. More...
 
static void ExportPDF (size_t in_count, KeyPath const in_key_paths[], char const *in_file_name, ExportOptionsKit const &in_options)
 Performs a synchronous Publish export of the given KeyPathArray with the provided options to a given filename. More...
 
static void ExportPDF (KeyPath const &in_key_path, char const *in_file_name, ExportOptionsKit const &in_options)
 Performs a synchronous Publish export of the given KeyPath with the provided options to a given filename. More...
 
static void ExportPDF (CADModel const &in_cad_model, KeyPathArray const &in_additional_key_paths, char const *in_file_name, ExportOptionsKit const &in_options)
 Performs a synchronous Publish export of the given CAD Model with the provided options to a given filename. More...
 
static void ExportPDF (CADModel const &in_cad_model, size_t in_count, KeyPath const in_additional_key_paths[], char const *in_file_name, ExportOptionsKit const &in_options)
 Performs a synchronous Publish export of the given CAD Model with the provided options to a given filename. More...
 
static void ExportPDF (AnnotationKit const &in_annotation, char const *in_file_name, ExportOptionsKit const &in_options)
 Performs a synchronous Publish export of the given AnnotationKit with the provided options to a given filename. More...
 
static void ExportPDF (DocumentKit const &in_document, char const *in_file_name, ExportOptionsKit const &in_options)
 Performs a synchronous Publish export of the given DocumentKit with the provided options to a given filename. More...
 
static void ExportPDF (DocumentKey const &in_document, char const *in_file_name)
 Performs a synchronous Publish export of the given DocumentKey to a given filename. More...
 
static void ExportHTML (CADModel const &in_cad_model, char const *in_file_name, char const *in_template_name, bool in_include_measurement_information)
 Performs a synchronous Publish export of the given CAD Model with the provided options to a given filename. More...
 
static void ExportHTML (KeyPathArray const &in_key_paths, char const *in_file_name, char const *in_template_name)
 Performs a synchronous Publish export of the given KeyPathArray with the provided options to a given filename. More...
 
static void ExportHTML (size_t in_count, KeyPath const in_key_paths[], char const *in_file_name, char const *in_template_name)
 Performs a synchronous Publish export of the given KeyPathArray with the provided options to a given filename. More...
 
static void ExportHTML (KeyPath const &in_key_path, char const *in_file_name, char const *in_template_name)
 Performs a synchronous Publish export of the given KeyPath with the provided options to a given filename. More...
 
static void ExportHTML (CADModel const &in_cad_model, KeyPathArray const &in_additional_key_paths, char const *in_file_name, char const *in_template_name, bool in_include_measurement_information)
 Performs a synchronous Publish export of the given CAD Model with the provided options to a given filename. More...
 
static void ExportHTML (CADModel const &in_cad_model, size_t in_count, KeyPath const in_additional_key_paths[], char const *in_file_name, char const *in_template_name, bool in_include_measurement_information)
 Performs a synchronous Publish export of the given CAD Model with the provided options to a given filename. More...
 

Private Member Functions

 File ()
 Private default constructor to prevent instantiation. More...
 

Detailed Description

The File class provides functions to export Model objects to 3D PDFs via Publish.

Constructor & Destructor Documentation

◆ File()

HPS::Publish::File::File ( )
private

Private default constructor to prevent instantiation.

Member Function Documentation

◆ CreateDocument()

static DocumentKey HPS::Publish::File::CreateDocument ( char const *  in_file_name = nullptr)
static

Creates a DocumentKey based on the given PDF file.

The returned object will allow direct interaction with the underlying in-memory copy of that PDF document and any pages in it. If no filename is specified, an empty PDF document will be created. The in-memory PDF document can be written to disk via the File::Export function.

Parameters
in_file_nameThe name of the PDF file from which to create an in-memory copy. Defaults to nullptr, which results in an empty in-memory PDF document.
Returns
A DocumentKey handle for the in-memory PDF document.

◆ ExportHTML() [1/6]

static void HPS::Publish::File::ExportHTML ( CADModel const &  in_cad_model,
char const *  in_file_name,
char const *  in_template_name,
bool  in_include_measurement_information 
)
static

Performs a synchronous Publish export of the given CAD Model with the provided options to a given filename.

Warning
This feature is only supported on 64bit builds of HOOPS Visualize. An InvalidOperationException will be thrown if this function is used on 32bit builds. This will create an HTML page using the provided template. An exception will be thrown if a problem is encountered during export.
Parameters
in_cad_modelThe CADModel containing the data to export.
in_file_nameThe name of the file to write the HTML data to. This filename should be a fully-qualified path, otherwise the export may fail.
in_template_nameThe name of HTML template to use during export.
in_include_measurement_informationWhether to retain information which will allow accurate measurements to be performed on the HTML data if the input CADModel was imported with BRep data.

◆ ExportHTML() [2/6]

static void HPS::Publish::File::ExportHTML ( KeyPathArray const &  in_key_paths,
char const *  in_file_name,
char const *  in_template_name 
)
static

Performs a synchronous Publish export of the given KeyPathArray with the provided options to a given filename.

Warning
This feature is only supported on 64bit builds of HOOPS Visualize. An InvalidOperationException will be thrown if this function is used on 32bit builds. This will create an HTML page using the provided template. An exception will be thrown if a problem is encountered during export.
Parameters
in_key_pathsThe KeyPaths containing the data to export.
in_file_nameThe name of the file to write the HTML data to. This filename should be a fully-qualified path, otherwise the export may fail.
in_template_nameThe name of HTML template to use during export.

◆ ExportHTML() [3/6]

static void HPS::Publish::File::ExportHTML ( size_t  in_count,
KeyPath const  in_key_paths[],
char const *  in_file_name,
char const *  in_template_name 
)
static

Performs a synchronous Publish export of the given KeyPathArray with the provided options to a given filename.

Warning
This feature is only supported on 64bit builds of HOOPS Visualize. An InvalidOperationException will be thrown if this function is used on 32bit builds. This will create an HTML page using the provided template. An exception will be thrown if a problem is encountered during export.
Parameters
in_countThe number of key paths in in_key_paths.
in_key_pathsThe KeyPaths containing the data to export.
in_file_nameThe name of the file to write the HTML data to. This filename should be a fully-qualified path, otherwise the export may fail.
in_template_nameThe name of HTML template to use during export.

◆ ExportHTML() [4/6]

static void HPS::Publish::File::ExportHTML ( KeyPath const &  in_key_path,
char const *  in_file_name,
char const *  in_template_name 
)
static

Performs a synchronous Publish export of the given KeyPath with the provided options to a given filename.

Warning
This feature is only supported on 64bit builds of HOOPS Visualize. An InvalidOperationException will be thrown if this function is used on 32bit builds. This will create an HTML page using the provided template. An exception will be thrown if a problem is encountered during export.
Parameters
in_key_pathThe KeyPath containing the data to export.
in_file_nameThe name of the file to write the HTML data to. This filename should be a fully-qualified path, otherwise the export may fail.
in_template_nameThe name of HTML template to use during export.

◆ ExportHTML() [5/6]

static void HPS::Publish::File::ExportHTML ( CADModel const &  in_cad_model,
KeyPathArray const &  in_additional_key_paths,
char const *  in_file_name,
char const *  in_template_name,
bool  in_include_measurement_information 
)
static

Performs a synchronous Publish export of the given CAD Model with the provided options to a given filename.

Warning
This feature is only supported on 64bit builds of HOOPS Visualize. An InvalidOperationException will be thrown if this function is used on 32bit builds. This will create an HTML page using the provided template. An exception will be thrown if a problem is encountered during export.
Parameters
in_cad_modelThe CADModel containing the data to export.
in_additional_key_pathsAn array of KeyPaths for which PRC data will be created and which will be added to in_cad_model during export. Use this parameter to specify non-Exchange data you have added to the scene which you want to export.
in_file_nameThe name of the file to write the HTML data to. This filename should be a fully-qualified path, otherwise the export may fail.
in_template_nameThe name of HTML template to use during export.
in_include_measurement_informationWhether to retain information which will allow accurate measurements to be performed on the HTML data if the input CADModel was imported with BRep data.

◆ ExportHTML() [6/6]

static void HPS::Publish::File::ExportHTML ( CADModel const &  in_cad_model,
size_t  in_count,
KeyPath const  in_additional_key_paths[],
char const *  in_file_name,
char const *  in_template_name,
bool  in_include_measurement_information 
)
static

Performs a synchronous Publish export of the given CAD Model with the provided options to a given filename.

Warning
This feature is only supported on 64bit builds of HOOPS Visualize. An InvalidOperationException will be thrown if this function is used on 32bit builds. This will create an HTML page using the provided template. An exception will be thrown if a problem is encountered during export.
Parameters
in_cad_modelThe CADModel containing the data to export.
in_countThe size of in_additional_key_paths.
in_additional_key_pathsAn array of KeyPaths for which PRC data will be created and which will be added to in_cad_model during export. Use this parameter to specify non-Exchange data you have added to the scene which you want to export.
in_file_nameThe name of the file to write the HTML data to. This filename should be a fully-qualified path, otherwise the export may fail.
in_template_nameThe name of HTML template to use during export.
in_include_measurement_informationWhether to retain information which will allow accurate measurements to be performed on the HTML data if the input CADModel was imported with BRep data.

◆ ExportPDF() [1/9]

static void HPS::Publish::File::ExportPDF ( CADModel const &  in_cad_model,
char const *  in_file_name,
ExportOptionsKit const &  in_options 
)
static

Performs a synchronous Publish export of the given CAD Model with the provided options to a given filename.

This will create a single page PDF document with a single 3D annotation. An exception will be thrown if a problem is encountered during export.

Parameters
in_cad_modelThe CADModel containing the data to export.
in_file_nameThe name of the file to write the 3D PDF data to. This filename should be a fully-qualified path, otherwise the export may fail.
in_optionsThe options controlling the export of the 3D PDF data.

◆ ExportPDF() [2/9]

static void HPS::Publish::File::ExportPDF ( KeyPathArray const &  in_key_paths,
char const *  in_file_name,
ExportOptionsKit const &  in_options 
)
static

Performs a synchronous Publish export of the given KeyPathArray with the provided options to a given filename.

This will create a single page PDF document with a single 3D annotation. An exception will be thrown if a problem is encountered during export.

Parameters
in_key_pathsThe KeyPaths containing the data to export.
in_file_nameThe name of the file to write the 3D PDF data to. This filename should be a fully-qualified path, otherwise the export may fail.
in_optionsThe options controlling the export of the 3D PDF data.

◆ ExportPDF() [3/9]

static void HPS::Publish::File::ExportPDF ( size_t  in_count,
KeyPath const  in_key_paths[],
char const *  in_file_name,
ExportOptionsKit const &  in_options 
)
static

Performs a synchronous Publish export of the given KeyPathArray with the provided options to a given filename.

This will create a single page PDF document with a single 3D annotation. An exception will be thrown if a problem is encountered during export.

Parameters
in_countThe number of key paths in in_key_paths.
in_key_pathsThe KeyPaths containing the data to export.
in_file_nameThe name of the file to write the 3D PDF data to. This filename should be a fully-qualified path, otherwise the export may fail.
in_optionsThe options controlling the export of the 3D PDF data.

◆ ExportPDF() [4/9]

static void HPS::Publish::File::ExportPDF ( KeyPath const &  in_key_path,
char const *  in_file_name,
ExportOptionsKit const &  in_options 
)
static

Performs a synchronous Publish export of the given KeyPath with the provided options to a given filename.

This will create a single page PDF document with a single 3D annotation. An exception will be thrown if a problem is encountered during export.

Parameters
in_key_pathThe KeyPath containing the data to export.
in_file_nameThe name of the file to write the 3D PDF data to. This filename should be a fully-qualified path, otherwise the export may fail.
in_optionsThe options controlling the export of the 3D PDF data.

◆ ExportPDF() [5/9]

static void HPS::Publish::File::ExportPDF ( CADModel const &  in_cad_model,
KeyPathArray const &  in_additional_key_paths,
char const *  in_file_name,
ExportOptionsKit const &  in_options 
)
static

Performs a synchronous Publish export of the given CAD Model with the provided options to a given filename.

This will create a single page PDF document with a single 3D annotation. An exception will be thrown if a problem is encountered during export.

Parameters
in_cad_modelThe CADModel containing the data to export.
in_additional_key_pathsAn array of KeyPaths for which PRC data will be created and which will be added to in_cad_model during export. Use this parameter to specify non-Exchange data you have added to the scene which you want to export.
in_file_nameThe name of the file to write the 3D PDF data to. This filename should be a fully-qualified path, otherwise the export may fail.
in_optionsThe options controlling the export of the 3D PDF data.

◆ ExportPDF() [6/9]

static void HPS::Publish::File::ExportPDF ( CADModel const &  in_cad_model,
size_t  in_count,
KeyPath const  in_additional_key_paths[],
char const *  in_file_name,
ExportOptionsKit const &  in_options 
)
static

Performs a synchronous Publish export of the given CAD Model with the provided options to a given filename.

This will create a single page PDF document with a single 3D annotation. An exception will be thrown if a problem is encountered during export.

Parameters
in_cad_modelThe CADModel containing the data to export.
in_countThe size of in_additional_key_paths.
in_additional_key_pathsAn array of KeyPaths for which PRC data will be created and which will be added to in_cad_model during export. Use this parameter to specify non-Exchange data you have added to the scene which you want to export.
in_file_nameThe name of the file to write the 3D PDF data to. This filename should be a fully-qualified path, otherwise the export may fail.
in_optionsThe options controlling the export of the 3D PDF data.

◆ ExportPDF() [7/9]

static void HPS::Publish::File::ExportPDF ( AnnotationKit const &  in_annotation,
char const *  in_file_name,
ExportOptionsKit const &  in_options 
)
static

Performs a synchronous Publish export of the given AnnotationKit with the provided options to a given filename.

This will create a single page PDF document with a single 3D annotation. An exception will be thrown if a problem is encountered during export.

Parameters
in_annotationThe AnnotationKit containing the data to export. If the Model in the source SprocketPath for the AnnotationKit corresponds to a CADModel which was imported via Exchange, the underlying Exchange data for the CADModel will be embedded in the PDF, otherwise, the 3D data will be generated from the tessellation in the Visualize scene graph for the Model.
in_file_nameThe name of the file to write the 3D PDF data to. This filename should be a fully-qualified path, otherwise the export may fail.
in_optionsThe options controlling the export of the 3D PDF data.

◆ ExportPDF() [8/9]

static void HPS::Publish::File::ExportPDF ( DocumentKit const &  in_document,
char const *  in_file_name,
ExportOptionsKit const &  in_options 
)
static

Performs a synchronous Publish export of the given DocumentKit with the provided options to a given filename.

This will create a PDF document based on the DocumentKit. An exception will be thrown if a problem is encountered during export.

Parameters
in_documentThe DocumentKit containing the data to export. If any Model in the source SprocketPath for any AnnotationKit in the DocumentKit corresponds to a CADModel which was imported via Exchange, the underlying Exchange data for the CADModel will be embedded in the PDF, otherwise, the 3D data will be generated from the tessellation in the Visualize scene graph for the Model.
in_file_nameThe name of the file to write the 3D PDF data to. This filename should be a fully-qualified path, otherwise the export may fail.
in_optionsThe options controlling the export of the 3D PDF data.

◆ ExportPDF() [9/9]

static void HPS::Publish::File::ExportPDF ( DocumentKey const &  in_document,
char const *  in_file_name 
)
static

Performs a synchronous Publish export of the given DocumentKey to a given filename.

This will not close the PDF document underlying the DocumentKey, rather it will just create a copy of it on disk. The DocumentKey can still be used after this call to interact with the in-memory PDF document.

Parameters
in_documentThe DocumentKey from which to create a PDF file on disk.
in_file_nameThe name of the file to write the 3D PDF data to. This filename should be a fully-qualified path, otherwise the export may fail.

The documentation for this class was generated from the following file: