src/jwm_draw_framing/draw_framing.rb
## Methods for manipulating arrays of points 
Methods for manipulating arrays of points
Methods for manipulating arrays of points
def flip(axis)
    centrepoint = Geom::Point3d.linear_combination(0.5, @contents.min, 0.5, @contents.max)
    puts "centrepoint = " + centrepoint.to_s
    temp = self.clone
    flip = Geom::Transformation.scaling(centrepoint, -axis.x,-axis.y,-axis.z)
    @contents.each_index {|i| temp[i] = @contents[i].transform(flip)}
    return temp
  end
def flip ( axis ) centrepoint = Geom :: Point3d . linear_combination ( 0.5 , @contents . min , 0.5 , @contents . max ) puts "centrepoint = " + centrepoint . to_s temp = self . clone flip = Geom :: Transformation . scaling ( centrepoint , - axis . x , - axis . y , - axis . z ) @contents . each_index { | i | temp [ i ] = @contents [ i ] . transform ( flip ) } return temp end
Methods for manipulating arrays of points
Methods for manipulating arrays of points
## Flip the array along the specified axis about its centre ## Find the centre ## Scale the array around the centrepoint to reverse the values along specified axis
axis
<not_specific>