sketchucation logo sketchucation
    • Login
    1. Home
    2. mtriple
    3. Posts
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 5
    • Posts 31
    • Groups 1

    Posts

    Recent Best Controversial
    • RE: SketchyPhysics3 dev

      good news :: i found alot of errors . hehe

      alot of name error E.X "NewtonServer.createCollision" >> "NewtonServer.CreateCollision"

      C for c ,loooool
      its look like ruby 1.8 wasnt case sensitive.

      now thiss the last unfixed errors :

      1- "SketchyPhysicsTool.rb" line:1672
      UI.messagebox("Error resetting the simulation:"+" : "+$!+" \n"+e.backtrace[0],MB_OK, "Error")
      #<TypeError: no implicit conversion of NoMethodError into String> `+'

      2- "sound.rb" line:75 (in my code , its maybe different line in urs)
      @midi=midiInterface()
      #(no method )

      3- "sound.rb" line:77
      SDL.SDL_Init(0x00000010)
      #String doesn't compile: undefined method SDL_Init' for #<MSketchyPhysics3::SPSounds:0xc381498>#<NoMethodError: undefined method SDL_Init' for #MSketchyPhysics3::SPSounds:0xc381498>

      i passed this one by adding next code to the top of "class SPSounds" line:65 >>
      also by changing "SDL.SDL_Init(0x00000010)" to "SDL_Init(0x00000010)"

      extend DL;;Importer
            dlload(Sketchup.find_support_file("SDL.dll","Tools/Sketchyphysics3/sdl/"))
            extern "int SDL_Init(int)"
      

      4- the control panel appears when play method is called ( i feel good )

      http://i375.photobucket.com/albums/oo199/mtriple1/Untitled_zps51d94a19.jpg

      u can see in the pic "bodySetMagnet" error it has been fixed "b" to "B"
      but this error ::
      Error: #<NoMethodError: undefined method `to_ptr' for #String:0xe07b208>
      i found that "to_ptr" is exist in both 1.8 and 1.9 but look at there defined:
      inside "dl" - "struct.rb"
      in 1.9 >>> define_method(:to_ptr){ @entity } #in an other method
      in 1.8 >>> def to_ptr
      return @ptr
      end
      so i think the invoking maybe deffer.

      also same type error "to_a" line:1220 "SketchyPhysicsTool.rb"

      5- Error: #<NoMethodError: undefined method animation' for #<Sketchup::View:0xc1d6520>> sketchyphysicstool.rb:1569:in draw'


      last plugin files :: https://www.dropbox.com/s/xp1fuzsanrsjomr/sp%20fix.zip

      posted in SketchyPhysics
      mtripleM
      mtriple
    • RE: SketchyPhysics3 dev

      thx alot, i was looking through the code, i found that this "WinInput.dll" error is not exist, i dont know how this happen but :
      "class JoyInput" in original file is "module JoyInput".
      now its ok.
      i compared all files. thiss the only change by mistake.

      thiss the codes line i changed ( the code that im not sure its valid change)

      JointTool.rb :432

      SketchyPhysicsTool.rb :1626 :1630 :1631 :1672

      sound.rb :76 :74


      and for "extern "void* SDL_RWFromMem(void*,int)"
      commenting the line is only solution, i analyzed "SDL_mixer.dll" :
      SDL_RWFromMem is not exist inside dll file.
      i found thees methods "SDL_RWFromFile" "SDL_RWFromFP" only.
      i think its a method related to MAC version.

      posted in SketchyPhysics
      mtripleM
      mtriple
    • RE: SketchyPhysics3 dev

      i think i did every thing i could,
      here is last files, changes and last errors:

      pluginfiles : https://www.dropbox.com/s/wsna08ts859s3ss/sp.zip

      1- i added "The proper way to check operating system" as u said
      but will not work on sk7 or 8 or 2013 , because of plugins folder name "Tools"
      if statement should be added for each: (find support file)

      2- the error that related to "JoyInput" class, i passed that error at loading by commenting "extern" lines . error type (method or symbol not exist)

      http://i375.photobucket.com/albums/oo199/mtriple1/1_zps100bf133.jpg

      • the errors line :

      http://i375.photobucket.com/albums/oo199/mtriple1/2_zpsc9081d71.jpg

      • i wanted to know where is the problem so i used 'ida' to analyze the dll file "WinInput.dll"
        the methods was found and has the same type, so all these problem because of the method "extern"

      http://i375.photobucket.com/albums/oo199/mtriple1/3_zpsa3c8c1b0.jpg

      3- new error and the last loading error appears, inside "sound.rb" line :22
      extern "void* SDL_RWFromMem(void*,int)"
      smae problem (method or symbol not exist), passed by commenting the line.

      http://i375.photobucket.com/albums/oo199/mtriple1/4_zpscd21dbeb.jpg

      4- now last run : no loading error was found :

      http://i375.photobucket.com/albums/oo199/mtriple1/5_zps61ca76f7.jpg

      but last 2 error still exist, (anyway the 4th toolbar appears)
      while using the "play" command the same "JoyInput" class error shows up

      http://i375.photobucket.com/albums/oo199/mtriple1/6_zps8042c968.jpg

      posted in SketchyPhysics
      mtripleM
      mtriple
    • RE: SketchyPhysics3 dev

      if u can help me i need link or reference to learn about ruby and how it deals with api also with dll files .
      btw so far idk what API is . lol all i know thats a protected file that has method we need to use.
      i wanna start dev plugins.
      btw if u need any sourcecode for plugins just tell me. ^_*

      posted in SketchyPhysics
      mtripleM
      mtriple
    • RE: SketchyPhysics3 dev

      i added ur fix its good, now i found new one, but dont werry we are close .
      "BOOL"
      extern "BOOL SetCursorPos(int,int)" inside "input.rb line:25

      the problem is that "BOOL" is exist inside "types.rb" in "dl"
      but there is method "parse_signature" inside "cparser.rb" in "dl" which is calles by "extern" inside "import.rb" in "dl" --- now this method "parse_signature" calls "parse_ctype" which has a array of types and "BOOL" is not exist there .
      i passed this problem (i dont know if its right ) by changing "BOOL" to "char"

      extern "BOOL SetCursorPos(int,int)" >>>>> extern "char SetCursorPos(int,int)"


      guess what im now able to create joint items also i used join connector::

      http://i375.photobucket.com/albums/oo199/mtriple1/Untitled_zps7d7666d7.jpg

      but there is no action, i found error :
      NoMethodError: undefined method `module_function' for JoyInput:Class>

      "input.rb" line:141
      extern "int initInput()" # here i think this method is changed or it needs an arguments.
      extern "int readJoystick(void*)"
      extern "void freeInput()"

      posted in SketchyPhysics
      mtripleM
      mtriple
    • RE: SketchyPhysics3 dev

      i did new staff :
      1- i found that 126 error was my false error, i was comparing files of su2014 and su7 . there is 2 files named "win32api.so" one inside "Tools" other one inside plugin folder and they has different size '20' '7'. i fixed it.
      2-i replaced the "dl" folder with all content with ruby 2 "dl" folder. then i was able to fix problem with "Newton.rb" , "Importabled" changes to "Importer"
      E.x >>> extend DL::Importabled >> to extend DL::Importer

      but i found new error lol look like thiss endless ,
      in old "import.rb" inside 'dl' there was a methode "callback" same as "extern"
      and now after replacing the files this error comes up >
      <NoMethodError: undefined method `callback'
      COLLIDE_CALLBACK = (callback "void doCollideCallback(body*,body*,float,float,float,float)") # thiss the line
      i need to know if this method is replaced with another one or removed totally?

      posted in SketchyPhysics
      mtripleM
      mtriple
    • RE: SketchyPhysics3 dev

      this s the newest update :
      1- some if statement use <<if PLATFORM=="i386-mingw32" >> that was working in su7 cuz its return same result as RUBY_PLATFORM -- so change all PLATFORM to RUBY_PLATFORM .
      inspector dialog working now.

      http://i375.photobucket.com/albums/oo199/mtriple1/Untitled_zps7e5f7a21.jpg


      so for now i think 2 toolbar working fine. last one need lot of work.
      as u can see here the method is called and part of it is workin but there is an error some where >

      http://i375.photobucket.com/albums/oo199/mtriple1/qUntitled_zps1b23a241.jpg

      next step analyzing the whole codes to know how this things works i think i will see in year

      i tried a change but i cannt see any effect : i added the last api to folder
      and inside "input.rb" i added :

      if RUBY_VERSION.to_f < 1.9
          require File.join(File.dirname(__FILE__), 'ruby18/win32/api')
          elsif RUBY_VERSION.to_f < 2.0
          require File.join(File.dirname(__FILE__), 'ruby19/win32/api')
          else
          require 'rbconfig'
          if RbConfig;;CONFIG['arch'] =~ /x64/i
          require File.join(File.dirname(__FILE__), 'ruby2_64/win32/api')
          else
          require File.join(File.dirname(__FILE__), 'ruby2_32/win32/api')
          end
          end
      

      i found this code with api update > ^_^ even if i dont know what does it mean

      posted in SketchyPhysics
      mtripleM
      mtriple
    • RE: SketchyPhysics3 dev

      well i didnt know about ur plugin, msphysics wow look awesome, i tested it .its much better plugin . hope u finish it soon ,
      i see that u r creating opensource that cool dude, im noob but if u need any hand just tell me .
      i will try my best for SP, its the way i learn, i just brought back compospray to 2014, and its feel goood .

      posted in SketchyPhysics
      mtripleM
      mtriple
    • SketchyPhysics3 dev

      if any coder is interesting with updating SketchyPhysics3 to work with 2014 plz we need u here .i am noob BTW.

      i did some analyze to the codes, and i did some changes:

      1- change support file "plugins" to "Tools" in all "rb" files. now 2 toolbar appears, also the functions can be called.( Sketchy Physics toolbar - Sketchy Physics joint toolbar).
      2- copy the file "SketchySolids.rb" from 'SketchyPhysics3' folder to 'Tools' folder. the 3rd toolbar appears and working great no error. (Sketchy Solids toolbar).
      3- error with "module SketchyRender" inside 'Newton.rb' line :75 .

      if(PLATFORM=="i386-mswin32") changed to >>>>> if(RUBY_PLATFORM=="i386-mswin32")
      the error passed\fixed.


      now i found some problem i couldn't deal with :
      1- i think there is problem with analyzing the "OS" and the "ruby version" .
      for example ::
      result for "RUBY_PLATFORM" in sketchup 7 is"i386-mswin32"
      but in sketchup 2014 is "i386-mingw32"
      **** i tried to change all "i386-mswin32" to "i386-mingw32" in all "rb" files, but nothing happened because the error no 3 :'126'.
      2- i think this file should be upgraded : "win32api.so".
      %(#FF4000)[3- there is problem when dealing with 'DLL' files , file "import.rb" inside 'dl' folder.
      <RuntimeError: can't find the symbol init'> line :126 .] %(#00BF00)[#the code for error 3 === " # example: # symbol "foo_value" # symbol "foo_func", "IIP"] %(#FF40BF)[def symbool(name, ty = nil) sym = nil @LIBS.each{|lib| begin if( ty ) sym = lib[name, ty] else sym = lib[name] end rescue next end } if( !sym ) raise(RuntimeError, "can't find the symbol #{name}'")] # line: 126 , here is the error 3
      %(#FF40BF)[end
      return sym
      end
      "]

      posted in SketchyPhysics
      mtripleM
      mtriple
    • RE: [Plugin] Compo Spray 1.4.2 Updated

      you are welcome my friend, iam just looking for pro coder to help me with sketchyphisics to work on 2014 cuz im noob, if any one can help plz.

      posted in Plugins
      mtripleM
      mtriple
    • RE: [plugin] Updated (Dec. 30, 2011) hook Procedure

      im trying to fix sketchy physics for sketchup 32 2014 based on 64 os , i think i did good so far but the plugin still dont work, the tools appear , but Errors comes up :::
      i think its something with misunderstanding of os type :

      Error Loading File sketchyphysics.rb
      Error; #<RuntimeError; can't find the symbol `init'>
      C;/Program Files (x86)/SketchUp/SketchUp 2014/Tools/SketchyPhysics3/dl/import.rb;126;in `symbol'
      C;/Program Files (x86)/SketchUp/SketchUp 2014/Tools/SketchyPhysics3/dl/import.rb;145;in `import'
      C;/Program Files (x86)/SketchUp/SketchUp 2014/Tools/SketchyPhysics3/dl/import.rb;61;in `extern'
      C;/Program Files (x86)/SketchUp/SketchUp 2014/Tools/SketchyPhysics3/newton.rb;95;in `<module;NewtonServer>'
      C;/Program Files (x86)/SketchUp/SketchUp 2014/Tools/SketchyPhysics3/newton.rb;84;in `<top (required)>'
      C;/Program Files (x86)/SketchUp/SketchUp 2014/Tools/sketchyphysics.rb;27;in `load'
      C;/Program Files (x86)/SketchUp/SketchUp 2014/Tools/sketchyphysics.rb;27;in `LoadSketchyPhysics3'
      C;/Program Files (x86)/SketchUp/SketchUp 2014/Tools/sketchyphysics.rb;62;in `doLoad'
      C;/Program Files (x86)/SketchUp/SketchUp 2014/Tools/sketchyphysics.rb;138;in `<top (required)>'
      

      hope u can help me

      posted in Plugins
      mtripleM
      mtriple
    • 1
    • 2
    • 2 / 2