sketchucation logo sketchucation
    • Login
    1. Home
    2. Aerilius
    3. Posts
    ℹ️ 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

    Posts

    Recent Best Controversial
    • RE: [REQ] Optimizing plugin

      Yes it is (uses slow typename and recurses over all entities in the model).

      It applies to each entity a material matching the entity's layer (name, random color). It may depend on the input data whether it could skip some recursion (Does the imported model not have any materials, and are all entities in a component on the same layer as the component?).

      But please, let's clarify first publicly who is going to do it. Is Al Hart here?

      posted in Plugins
      A
      Aerilius
    • RE: SketchUp 2015 is 64bit

      The 2015 license is independent of the bitness (and operating system), as is the file format. You can save a file in any install of SketchUp 2015 and open in another SketchUp 2015.

      posted in SketchUp Discussions
      A
      Aerilius
    • RE: SketchUp 2015 is 64bit

      @gt5 said:

      …a true Mac version…

      To complement Jeffs reply, I don't know what you think of for SketchUp to be a true OS X application. Any OS X-specific plus features – though nice to have – can fire backwards like the materials browser and deepen the trench between both versions. It's probably not advantageous for development progress if they have to maintain two more and more differing code bases. Whom can we recommend which version if we have to ask back: "Do you want to import pdfs or do you want a color chooser? Do you want to edit multiple documents or dock toolbars? Do you want to have high-dpi support or thumbnails?"
      Preferably these differences would be levelled out.

      posted in SketchUp Discussions
      A
      Aerilius
    • RE: [Plugin] Snapshot – (1.0.1) — updated 09.10.2012

      This would need a little change (that even you could do if you like) to set the write_image option antialias => false. This rather old and complex plugin consists mainly of a plethora of options because every user could want something slightly different. Instead, you could also use Toolbar Editor.

      [off:c47o1jic]%(#BF0000)[This plugin is superseded by the extension "Toolbar Editor".
      It allows to create your own toolbar buttons for whatever function you want, in exactly the way you want.
      You can achieve the snapshot function by pasting into the code field:]

      filepath = UI.savepanel
      view = Sketchup.active_model.active_view
      keys = {
        ;filename => filepath,
        ;width => view.vpwidth,
        ;height => view.vpheight,
        ;antialias => true,  # or false
        ;compression => 0.9, # Only for jpeg
        ;transparent => true # Only for png
      }
      view.write_image(keys)
      

      [/off:c47o1jic]

      posted in Plugins
      A
      Aerilius
    • RE: [Plugin] Upload model with custom thumbnail — 12.01.2013

      [off:1waa3eoz]%(#BF0000)[This plugin has no use anymore.
      This plugin was designed to hook into SketchUp's upload process to the old Google 3D Warehouse. The old warehouse did not generate thumbnails server-side, so this plugin replaced the temporary image file on the user's computer during the upload process. The new Trimble 3D Warehouse generates preview images their servers so that there is no use for this plugin anymore.]
      [/off:1waa3eoz]

      posted in Plugins
      A
      Aerilius
    • RE: [Plugin] Upload model with custom thumbnail — 12.01.2013

      Hi,
      this plugin has a very different scope than what you need. File thumbnails work very differently and the approach of this plugin does not offer a solution for file thumbnails. This forum is full of discussions about thumbnails (ie. no thumbnails on Win64bit, small thumbnails on OS X), and many workarounds [1][2][3]. If you need a file to always the same thumbnail of the model from a specific perspective, you can make use of SketchUp's feature in "Model Info" to disable updating the thumbnail on save.

      posted in Plugins
      A
      Aerilius
    • RE: Paste Sanskrit (Sanskrit2003 font) 3D text

      That is a known issue and indeed a limitation of the current 3d text feature in SketchUp (besides TrueType-only fonts). As you see by the blue selection contours, it seems SketchUp (or the library it uses) vectorizes each character individually, and not the complete text as one.
      The 3d text feature would need to support advanced text layout and glyph rendering, as libraries like DirectWrite or Pango offer.

      Have you been able to use the text written in Inkscape? (Inkscape can export to dxf which SketchUp imports)

      posted in SketchUp Bug Reporting
      A
      Aerilius
    • Présenter les modèles dans LibreOffice en 3d

      Depuis la version 4.3, LibreOffice Impress supporte d'insérer des modèles 3d dans des présentations. Ça devrait intéresser Patrick, qui a déjà fait la 3d dans Draw.

      Cette fonction est très fraîche, et il n'y a pas trop de documentation. En suivant ce tutorial, je pouvait lancer le "monstre" (en mode de présentation F5):
      http://zolnaitamas.blogspot.de/2014/08/3d-models-in-impress-libreoffice-43.html
      monster.png

      Mais je n'avait pas succès avec mes propres modèles en Collada. Quelqu'un en a fait des expériences?

      posted in Français
      A
      Aerilius
    • RE: Entity Attribute !?

      What is the plugin that you want to modify, what does it do and what exactly do you want to achieve in your modification?

      This would be good to know so we can help because the example has several issues:

      • Whatever plugin it is, it uses global constants $MTtool_edg (which is so bad it's even banned from Extension Warehouse).
      • it uses convoluted half-abbreviations. In Ruby, human language and meaningful names are preferred, rather not abbreviations, and in no case anything in between. Consistency is all in programming. Bad naming leads to unmaintainable code and errors.
      • your added method accesses that global constant that has been set from outside. That is risky because you don't have control over what value it currently has. It is the best example of a side effect and side effects are better to avoid. There is certainly a better way how we can achieve what you want.

      Have you discovered the official API documentation, where you can browse hierarchically what you need? For example you have a Sketchup::Edge and you go to that class (and also "parent" on that page) and see everything you can do with an edge.

      posted in Developers' Forum
      A
      Aerilius
    • RE: SecureRandom slow

      Could it be initialization?
      Click the source: http://ruby-doc.org/stdlib-2.0.0/libdoc/securerandom/rdoc/SecureRandom.html#method-c-random_bytes

      If you run it on Windows, it runs the first time also the if !defined?(@has_win32) block, later only the if @has_win32 block.

      posted in Developers' Forum
      A
      Aerilius
    • RE: SU Gui toolkits

      There is another toolkit that you can use directly with Ruby: https://github.com/thomthom/SKUI
      I think it aims exactly what you want, and resizing should also not be a problem. And the plus is that it has no exterior dependencies, meaning it is cross-platform for all platforms that SketchUp supports/will support.

      posted in Developers' Forum
      A
      Aerilius
    • RE: Trimble Sketchup

      Under Trimble the SketchUp team was able to release twice as many versions than in the same time under Google.

      They renewed two major components of the SketchUp application (Ruby 2.0 and the build system + UI libraries, which as side effect fixed toolbar mess and added editable toolbars).
      They built two major web platforms from scratch with integration into SketchUp and all the under-the-hood infrastructure: Extension Warehouse and 3D Warehouse.
      (and two small mobile apps)

      Agreed, these are not so much user-facing innovations in the SketchUp client application, but considering the speed and effort that had gone into renewing the foundations, now that it is done I'd expect a much faster pace of innovative user-facing features.

      posted in SketchUp Discussions
      A
      Aerilius
    • RE: Trimble not interested

      @kenneth r kuhlman said:

      Trimble Tech answered my question 3 days later
      Support is still done by the SketchUp team (which is constantly hiring). They are not different people as terms like "Google Tech" or "Trimble Tech" would give the impression. I think it rather indicates SketchUp is busy and growing.

      posted in SketchUp Discussions
      A
      Aerilius
    • RE: Override the alt-key in a class ??

      The %(#000000)[alt] key is often operating-system-reserved, and provides functions. If applications stay in their own field, there shouldn't be conflicts (or confusion of users).

      There are no special API methods for enabling/disabling. Some API methods can be used for to override default behaviour (inside the application), like onMButtonDown (default: orbit), onRButtonDown (default: application context menu).
      But have you tried pressing %(#000000)[alt]+ %(#000000)[altgr] ?
      A good alternative to overloading a tool with multiple modes is to just make several tools, and intuitive icons that make it easy to switch.

      posted in Developers' Forum
      A
      Aerilius
    • RE: Manipulate text label attached to entity

      Approach with SelectionObserver:
      See the documentation:
      http://www.sketchup.com/intl/en/developer/docs/ourdoc/entities#add_text
      http://www.sketchup.com/intl/en/developer/docs/ourdoc/text

      
      component # be a reference to your component instance
      position = ORIGIN # or any other point in the component coordinate system
      direction = Geom;;Vector3d.new(0,0,1)
      component.entities.add_text(position, "The label text", direction)
      
      

      To find the text again, under the assumption the component contains no other texts:
      in a Selection Observer

      
      def onSelectionBulkChange(selection)
        return unless selection.count == 1
        return unless selection.first.is_a?(Sketchup;;ComponentInstance)
        component = selection.first
        return unless component.name == "Specific name"
        text = component.entities.grep(Sketchup;;Text)
        # Do something with the text
      end
      
      

      As I understand your request, you just want to display information to the user, but you do not want to modify/edit the model file. I strongly suggest not to use the native selection tool and observers for this, because it would run always when the user uses the native Select Tool (with a different intention in mind), and observers run always if not properly attached and removed. Plugins should use observers as little as possible (in terms of time), namely only when the user explicitely launches the plugin.

      Approach with a SketchUp Tool:
      You could write your own tool instead, which allows you to draw your information to the screen, instead of "modeling" text by adding entities to the model. It is also much cleaner because the user can unselect your tool and use the native Select Tool without confusion.
      See for reference:
      http://www.sketchup.com/intl/en/developer/docs/ourdoc/tool
      http://www.sketchup.com/intl/en/developer/docs/ourdoc/view#draw_text
      http://www.sketchup.com/intl/en/developer/docs/ourdoc/pickhelper#best_picked
      linetool.rb example
      Create a class:

      
      module Sepultribe
      module SensorNodeInfoPlugin
      class SensorNodeInfoTool
      
        SPECIFIC_NAME = "Specific Name"
      
        def initialize
          @selection = nil
          @info = nil
        end
      
        def onLButtonDown(flags, x, y, view)
          pick_helper = view.pick_helper
          pick_helper.do_pick(x, y)
          item = pick_helper.best_picked
          return unless item.is_a?(Sketchup;;ComponentInstance)
          return unless item.name == SPECIFIC_NAME
          # Now you have the right component, store it in an instance variable.
          @selection = item
          # Fetch the info that you want to display (assuming you have it stored as attribute)
          @info = @selection.get_attribute("dictionary_name", "attribute_name", "")
        end
      
        def draw(view)
          return if @selection.nil?
          position3d = @selection.transformation.origin # or @selection.bounds.center
          position2d = view.screen_coords(position3d)
          # (You could also draw the bounding box of the selected component.)
          # Draw an arrow.
          vector = Geom;;Vector3d.new(20,-20,0)
          view.draw2d(GL_LINES, position2d, position2d+vector)
          # Draw the info.
          view.draw_text(position2d+vector, @info)
        end
      
      end # module Sepultribe
      
      # Add the plugin to the menu, only once when the file is loaded.
      unless file_loaded?(__FILE__)
        command = UI;;Command.new("Display Sensor Node Info"){
          Sketchup.active_model.select_tool(SensorNodeInfoTool.new)
        }
        UI.menu("Plugins").add_item(command)
      end
      
      end # SensorNodeInfoPlugin
      end # module Sepultribe
      
      
      posted in Developers' Forum
      A
      Aerilius
    • RE: Les plugs via Gmail !???

      Si SketchUp allait implémenter l'identification complète comme prévu par OpenID, on pourrait choisir de prendre n'importe quel compte: Google, Microsoft, xyz, son propre domaine…
      J'approuve totalement que l'utilisation des services SketchUp ne vaut pas diffuser toutes ses actions à l'autre coté du monde. Au moin il te faudrait avoir la choix d'un fournisseur d’identité de ta confiance.

      @unknownuser said:

      C'est le prix à payer pour avoir des objets tout gratoches! 😉

      Mais si c'est les créateurs qui te donnent les objets comme cadeaux, quoi justifie que Google reçoit l'info?

      posted in Français
      A
      Aerilius
    • RE: Manipulate text label attached to entity

      Hmm, you run the code 600 times (and set each time the same position and text, unless selection is changed)?

      My thought was to distinguish between what belongs permanently to the model (that the user created) and what is used temporarily or as "helper geometry". Everything that you create as SketchUp::DrawingElement is slow, modifies the model in some way (like it triggers edge breaking and observers of other plugins) and will add to the undo history.
      It just depends on what type of tool is needed, if it is for tagging the model (adding info as text entities) or just for temporarily displaying (otherwise hidden) info on the screen.

      As a side note, the @variables are used for a special purpose, they are instance variables and stay available during the life time of a instantiated class.

      posted in Developers' Forum
      A
      Aerilius
    • RE: Webdlg debugging on Mac using WebKit inspector

      Found in the lost manual: https://github.com/thomthom/sketchup-webdialogs-the-lost-manual/wiki/Debugging

      posted in Developers' Forum
      A
      Aerilius
    • RE: Les plugs via Gmail !???

      @unknownuser said:

      Je crains qu'un jour cette obligation soit étendue à l'accès à la banque d'image 3D…

      C'est déjà comme ça! (Au moment seulement pour télécharger vers l'amont.)

      Tous les services de SketchUp utilisent OpenID pour l'authentification (avantage: SketchUp n'a pas besoin de garder des mots de passe sur leurs propres serveurs). Mais pour l'instant ils n'offrent pas d'alternative comme fournisseur d’identité sauf Google…

      posted in Français
      A
      Aerilius
    • RE: View SU files via Web browser

      As long as you just want to "display" a "specific model", it could be achieved with SketchUp's 3D Warehouse viewer. Just take the embed code and every button changes the iframe's url via JavaScript to another model.

      However you won't be able to do anything further like switching scenes, changing the camera etc., because the 3D Warehouse viewer has no public API. I'm even unsure if SketchUp plans to further develop the capabilities of the web viewer at all, or turn it into a stand-alone web-app, or if it would ever get an API (an API has the risk of someone (ab)using it to build a modeling application on top of SketchUp's infrastructure).

      The alternative webgl frameworks (like threejs) would give you more possibilities to build something but require to convert skp files on your own into an appropriate format.

      If you just want to spend time building something (but just want to present on the web), take a look at Pilou's link.

      posted in SketchUp Discussions
      A
      Aerilius
    • 1
    • 2
    • 3
    • 4
    • 5
    • 70
    • 71
    • 3 / 71