ModraUp Ruby API Documentation Ruby API Reference

Class: Layout::ConnectionPoint

Inherits:
Object
  • Object
show all

Overview

Association between dimensions or leaders and model points within a viewport. After association, the annotations automatically follow when the viewport is moved, scaled, or the model is altered.

Note: ModraUp extension. Only supports 'Parallel Projection Viewport + Model Point'; LayOut page object connection points are not supported.

Examples:

# cp = Layout::ConnectionPoint.new(viewport, Geom::Point3d.new(0, 0, 0))

Class Method Summary # collapse

Instance Method Summary # collapse

Class Method Details

Layout::ConnectionPoint.new(viewport, point) ⇒ Layout::ConnectionPoint

A model point in a viewport.

Parameters:

  • viewport (Layout::SketchUpModel)
  • point (Geom::Point3d) Model point in inches. A vertex of the component can be used directly.

Returns:

  • (Layout::ConnectionPoint)

Raises:

  • [ArgumentError] The first parameter is not a viewport.

Examples:

v = Layout::SketchUpModel.new(ModraUp.active_model.pages.add, Geom::Bounds2d.new(1, 1, 4, 3))
Layout::ConnectionPoint.new(v, Geom::Point3d.new(0, 0, 0))

Instance Method Details

connection_point.entity ⇒ Layout::SketchUpModel

Associated viewport.

Returns:

  • (Layout::SketchUpModel)
Note: ModraUp extension.

Examples:

v = Layout::SketchUpModel.new(ModraUp.active_model.pages.add, Geom::Bounds2d.new(1, 1, 4, 3))
Layout::ConnectionPoint.new(v, ORIGIN).entity == v  #=> true

connection_point.point ⇒ Geom::Point3d

Associated model point.

Returns:

  • (Geom::Point3d)
Note: ModraUp extension.

Examples:

v = Layout::SketchUpModel.new(ModraUp.active_model.pages.add, Geom::Bounds2d.new(1, 1, 4, 3))
Layout::ConnectionPoint.new(v, ORIGIN).point