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

    Topics

    • A

      Présenter les modèles dans LibreOffice en 3d

      Watching Ignoring Scheduled Pinned Locked Moved Français
      2
      0 Votes
      2 Posts
      306 Views
      PatrickP
      Bonjour, oui j'avais vu mais sans plus. J'ai toujours cherché à faire un pont entre Draw et SU (c'est de l'openGL dans les deux) mais n'ayant pas l'âme et la compétence d'un programmeur cela reste un vœux pieux. Il me semble qu'un petit utilitaire permettait d'incorporer un objet opengl dans Draw depuis une application Opengl ouverte mais je n'avais pas réussi et depuis le temps je ne me rappel même plus son appellation. Bref, dans mon LibreOffice 4.3.1.2 les modèles en DAE et KMZ (SU8) sont très bien lu et utilisés dans Impress. Touche F9 pour passer en mode diapo pour contrôler les animations ou la 3D. Dans Draw ce n'est pas 'possible'. Je ne vois pas pourquoi mais "Insertion - Objet - Modèle 3D' n'est pas disponible. Cordialement Patrick
    • A

      Observer interface (best practices?)

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      9
      0 Votes
      9 Posts
      1k Views
      A
      Hmm, thats a good example. Now, I won't have to use variables to tranfer data between two different class instances. Simply having 'em all in one class is good implementation. This is how I think Sketchup Observers work. <span class="syntaxdefault"><br />class Sketchup</span><span class="syntaxkeyword">;;</span><span class="syntaxdefault">Selection<br /><br />  def initialize<br />    </span><span class="syntaxkeyword">@</span><span class="syntaxdefault">observers </span><span class="syntaxkeyword">=</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">[]<br /></span><span class="syntaxdefault">  end<br /><br />  def add_observer</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">obj</span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">    </span><span class="syntaxkeyword">@</span><span class="syntaxdefault">observers </span><span class="syntaxkeyword"><<</span><span class="syntaxdefault"> obj<br />    true<br />  end<br /><br />  def remove_observer</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">obj</span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">    </span><span class="syntaxkeyword">@</span><span class="syntaxdefault">observers</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">delete</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">obj</span><span class="syntaxkeyword">)</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">?</span><span class="syntaxdefault"> true </span><span class="syntaxkeyword">;</span><span class="syntaxdefault"> false<br />  end<br /><br />  </span><span class="syntaxcomment"># Some method triggered by SketchUp private API.<br /></span><span class="syntaxdefault">  def _trigger_selection_added</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">sel</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> element</span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">    </span><span class="syntaxkeyword">@</span><span class="syntaxdefault">observers</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">each </span><span class="syntaxkeyword">{</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">|</span><span class="syntaxdefault">obj</span><span class="syntaxkeyword">|<br /></span><span class="syntaxdefault">      next unless obj</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">respond_to</span><span class="syntaxkeyword">?(;</span><span class="syntaxdefault">onSelectionAdded</span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">      begin<br />        </span><span class="syntaxkeyword">@</span><span class="syntaxdefault">obj</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">onSelectionAdded</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">sel</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> element</span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">      rescue Exception </span><span class="syntaxkeyword">=></span><span class="syntaxdefault"> e<br />        puts </span><span class="syntaxstring">"#{e}\n#{e.backtrace.first}"<br /></span><span class="syntaxdefault">      end<br />    </span><span class="syntaxkeyword">}<br /></span><span class="syntaxdefault">  end<br /><br />  </span><span class="syntaxcomment"># ...<br /></span><span class="syntaxdefault">end<br /></span> I think the event is called only if the tool contains that method. This might tell us that you tool isn't event supposed to be an instance. It may be a module as well. As long as the methods are accessible ( self.onSelectionAdded) your good to go.
    • A

      Drawing images to the SketchUp viewport

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      9
      0 Votes
      9 Posts
      783 Views
      tt_suT
      And this is how it looks like on nVidia with AA enabled: [image: MGOD_2014-07-02_23h02_32.png] [image: hDJx_2014-07-02_23h04_12.png] [image: VzoD_2014-07-02_23h04_33.png]
    • A

      Translations for plugins?

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      14
      0 Votes
      14 Posts
      458 Views
      Dan RathbunD
      @aerilius said: Each plugin would be translated individually, with based on .strings files as you already have, but hosted online (like you can host code in git/mercurial/bazar). I'm out. I do not use .strings files, nor LanguageHandler specifically because it's fixes are not backported. (And they never will be, because backporting is against the SketchUp Dev Team's religion.)
    • A

      Login popup

      Watching Ignoring Scheduled Pinned Locked Moved Ideas Box & Board Issues
      3
      0 Votes
      3 Posts
      7k Views
      G
      The goal of this "login popup" is to inform new visitors about the membership options and to make it obvious for them that they should register as a member to be able to use all the features of SketchUcation. It was set in a way that it popped up only for not logged in visitors hourly. So if some not logged in user visited the site again after an hour he/she got the popup again until he registered/logged in. I do understand that this could be annoying to frequent user members who do use direct-links to access the site. Therefore now I changed the repetition time from an hour to 1 week. So if you do not erase your cookies now you won't see again this popup for a week. I'll also check what can I do to get rid of this box in case of mobile devices.
    • A

      [Plugin] AttributeInspector 1.1.1 – 2014-05-08

      Watching Ignoring Scheduled Pinned Locked Moved Plugins
      45
      0 Votes
      45 Posts
      3k Views
      tt_suT
      Yea, there's a few annoying inconsistency where the correct error isn't raised.
    • A

      Understanding overlayed transparent OpenGL polygons

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      9
      0 Votes
      9 Posts
      1k Views
      thomthomT
      @aerilius said: The best (nicer) but it seems only to affect pngs. The example should be fully working. Do you see the same phenomenon? I see the same on my nVidia 8800GT card. (SU8)
    • A

      [Tips] How to make resolution-independent WebDialogs

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      3
      0 Votes
      3 Posts
      232 Views
      A
      That was a copy paste mistake. I don't know how it is on OS X. If pixel doubling is used, I'd expect existing webdialogs work without change, but the above points wouldn't hurt. I don't know if it can set anything inbetween. The same goes also for devices like the Toshiba Kira where the manufacturer added pixel doubling etc.
    • A

      [Plugin] ToolbarEditor (1.1.2) – updated 08.06.2014

      Watching Ignoring Scheduled Pinned Locked Moved Plugins
      122
      0 Votes
      122 Posts
      58k Views
      dereiD
      that's the one I have installed and it was acting funny by not adding separators on toolbars despite the fact they were being added in the editor. After briefly looking over the script, it seems the id of the elements is being taken from LaunchUp, so perhaps that one isn't being updated?
    • A

      [Plugin] LaunchUp – A Quick Launcher for SketchUp

      Watching Ignoring Scheduled Pinned Locked Moved Plugins
      108
      0 Votes
      108 Posts
      86k Views
      designerbursaD
      I am using sketchup 2021. After running the plugin, all other plugins give an error. Error in C:/Users/samib/AppData/Roaming/SketchUp/SketchUp 2021/SketchUp/Plugins/!ae_LaunchUp/interception.rb:126 for add_item break from proc-closure C:/Users/samib/AppData/Roaming/SketchUp/SketchUp 2021/SketchUp/Plugins/!ae_LaunchUp/index.rb:138:in block in load_menus' (eval):5:in block in observe_instance_method' C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/gui/context_menu:10:in block in init' Error in C:/Users/samib/AppData/Roaming/SketchUp/SketchUp 2021/SketchUp/Plugins/!ae_LaunchUp/interception.rb:126 for add_item break from proc-closure C:/Users/samib/AppData/Roaming/SketchUp/SketchUp 2021/SketchUp/Plugins/!ae_LaunchUp/index.rb:138:in block in load_menus'
    • A

      Running Ruby code in a web browser

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      6
      0 Votes
      6 Posts
      378 Views
      Dan RathbunD
      @aerilius said: Maybe there is a way to compile Ruby code directly into JavaScript (without the detour over a slow virtualized Ruby interpreter in JS). @unknownuser said: (http://en.wikipedia.org/wiki/RubyJS)":a0zse4if]RubyJS is a port of Google Web Toolkit to the Ruby programming language. RubyJS trans-compiles Ruby source code to JavaScript, which allows running client-side applications in a web browser.
    • A

      Medieval construction crane

      Watching Ignoring Scheduled Pinned Locked Moved WIP
      11
      0 Votes
      11 Posts
      6k Views
      irwanwrI
      Really nice modelling, texturing and rendering.
    • A

      C/C++ applications in the browser

      Watching Ignoring Scheduled Pinned Locked Moved Corner Bar
      2
      0 Votes
      2 Posts
      130 Views
      D
      the sites down, must be the rush of SketchUcation users zooming on over... it sounds a bit like what you can do with webkit and the objectiveC plugin on a mac. but that's all local and mac only. john
    • A

      Intersecting line with BoundingBox

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      10
      0 Votes
      10 Posts
      351 Views
      A
      I hadn't considered that because planes are infinite, but it works well combined with BoundingBox.contains? def intersect_line_boundingbox(line, bb) # Intersect with 6 planes of the bounding box's sides. p0 = bb.corner(0) p1 = bb.corner(7) [ [p0, X_AXIS], [p0, Y_AXIS], [p0, Z_AXIS], [p1, X_AXIS], [p1, Y_AXIS], [p1, Z_AXIS] ].each{|plane| intersection = Geom;;intersect_line_plane(line, plane) # Stop when the intersection point is inside the bounding box. return intersection if bb.contains?(intersection) # else continue } # No intersection (because bb is aside line or behind line start). return nil end There is certainly room for optimization (ie. maybe less than 6 planes, or checking whether BB is behind line start). I first had the code with an infinite straight line (starting from -infinity) and only one intersection with a plane but that failed due to precision errors.
    • A

      [Plugin] Snapshot – (1.0.1) — updated 09.10.2012

      Watching Ignoring Scheduled Pinned Locked Moved Plugins
      74
      0 Votes
      74 Posts
      55k Views
      A
      The original plugin was not able to do a screen clipping/cropping. When SketchUp exports images of the current view, they always include the whole viewport. But you can set the pixel dimensions of the image. If someone really needs all the options of the original plugin, it is still downloadable. Otherwise you create a toolbar button with a code snippets using ToolbarEditor. This is much easier to support, and it is easier to adapt to your specific needs. This snippet asks for the file name and image dimensions. If you choose a filename with png or tif, the image will have transparency. model = Sketchup.active_model view = model.active_view ro = model.rendering_options filepath = UI.savepanel("Save Image File", nil, "BMP|*.bmp;|JPG|*.jpg;*.jpeg|PNG|*.png|TIF|.*tif;*.tiff|TGA|*.tga||") width, height = UI.inputbox( ["width", "height"], [view.vpwidth, view.vpheight], "Size of the screenshot") unless filepath.nil? || width.nil? || height.nil? is_transparent = filepath[/\.(png|tiff?)$/i] if is_transparent drawGround, ro["DrawGround"] = ro["DrawGround"], false drawHorizon, ro["DrawHorizon"] = ro["DrawHorizon"], false end keys = { ;filename => filepath, ;width => width, ;height => height, ;antialias => true, # or false ;compression => 0.9, # Only for jpeg ;transparent => true # Only for png } begin raise unless view.write_image(keys) Sketchup.status_text = "A snapshot has been saved as #{filepath}." rescue Exception => e Sketchup.status_text = "Failed to save snapshot to #{filepath}. #{e.message}" end if is_transparent ro["DrawGround"] = drawGround ro["DrawHorizon"] = drawHorizon end end
    • A

      OnSaveModel Observer

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      3
      0 Votes
      3 Posts
      72 Views
      A
      Thanks! That should work for most cases. (But it still would be nice to have a second argument with the file path, since the model.path is not necessarily linked with the location where the file (a copy) was saved.)
    • A

      OnScreen GUI Toolkit

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      28
      0 Votes
      28 Posts
      8k Views
      D
      I would like to do this, to make a inputbox made with OpenGL, could you please show an example of how to do this?
    • A

      [Tutorial] uvq coordinates, or: The Magic Q

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      5
      0 Votes
      5 Posts
      3k Views
      A
      I've read UVW somewhere as well. We have to find out more. For UVW mapping Wikipedia says no more than: "the third dimension allows texture maps to wrap in complex ways onto irregular surfaces" A Google search shows UVQ is mostly related with SketchUp, and that the names of these coordinates are not very standardized (just letters in the alphabet before x,y,z), for example there are also Q,R,S,T. There's an interesting explanation on gamedev.stackexchange, that the W allows to optionally apply a transformation matrix before rendering a texture to screen (for example for animating textures without expensive moving of the texture on every entity).
    • A

      Dae collada sketchup 6 vs sketchup 8

      Watching Ignoring Scheduled Pinned Locked Moved SketchUp Discussions sketchup
      1
      0 Votes
      1 Posts
      237 Views
      No one has replied
    • A

      [Code] WebDialog communication

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      35
      0 Votes
      35 Posts
      5k Views
      alexschreyerA
      Great idea to clean up the web-dialog interfacing! Let me throw one more idea in there: Apparently post_url does not accept any returned data (it just opens it in the embedded browser window). Might be nice to have get_url and post_url functions that at least return the data. That could even be expanded into get_json and post_json . Of course, jQuery will do that but a native way might be neater. It's definitely on my feature request list for SU... Cheers, Alex
    • 1 / 1