Developer's Guide > Get Started with Civil SDK > Using Sample Applications > ExTcSurfaceTin Sample Application
ExTcSurfaceTin Sample Application

Summary

ODA Product: Civil SDK
Sample Name: ExTcSurfaceTin
Source Code Location: <INSTALL_DIR>/Civil/Examples/ExTcSurfaceTin

Description

The ExTcSurfaceTin sample application demonstrates creation of a TIN surface. It creates surfaces from drawing objects contained in the input drawing. There are several constructors of definition, for creation surfaces from an array of OdDbLine, OdDbPoint, OdDbBlockReference, OdDbFace, OdDbMText, etc. Lines array is used as the example in this sample application.

It illustrates:

  • Initialization of ODA services.
  • Creation of a TIN surface.
  • Assert function customization.
  • Reading/writing drawing files.

Creation of a surface from a points file requires a specific format manager, which parses the input file. There are several built in formats:

  • ENZ (comma delimited)
  • XYZ_LIDAR Classification (comma delimited)
  • NEZ (space delimited)
  • NEZ (comma delimited)
  • PENZ (space delimited)
  • XYZ_LIDAR Classification (space delimited)
  • PENZ (comma delimited)
  • PENZD (space delimited)
  • XYZ_Intensity (comma delimited)
  • PENZD (comma delimited)
  • PNE (space delimited)
  • XYZ_Intensity (space delimited)
  • PNE (comma delimited)
  • PNEZ (space delimited)
  • XYZ_RGB (comma delimited)
  • PNEZ (comma delimited)
  • PNEZD (space delimited)
  • XYZ_RGB (space delimited)
  • PNEZD (comma delimited)

Run Sample Application

To run the ExTcSurfaceTin sample application, please do the following:

  1. Open the terminal and go to the directory where the sample binary file is built:
    • For Windows: <INSTALL_DIR>\exe\<PLATFORM_NAME>\
    • For Non-Windows OS: <INSTALL_DIR>/bin/<PLATFORM_NAME>/
    <INSTALL_DIR> is a directory where you unpacked the Civil SDK archive.
    To determine your <PLATFORM_NAME> parameter, please see the ODA Platform Naming Conventions section in the Downloading Civil SDK topic.
  2. Run the sample with appropriate arguments:
    ExTcSurfaceTin <mode> <source file> <target file> [points file]
mode Defines a data source for surface creation or the operation mode. Can be one of the following:
  • -s — create surface from points and perform common operation.
  • -f — create surface from points file (path to file is required).
  • -c — create surface from contours.
  • -o — create surface from drawing objects (OdDbLine).
  • -v — print volume surface info.
source file Full path to a drawing file to read input data from.
target file Full path to a drawing file to write output data to.
points file Optional. Applicable to the "-f" mode only. Full path to a points file.

If the application executed properly, the target file will appear with no additional messages displayed, except the "-s" mode. In the "-s" mode information about source file objects will be displayed. In case you get the "usage" message, check the parameters. An error message indicates problems with the source file.

See also:

Using Sample Applications

Copyright © 2002 – 2021. Open Design Alliance. All rights reserved.