OpenCascade.js
API ReferenceDataExchangeTKDEPLY

RWPly

OCCT package RWPly: RWPly_CafWriter, RWPly_PlyWriterContext.

RWPly_CafWriter

PLY writer context from XCAF document.

Constructors(1)

Static methods(1)

Instance methods(20)

  • Return transformation from OCCT to PLY coordinate system.

  • Return transformation from OCCT to PLY coordinate system.

  • Set transformation from OCCT to PLY coordinate system.

    Parameters (1)
    • theConverter
  • Return default material definition to be used for nodes with only color defined.

  • Set default material definition to be used for nodes with only color defined.

    Parameters (1)
    • theStyle
  • Return TRUE if vertex position should be stored with double floating point precision; FALSE by default.

  • SetDoublePrecision(theDoublePrec: boolean): void

    Set if vertex position should be stored with double floating point precision.

    Parameters (1)
    • theDoublePrec
  • HasNormals(): boolean

    Return TRUE if normals should be written; TRUE by default.

  • SetNormals(theHasNormals: boolean): void

    Set if normals are defined.

    Parameters (1)
    • theHasNormals
  • HasTexCoords(): boolean

    Return TRUE if UV / texture coordinates should be written; FALSE by default.

  • SetTexCoords(theHasTexCoords: boolean): void

    Set if UV / texture coordinates should be written.

    Parameters (1)
    • theHasTexCoords
  • HasColors(): boolean

    Return TRUE if point colors should be written; TRUE by default.

  • SetColors(theToWrite: boolean): void

    Set if point colors should be written.

    Parameters (1)
    • theToWrite
  • HasPartId(): boolean

    Return TRUE if part Id should be written as element attribute; TRUE by default.

  • SetPartId(theSurfId: boolean): void

    Set if part Id should be written as element attribute; FALSE by default. Cannot be combined with HasFaceId().

    Parameters (1)
    • theSurfId
  • HasFaceId(): boolean

    Return TRUE if face Id should be written as element attribute; FALSE by default.

  • SetFaceId(theSurfId: boolean): void

    Set if face Id should be written as element attribute; FALSE by default. Cannot be combined with HasPartId().

    Parameters (1)
    • theSurfId
  • Perform(theDocument: TDocStd_Document, theRootLabels: NCollection_Sequence_TDF_Label, theLabelFilter: NCollection_Map_TCollection_AsciiString, theFileInfo: any, theProgress: Message_ProgressRange): boolean

    Write PLY file and associated MTL material file. Triangulation data should be precomputed within shapes!

    Parameters (5)
    • theDocument
      input document
    • theRootLabels
      list of root shapes to export
    • theLabelFilter
      optional filter with document nodes to export, with keys defined by XCAFPrs_DocumentExplorer::DefineChildId() and filled recursively (leaves and parent assembly nodes at all levels); when not NULL, all nodes not included into the map will be ignored
    • theFileInfo
      map with file metadata to put into PLY header section
    • theProgress
      optional progress indicator
    Returns

    FALSE on file writing failure

  • Perform(theDocument: TDocStd_Document, theFileInfo: any, theProgress: Message_ProgressRange): boolean

    Write PLY file and associated MTL material file. Triangulation data should be precomputed within shapes!

    Parameters (3)
    • theDocument
      input document
    • theFileInfo
      map with file metadata to put into PLY header section
    • theProgress
      optional progress indicator
    Returns

    FALSE on file writing failure

RWPly_PlyWriterContext

Auxiliary low-level tool writing PLY file.

Constructors(1)

Instance methods(19)