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

    Topics

    • bomastudioB

      HtmlDialog position

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      1
      0 Votes
      1 Posts
      3k Views
      No one has replied
    • bomastudioB

      GUI without decorations

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      2
      0 Votes
      2 Posts
      3k Views
      fredo6F
      GUI like TopoShaper and my other plugins' are drawn in the viewport and constantly refreshed (at each view.invalidate). So this is a very different technique compared with HTML dialogs. Benefits: you can use a state driven approach, since the refresh is permanent you do not have problems of focus between the Sketchup window and the dialog box Drawbacks you have to draw everything with the OpenGL methods (i.e. view.draw2d()), and manage the interactivity with onLButtonDown, onLButtonDown and onMouseMove()). The GUI takes some real-estate on the Sketchup viewport. And also, it disappears when you Orbit or pan Some users don't like it, as it is 'non standard' (by the way, when looking at Web Sites, this difficult to say that there are standard in HTML too!) Note that HTML / JavaScript / CSS, you can make the programming state driven by using frameworks like Vue and Bootstrap. There is a learning curve but overall it's working fine. For the focus, this is more complex to handle, but there is a technique to force Sketchup to give back focus to itself. Fredo
    • bomastudioB

      Unscramble my own old plugin

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      2
      0 Votes
      2 Posts
      2k Views
      jiminy-billy-bobJ
      You can find an unscrambler pretty easily on Google...
    • bomastudioB

      Kernel.system asynchronous on OSX?

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      4
      0 Votes
      4 Posts
      571 Views
      Dan RathbunD
      I usually use a timer in this scenario, to check when the file exists, then cancel the timer and call the post processing method. @tid = UI;;start_timer(0.5,true) { if File.exist?(@filepath) UI;;stop_timer(@tid) post_process(@filepath) end } EDIT(Add): Also, I would usually have a counter variable that gets incremented each timer loop, and a max number of trys, if the file never becomes "ready" then I also exit the timer and somehow display a warning or message that things did not work.
    • bomastudioB

      Add something to my *.rbs file

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      6
      0 Votes
      6 Posts
      2k Views
      TIGT
      So to recap my understanding. You hope[d] to somehow edit a copy of your main RB file, and from that make individually customized scrambled RBS files. This is actually possible. But your RBS files, put within your distributed RBZ archive cannot be 'signed' for use in >=v2016 [all loading-policies]... unless you actually submit each one of the RBZ files separately and on receipt then send it to your individual user. Here's an idea... RBZ contents as follows... MyLovelyTool.rb == the 'loader' MyLovelyTool == the subfolder containing... MyLovelyTool_main_code.rb == compiled by the signing process to RBS or RBE if limited to >=v2016 MyLovelyTool.hash == the signed file referencing all .rb/rbs/rbe/js.htm.html.css files in the RBZ AND MyLovelyTool_user_data.rbs == which you make from an RB on a per user basis - containing the individual details you want... It contains the same module/class set up as the main_code and simply sets the @@a or whatever. The main_code uses Sketchup;;require('MyLovely_user_data') as it initially loads, so that the customized details are used... This way the main IP relevant main)code can be RBS or RBE and incorporated in the signing hash, and the user_data can be somewhat obfuscated in your own RBS which is added to the signed RBZ later on... It will still be loaded by the signed file, while containing individual details. Be aware that RBS made by your old scrambler exe is readily crack-able, but probably sufficient obfuscation in your case - certainly better than a plain RB - which'd be easily editable. You can't make a securely encrypted RBE version without going through the signing/encryption process via the web-site. You could have course make mock RBZs for each user with a matching MyLovelyTool_user_data subfolder and submit those for signing/RBEing, then use just the RBE... adding it to the main RBZ before giving it to the user... BUT this route seems too much effort for little benefit... There must be an easier way to do this !
    • bomastudioB

      Cross-platform hardware detection

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      12
      0 Votes
      12 Posts
      831 Views
      D
      I know variations on ifconfig en0 ether.to_s.split('ether ')[1].strip have proven robust for a few authors... but my question to all of them is why? @bomastudio what is your licensing strategy? you may not need to be so invasive... john
    • bomastudioB

      Webdialog for a progressBar

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      9
      0 Votes
      9 Posts
      1k Views
      G
      Typically I do not use a progress bar. Instead I use Sketchup::set_status_text I'm happy using a counter with a modulus. I generally try to update the status no more than once every second or two. The same idea would work for a progress bar. All I was trying to do is give bomastudio a solution to his request and show him how to get around the problem of the web dialog being starved of cpu time. Without the timer loop you blow the bottom off the stack. With a timer loop you incur a performance penalty. The interesting thing is the jquery ready function would only fire after the heavy processing had finished.
    • bomastudioB

      Hidden Face Removal

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      2
      0 Votes
      2 Posts
      467 Views
      bomastudioB
      [image: QIru_2DVectorVIEW.png] I'm on the road, I can draw the view and project exactly what I can see on the XY plane. But the problem is how to implement one the "hidden face removal" algorithms.....like the "painter algorithm", or the "Z-buffer" and so on.... In the MAKE version of SU I can't use the boolean operators so I'm in stall.....any ideas? EDIT: In this procedure I'm using the back-face culling algorithm in order to improve performaces.
    • bomastudioB

      Raise left click

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      4
      0 Votes
      4 Posts
      521 Views
      bomastudioB
      It's a new feature of SU2015 BTW?
    • bomastudioB

      [Solved] WedDialog- how to debug?

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      1
      0 Votes
      1 Posts
      399 Views
      No one has replied
    • bomastudioB

      Linear Algebra & Analytic Geometry

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      4
      0 Votes
      4 Posts
      585 Views
      M
      @bomastudio said: Hi Guys, I have an agony-problem with a 3D rotation. The transform that TIG suggested (rotation) works for your need. The docs on transformations aren’t very clear, especially for people who aren’t familiar with 3D transforms or linear algebra. They’re also a little quirky, as the trans.to_a method returns a matrix that is the transpose of what I would expect. FWIW, I had a lot of linear algebra (long time ago)... Anyway, the rotation method returns a transformation based on a rotation in a plane, which is defined by the ‘axis’ parameter, which should be the normal to the plane of rotation. If the start and end vectors are parallel, they do not define a unique plane, hence, both my original ‘linear algebra’ algorithm and the rotation method fail. The code below accounts for that – Greg module SUMath def self.transVector2Vector(vStart, vEnd, pt = nil) ptRot = pt || [0,0,0] if vStart.samedirection?(vEnd) # return identity transformation, vectors are in the same direction Geom;;Transformation.new elsif vStart.parallel?(vEnd) #return 180 transformation, vStart and vEnd in opposite direction Geom;;Transformation.axes(ptRot, [-1,0,0], [0,-1,0], [0,0,-1] ) else # return rotation transform based on vStart and vEnd # vCross is normal to plane of rotation vCross = vStart.cross(vEnd) ang = vStart.angle_between(vEnd) Geom;;Transformation.rotation(ptRot, vCross, ang) end end def self.rotateFace(face, vector_end, pt = nil) # for demo purposes, the next 2 statements chose an arbitrary face # if no face passed unless face entities = Sketchup.active_model.entities faces = entities.grep(Sketchup;;Face) face = faces[0] end face_normal = face.normal t = transVector2Vector(face_normal, vector_end, pt) entities.transform_entities(t, face) # below is just for a demo confirmation sd = face.normal.samedirection?(vector_end) sVEnd = "[#{vector_end.join(",")}]" puts "face.normal.samedirection?(#{sVEnd}) = #{sd}" end end # load module thru console # type SUMath.rotateFace(nil, [0,0,1]) into console with whatever vector # you want, it can be typed as often as you'd like. # As a demo, best done with one face in the model
    • bomastudioB

      Webdialog and ActiveXObject

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      11
      0 Votes
      11 Posts
      1k Views
      D
      Thread Highjack... @aerilius said: ...I have been working for some months on making the one I use in my plugins standalone and re-usable (soon released). shoot me a copy if you want any mac testing, i'm not too fond of SKUI, as I prefer a more the native look and feel... john
    • bomastudioB

      Tool: getMenu and toolbar

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      8
      0 Votes
      8 Posts
      592 Views
      bomastudioB
      Thank you Dan. I'm going to study....
    • bomastudioB

      Toolbar position

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      6
      0 Votes
      6 Posts
      530 Views
      bomastudioB
      A lot of things to study..... many thanks Dan....you are a GURU!!!
    • bomastudioB

      Deleting Component Instance

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      5
      0 Votes
      5 Posts
      720 Views
      bomastudioB
      Guys you are and invaluable support for SU developers.... a beer to all of you!!!
    • bomastudioB

      Edge.all_connected to curve

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      2
      0 Votes
      2 Posts
      269 Views
      D
      have a look at TIG_weld.rb, you can even run it from your own script using require...
    • bomastudioB

      VisualRuby/Glade

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      1
      0 Votes
      1 Posts
      185 Views
      No one has replied
    • bomastudioB

      Overwritten script!!!

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      5
      0 Votes
      5 Posts
      274 Views
      D
      did you type it directly into 'Ruby Console' and is the session still open? if so, you can use the 'up arrow' to go back to it, otherwise it's a learning experience... EDIT: should have read the post in detail first, but I'll leave this up for others... if your on linux what editor did you write it in, most have history... john
    • bomastudioB

      WebDialog and external Javascript Libraries

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      3
      0 Votes
      3 Posts
      204 Views
      tt_suT
      @bomastudio said: Hi all, I'm leraning to use Web Dialogs and Javascript. I would like to use an external Javascript Library, such as Threejs or Kineticjs. But in my Windows 7 64bit I have ie8. I'm planning to install ie11. Any warning? Note that embedded IE is much more conservative than the browser version. If you want to make the webdialog use the new features you need to include a META tag in your HTML header: https://github.com/thomthom/sketchup-webdialogs-the-lost-manual/wiki/Doctype---Quirks-vs-Standard-vs-Superstandard <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    • bomastudioB

      TECLA Palladio

      Watching Ignoring Scheduled Pinned Locked Moved Plugins
      20
      0 Votes
      20 Posts
      1k Views
      KrisidiousK
      @bomastudio said: @krisidious said: If I just hadn't lost every file I had... what do you mean for? Oh I was just lamenting the fact I had lost all my Autocad and SketchUp files last year due to a system failure.
    • 1
    • 2
    • 1 / 2