lib/measures/tbd/resources/psi.rb
##
# Return Topolys vertices and a Topolys wire from Topolys points. As
# a side effect, it will - if successful - also populate the Topolys
# model with the vertices and wire.
#
# @param [Topolys::Model] model An OS model
# @param [Array] points A 1D array of 3D Topolys points (min 2x)
#
# @return [Array] Returns a 1D array of 3D Topolys vertices
# @return [Topolys::Wire] Returns a corresponding Topolys wire
Return Topolys vertices and a Topolys wire from Topolys points. As
a side effect, it will - if successful - also populate the Topolys
model with the vertices and wire.
Return Topolys vertices and a Topolys wire from Topolys points . As a side effect it will - if successful - also populate the Topolys model with the vertices and wire .
def topolysObjects(model, points)
  unless model && points
    TBD.log(TBD::DEBUG,
      "Invalid Topolys (objects) arguments - skipping")
    return nil, nil
  end
  unless model.is_a?(Topolys::Model)
    TBD.log(TBD::DEBUG,
      "#{model.class}? expected Topolys model (objects) - skipping")
    return nil, nil
  end
  unless points.is_a?(Array)
    TBD.log(TBD::DEBUG,
      "#{points.class}? expected Topolys points Array (objects) - skipping")
    return nil, nil
  end
  unless points.size > 2
    TBD.log(TBD::DEBUG,
      "#{points.size}? expected +2 Topolys points (objects) - skipping")
    return nil, nil
  end
  vertices = model.get_vertices(points)
  wire = model.get_wire(vertices)
  return vertices, wire
end
def topolysObjects ( model , points ) unless model && points TBD . log ( TBD :: DEBUG , "Invalid Topolys (objects) arguments - skipping" ) return nil , nil end unless model . is_a? ( Topolys :: Model ) TBD . log ( TBD :: DEBUG , "#{model.class}? expected Topolys model (objects) - skipping" ) return nil , nil end unless points . is_a? ( Array ) TBD . log ( TBD :: DEBUG , "#{points.class}? expected Topolys points Array (objects) - skipping" ) return nil , nil end unless points . size > 2 TBD . log ( TBD :: DEBUG , "#{points.size}? expected +2 Topolys points (objects) - skipping" ) return nil , nil end vertices = model . get_vertices ( points ) wire = model . get_wire ( vertices ) return vertices , wire end
Return Topolys vertices and a Topolys wire from Topolys points.
Return Topolys vertices and a Topolys wire from Topolys points .
Returns a 1D array of 3D Topolys vertices
Returns a 1D array of 3D Topolys vertices
Array
Returns a corresponding Topolys wire
Returns a corresponding Topolys wire
Topolys::Wire
model
points
points A 1D array of 3D Topolys points (min 2x)
points A 1D array of 3D Topolys points ( min 2x )