All Cadcorp SIS API Methods

GetGeomSelfIntersection Method

Description

Gets the position of self-intersection of the geometry of the current open Item.

Syntax

Visual Basic
Public Function GetGeomSelfIntersection( _
   ByVal nGeom As Long, _
   ByVal arclenStart As Double _
) As Double

Parameters

nGeom
The index of the geometry component starting at 0.
 
arclenStart
The length along the geometry component from which to start the search. Use -1.0 to search from the start of the geometry.

Return Type

The distance along the geometry component of any self-intersection, or –1.0 if no self-intersection was found. This method returns 0.0 if any error occurs. Any error can be queried from the ASysVarExecError system variable.

Remarks

  • Use GetNumGeom to get the number of geometry components in an Item.
  • Items such as blocks, groups, MultiLineStrings, and so on, can be made up of multiple geometry. Therefore the value of nGeom can be greater than 0. Items such as LineString items, polygons, symbols, and so on, are made by a single piece of geometry. Therefore the value would be 0.
  • The arclenStart argument is useful for geometry which passes through a position more than once, e.g. a figure-of-eight. To handle this situation, call this method repeatedly, using -1.0 for the arclenStart argument for the first call, and the returned value for each subsequent call, until -1.0 is returned.

This method will return 0.0 if any error occurs. Any error can be queried from the _ExecError& system variable.

Available: GEO D OD OM SISpy

Group:

Example

sis.GetGeomSelfIntersection(0, -1.0)

Evaluates the position of the first self-intersection of a single piece of geometry, if any.