sketchucation logo sketchucation
    • Login
    1. Home
    2. steven-arts
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    🛣️ Road Profile Builder | Generate roads, curbs and pavements easily Download
    S
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 0
    • Posts 1
    • Groups 1

    steven-arts

    @steven-arts

    0
    Reputation
    1
    Profile views
    1
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    steven-arts Unfollow Follow
    registered-users

    Latest posts made by steven-arts

    • RE: [Plugin] SketchyFFD (Classic)

      Hi Chriss,

      it really makes fun to work with FFD! I looked at your code and found the factorial function where you mentioned to encrease performance by adding a table for factorials. I made it dynamic and it boosts your code! Just replace the section with:

      
      #used by calcBernstein. could be replaced by a table since in 
      #this application n is never more than 3 (number of control points).
      $fTable = []
      def factorial(n)
          sum = $fTable.rassoc(n)
          if sum
          	return sum[0]
          else
      	sum = 1
      	sum.upto(n) { |i| sum *= i }
      	$fTable << [sum, n]
      	return sum
          end
      end
      

      Ciao, Stefan

      posted in Plugins
      S
      steven-arts