123456789_123456789_123456789_123456789_123456789_

Class: Sketchup::CRSMapUnit

Relationships
Inherits: Object

Overview

The CRSMapUnit class represents a length unit and the conversion factor from that unit to meters.

Version:

  • SketchUp 2027.0

Constant Summary

Class Method Summary

Instance Method Summary

Constructor Details

.new(name, conversion) ⇒ CRSMapUnit

Creates a CRSMapUnit object.

Examples:

map_unit = Sketchup::CRSMapUnit.new("METRE", 1.0)

Parameters:

  • name (String)
  • conversion (Float)

Raises:

Version:

  • SketchUp 2027.0

Instance Method Details

#==(other) ⇒ Boolean

The #== method returns whether two CRSMapUnit are equal within tolerance.

Parameters:

  • other (CRSMapUnit)

Version:

  • SketchUp 2027.0

#conversion ⇒ Float

The #conversion method is used to retrieve the conversion factor between this map unit and meters.

Version:

  • SketchUp 2027.0

#inspect ⇒ String

The #inspect method returns a string representation of the CRSMapUnit.

Version:

  • SketchUp 2027.0

#name ⇒ String

Note:

For best interoperability with other BIM and GIS software this should follow the IFC

The #name method is used to retrieve the name of the CRSMapUnit.

standard.

Version:

  • SketchUp 2027.0

#to_s ⇒ String

The #to_s method returns a string containing a human-readable representation of the CRSMapUnit.

Version:

  • SketchUp 2027.0