⚠️ Important | Libfredo 15.6b introduces important bugfixes for Fredo's Extensions Update
  • Code to calculate Catenary curves?

    21
    0 Votes
    21 Posts
    6k Views
    Didier BurD
    Hi, Check this one by Aerilius: http://rhin.crai.archi.fr/rld/plugin_details.php?id=990
  • Observer or Event when Changing Model

    5
    0 Votes
    5 Posts
    606 Views
    fredo6F
    @dan rathbun said: But that was a bug in older SketchUp versions, wasn't it ? I remember it happened when saving the model (most often.) But I thought it was fixed. Maybe, although I am not sure. But as you know, supporting older versions is also a requirement, so that, as long as the old tricks work, you finally leave it as it is. Fredo
  • From AutoLisp to Ruby

    14
    0 Votes
    14 Posts
    2k Views
    Dan RathbunD
    @deanby7 said: I'm running Version 8 Sketchup. ... which runs Ruby v1.8.6-p287 on PC, and v1.8.5-p0 on OSX. @deanby7 said: I'm getting an error.... Error: #<NoMethodError: private methodclass_variable_get' called for SaM::Pick_Points:Class>` For some reason Ruby 1.8 had made class_variable_get() and class_variable_set() to be private methods. In SketchUp v14+ using Ruby 2.0+, they were changed to be public methods.
  • Assigning a default material.

    6
    0 Votes
    6 Posts
    1k Views
    Dan RathbunD
    @tig said: Another way to set it by ' display_name' [i.e. what you can read] would be... mats = model.materials name = 'Brick_Antique' mat = nil mats.each{|m| if m.display_name == name mat = m break end } oface.material = mat Still another way: mats = model.materials name = 'Brick_Antique' mat = mats.find {|m| m.display_name == name } oface.material = mat
  • Volume of Multiple Groups

    13
    0 Votes
    13 Posts
    5k Views
    F
    Thankyou Dan!
  • Import fbx in Sketchup

    6
    0 Votes
    6 Posts
    29k Views
    Bob JamesB
    Fluidimporter is good and more flexible since it imports other type files at $89 http://www.fluidinteractive.com/products/sketchup-extensions/fluidimporter/ but I find that SimLab FBX importer for SketchUp is more reliable at $79 https://extensions.sketchup.com/en/content/simlab-fbx-importer-sketchup
  • Catenary curve

    6
    0 Votes
    6 Posts
    1k Views
    thomthomT
    I always wanted an extension that added a tool that let you specify the length of a curve, and then you could adjust the start and end of it within that constraint. I had a quick look the other day of the code - looking at how it could be adapted to taking input from a Ruby tool.
  • Starting a new Ruby Tool Extension

    13
    0 Votes
    13 Posts
    2k Views
    thomthomT
    The example focused on writing a tool. Tool are so complex that in an example I didn't want to muddle everything else into it. In the examples I'm writing I was a separate "tutorial" that describe in detail how to structure the folders and register the extension and add a menu. Toolbars and localization are good separate topic - each deserving their own attention. I had thought I'd put it on GitHub once it was more fleshed out - but maybe I should try to put out the WIP since we already have a topic on this going here. As for parenthesis - that's a code style and that is something people have to pick for their own. I used explicit parenthesis myself because I was familiar with other languages that always required them. But in Ruby this isn't the norm. I found that it was easier to just use normal convention for the language - as sharing code and adopting example code required less work. For Ruby code I use the GitHub style guide which seem to be the de-facto standard. IDE's normally base their inspection rules on this and you'll hear a lot of squawking if you use a different style - unless you spend the time to reconfigure the style rules.
  • Axes vectors in Sketchup 8

    6
    0 Votes
    6 Posts
    706 Views
    thomthomT
    To get the working model axes there is a hack for older versions of SU - if you only need the direction. You aren't able to obtain the origin though. Here's a snippet directly from Vertex Tools: # SU7+ only - incorrect in older versions. # A hack to get the current model axis. # # @return [Array<Vector3d,Vector3d,Vector3d>] # @since 1.0.0 def get_local_axis if FEATURE_MOVING_AXIS # SketchUp 8+ tr = get_local_transformation elsif @model.respond_to?( ;edit_transform ) # SketchUp 7 if @model.active_path tr = @model.edit_transform else tr = get_local_transformation end else # SketchUp 6 tr = Geom;;Transformation.new end [ tr.xaxis, tr.yaxis, tr.zaxis ] end # SU7+ only - incorrect in older versions. # A hack to get the current model axis. # # @return [Array<Vector3d,Vector3d,Vector3d>] # @since 1.1.0 def get_local_transformation @model.start_operation('Get Local Transformation (Hack)') entities = @model.active_entities tr = entities.add_group(entities.add_group).transformation # (?) SketchUp bug? # The transformation returned has X, Y and Z set to 1.0e+030! # Why this high value? Overflow bug? Geom;;Transformation.new( tr.xaxis, tr.yaxis, tr.zaxis, ORIGIN ) ensure @model.abort_operation end That FEATURE_MOVING_AXIS constant comes from a check if the SU version is 8 or higher.
  • Trajectory curve

    2
    0 Votes
    2 Posts
    512 Views
    D
    cheers for posting these scripts... john
  • Help with window hole in wall script

    30
    0 Votes
    30 Posts
    6k Views
    D
    Gary K - They look interesting, I will check these out! With TIG and sdmitch's very informative help I have succeeded with my little script! Posted here for information. Cheers guys. Now to look at automating the move of window component with its associated reveals! Hmmm observers? dbwindowwallopen.rb
  • Tracking Usage

    4
    0 Votes
    4 Posts
    659 Views
    G
    When I have collected usage information in the past I have done so only with the consent of the user. Furthermore the numbers simply go into a database and do not have names or locations attached. Many web sites today perform analytics. Even sketchucation performs a type of analytics to establish daily download numbers for plugins. The key bit is they don't track who downloaded - they just count the downloads. These are the download numbers for cab maker. You can see that the number of downloads gained momentum around the time Sketchucation featured my plugin. Now they have settled down. [image: iwt9_analytics.png] Similarly, in the past I have counted some usage specs to determine if a feature is worth more development or not. Again I do not know or care who used the feature. For example - If I were going to gather info on my CabMaker (which I have not done), I would first ask the user if it is ok and then I would provide them with a configuration that they could turn on / off anytime they want. The info could be something like this for Cabinet counts: Standard=155 Sink=6 Angled=1 Return=5 Left Blind=0 Rignt Blind=0 Tall=1 This combined with users emailing me with wish lists would help me streamline the priorities for further programming.
  • Need help with specific dimension plugin

    11
    0 Votes
    11 Posts
    1k Views
    K
    Oh, my! It works! Thank you guys so so much! TIG you are a Ruby wizard! Thank you for your patience So, here is my final result: http://youtu.be/nqLcLDSt1pM?hd=1
  • Wrong cloning of Sketchup::Color objects

    9
    0 Votes
    9 Posts
    1k Views
    Dan RathbunD
    @fredo6 said: However, and wrongly, I thought Sketchup::Color was just an encapsulation of a 4-value array ... But that does bring up a very good point, that because it is compatible with an array (ie, has a to_a method and it's constructor accepts an array,)... making a clone method is beyond simple: For Ruby 2.0+; module Fredo6;;Cloner refine ;;Sketchup;;Color do def clone() self.class;;new(self.to_a) end end end using Fredo6;;Cloner module Fredo6;;SomePlugin # code that uses refined Color class end
  • Error message : 'reference to deleted Entities'

    6
    0 Votes
    6 Posts
    1k Views
    J
    Wild guess - he started a New model and so the @entities variable now refers to an invalid collection.
  • Ruby Classes

    2
    0 Votes
    2 Posts
    7k Views
    Rich O BrienR
    You could also just use the forums to ask questions as you hit problems.
  • Script to automate Texturing a surface -&gt; Render

    2
    0 Votes
    2 Posts
    501 Views
    C
    Here's what my input/output folders look like after the script: http://i.imgur.com/9yTBr90.png
  • SketchUp Debugging for Notepad++

    22
    0 Votes
    22 Posts
    4k Views
    J
    @ying2014 said: hello ,jim I use Press F5 to starting Sketchup Which version of SketchUp is being launched? Is the file "SURubyDebugger.dll" located in the correct folder (as in the image for SketchUp 16?) [image: Y3uS_2016-04_383.jpg] Does SketchUp start completely, or does it freeze? When started with the debug server, SketchUp will appear to freeze while it is waiting for a "start" or "continue" command from Notepad++. Is you firewall set to allow connections to SketchUp?
  • [Code] Sketchup.send_action() : Arguments to

    22
    0 Votes
    22 Posts
    8k Views
    D
    it's been a while and maybe everyone has lost interest, but I found a few more for the mac list... the big question is, how many of these run on a PC? single # denotes a Menu Title, ## Item Title, ### hard coded shortcut combo... # SketchUp Sketchup.send_action('showAboutBox;') ## About SketchUp Sketchup.send_action('showSketchUpPreferences;') ## Preferences... Sketchup.send_action('manageLicenses;') ## License... Sketchup.send_action('checkWebUpdate;') ## Check Web for Update... Sketchup.send_action('hide;') ## Hide SketchUp ### ⌘H Sketchup.send_action('hideOtherApplications;') ## Hide Others ### ⌘H Sketchup.send_action('unhideAllApplications;') ## Show All Sketchup.send_action('terminate;') ## Quit SketchUp ### ⌘Q # File Sketchup.send_action('newDocument;') ## New ### ⌘N Sketchup.send_action('openDocument;') ## Open... ### ⌘O Sketchup.send_action('clearRecentDocuments;') ## Clear Menu Sketchup.send_action('performClose;') ## Close ### ⌘W Sketchup.send_action('saveDocument;') ## Save ### ⌘S Sketchup.send_action('saveDocumentAs;') ## Save As... ### ⇧⌘S Sketchup.send_action('saveCopy;') ## Save A Copy As... Sketchup.send_action('saveAsTemplate;') ## Save As Template... Sketchup.send_action('revertDocumentToSaved;') ## Revert Sketchup.send_action('sendToLayOut;') ## Send to LayOut Sketchup.send_action('importFromGoogleEarth;') ## Add Location... Sketchup.send_action('clearLocation;') ## Clear Location Sketchup.send_action('toggleTerrain;') ## Show Terrain Sketchup.send_action('browse3DWarehouse;') ## Get Models... Sketchup.send_action('shareWithGoogleEarthCommunity;') ## Share Model... Sketchup.send_action('runImporter;') ## Import... Sketchup.send_action('runPageLayout;') ## Page Setup... ### ⇧⌘P Sketchup.send_action('runDocumentSetup;') ## Document Setup... Sketchup.send_action('printDocument;') ## Print... ### ⌘P # Edit Sketchup.send_action('editUndo;') ## Undo ### ⌘Z Sketchup.send_action('editRedo;') ## Redo ### ⇧⌘Z Sketchup.send_action('cut;') ## Cut ### ⌘X Sketchup.send_action('copy;') ## Copy ### ⌘C Sketchup.send_action('paste;') ## Paste ### ⌘V Sketchup.send_action('pasteInPlace;') ## Paste In Place Sketchup.send_action('editDelete;') ## Delete Sketchup.send_action('eraseConstructionGeometry;') ## Delete Guides Sketchup.send_action('selectAll;') ## Select All ### ⌘A Sketchup.send_action('deselectAll;') ## Select None ### ⇧⌘A Sketchup.send_action('editHide;') ## Hide ### ⌘E Sketchup.send_action('editUnhide;') ## Selected Sketchup.send_action('editUnhideLast;') ## Last Sketchup.send_action('editUnhideAll;') ## All ### ⇧⌘E Sketchup.send_action('editLock;') ## Lock Sketchup.send_action('editUnlockSelected;') ## Selected Sketchup.send_action('editUnlockAll;') ## All Sketchup.send_action('makeComponent;') ## Make Component... ### ⇧⌘G Sketchup.send_action('makeGroup;') ## Make Group ### ⌘G Sketchup.send_action('closeGroupOrComponent;') ## Close Group/Component ### ⇧⌘G Sketchup.send_action('intersectWithModel;') ## With Model Sketchup.send_action('intersectSelected;') ## With Selection Sketchup.send_action('intersectWithContext;') ## With Context # View Sketchup.send_action('toggleToolPalette;') ## Large Tool Set Sketchup.send_action('toggleSolidModelToolPalette;') ## Solid Tools Sketchup.send_action('toggleGoogleToolPalette;') ## Location Sketchup.send_action('toggleWarehouseToolPalette;') ## Warehouse Sketchup.send_action('togglePageTabsDsiplay;') ## Scene Tabs Sketchup.send_action('viewShowHidden;') ## Hidden Geometry Sketchup.send_action('sectionToggleDisplay;') ## Section Planes Sketchup.send_action('sectionToggleActivation;') ## Section Cuts Sketchup.send_action('viewShowAxes;') ## Axes Sketchup.send_action('viewShowGuides;') ## Guides Sketchup.send_action('toggleShadows;') ## Shadows Sketchup.send_action('toggleFog;') ## Fog Sketchup.send_action('toggleDisplayEdges;') ## Edges Sketchup.send_action('toggleDisplayBackEdges;') ## Back Edges Sketchup.send_action('toggleProfiles;') ## Profiles Sketchup.send_action('toggleDepthQue;') ## Depth Cue Sketchup.send_action('toggleExtensions;') ## Extension Sketchup.send_action('toggleGlobalTransparency;') ## X-ray Sketchup.send_action('renderWireframe;') ## Wireframe Sketchup.send_action('renderHiddenLine;') ## Hidden Line Sketchup.send_action('renderShaded;') ## Shaded Sketchup.send_action('renderTextures;') ## Shaded With Textures Sketchup.send_action('renderMonochrome&#058;') ## Monochrome Sketchup.send_action('toggleHideRestOfModel;') ## Hide Rest of Model Sketchup.send_action('toggleHideSimilarComponents;') ## Hide Similar Components Sketchup.send_action('pageAdd;') ## Add Scene Sketchup.send_action('pageUpdate;') ## Update Scene Sketchup.send_action('pageDelete;') ## Delete Scene Sketchup.send_action('pagePrevious;') ## Previous Scene Sketchup.send_action('pageNext;') ## Next Scene Sketchup.send_action('slideshowStart;') ## Play Sketchup.send_action('pageOptions;') ## Settings Sketchup.send_action('toggleToolbarShown;') ## Hide Toolbar Sketchup.send_action('runToolbarCustomizationPalette;') ## Customize Toolbar ... # Draw Sketchup.send_action('selectLineTool;') ## Line ### ⌘L Sketchup.send_action('selectFreehandTool;') ## Freehand ### ⌘F Sketchup.send_action('selectArc3PointTool;') ## Arc ### ⌘J Sketchup.send_action('selectArcTool;') ## 2 Point Arc Sketchup.send_action('select3PointFitArcTool;') ## 3 Point Arc Sketchup.send_action('selectArcPieTool;') ## Pie Sketchup.send_action('selectRectangleTool;') ## Rectangle ### ⌘K Sketchup.send_action('selectRectangle3PointTool;') ## Rotated Rectangle Sketchup.send_action('selectCircleTool;') ## Circle Sketchup.send_action('selectPolygonTool;') ## Polygon # Camera Sketchup.send_action('viewUndo;') ## Previous Sketchup.send_action('viewRedo;') ## Next Sketchup.send_action('viewTop;') ## Top ### ⌘1 Sketchup.send_action('viewBottom;') ## Bottom ### ⌘2 Sketchup.send_action('viewFront;') ## Front ### ⌘3 Sketchup.send_action('viewBack;') ## Back ### ⌘4 Sketchup.send_action('viewLeft;') ## Left ### ⌘5 Sketchup.send_action('viewRight;') ## Right ### ⌘6 Sketchup.send_action('viewIso;') ## Iso ### ⌘7 Sketchup.send_action('viewParallelProjection;') ## Parallel Projection Sketchup.send_action('viewPerspective;') ## Perspective Sketchup.send_action('viewTwoPointPerspective;') ## Two-Point Perspective Sketchup.send_action('cameraMatchNewPhoto;') ## Match New Photo... Sketchup.send_action('editPhotoMatch;') ## Edit Matched Photo Sketchup.send_action('selectOrbitTool;') ## Orbit ### ⌘B Sketchup.send_action('selectDollyTool;') ## Pan ### ⌘R Sketchup.send_action('selectZoomTool;') ## Zoom Sketchup.send_action('selectFieldOfViewTool;') ## Field of View Sketchup.send_action('selectZoomWindowTool;') ## Zoom Window Sketchup.send_action('viewZoomExtents;') ## Zoom Extents Sketchup.send_action('viewZoomToSelection;') Sketchup.send_action('viewZoomImage;') ## Zoom to Photo Sketchup.send_action('selectPositionCameraTool;') ## Position Camera Sketchup.send_action('selectWalkTool;') ## Walk Sketchup.send_action('selectTurnTool;') ## Look Around Sketchup.send_action('selectImageIglooTool;') ## Image Igloo # Tools Sketchup.send_action('selectSelectionTool;') ## Select Sketchup.send_action('selectEraseTool;') ## Eraser Sketchup.send_action('selectPaintTool;') ## Paint Bucket Sketchup.send_action('selectMoveTool;') ## Move ### ⌘0 Sketchup.send_action('selectRotateTool;') ## Rotate ### ⌘8 Sketchup.send_action('selectScaleTool;') ## Scale ### ⌘9 Sketchup.send_action('selectPushPullTool;') ## Push/Pull Sketchup.send_action('selectExtrudeTool;') ## Follow Me Sketchup.send_action('selectOffsetTool;') ## Offset Sketchup.send_action('selectOuterShellTool;') ## Outer Shell Sketchup.send_action('selectUnionTool;') ## Union Sketchup.send_action('selectDifferenceTool;') ## Subtract Sketchup.send_action('selectDifferenceNDTool;') ## Trim Sketchup.send_action('selectIntersectTool;') ## Intersect Sketchup.send_action('selectBooleanSplitTool;') ## Split Sketchup.send_action('showSolidModelToolsMenu;') ## Split Sketchup.send_action('selectMeasureTool;') ## Tape Measure ### ⌘D Sketchup.send_action('selectProtractorTool;') ## Protractor Sketchup.send_action('selectAxisTool;') ## Axes ### ⌘F Sketchup.send_action('selectDimensionTool;') ## Dimensions Sketchup.send_action('selectTextTool;') ## Text Sketchup.send_action('doThreeDText;') ## 3D Text Sketchup.send_action('selectSectionPlaneTool;') ## Section Plane ### ⌘Y # Window Sketchup.send_action('performMiniaturize;') ## Minimize ### ⌘M Sketchup.send_action('performZoom;') ## Zoom Sketchup.send_action('showModelPropertiesPanel;') ## Model Info ### ⇧⌘I Sketchup.send_action('entityProperties;') ## Entity Info ### ⌘I Sketchup.send_action('orderFrontColorPanel;') ## Materials ### ⇧⌘C Sketchup.send_action('showComponentBrowser;') ## Components Sketchup.send_action('showStyleBrowser;') ## Styles Sketchup.send_action('showLayerPanel;') ## Layers Sketchup.send_action('showOutliner;') ## Outliner Sketchup.send_action('showPagePanel;') ## Scenes Sketchup.send_action('orderFrontFontPanel;') ## Show Fonts ### ⌘T Sketchup.send_action('showRubyConsole;') ## Ruby Console Sketchup.send_action('showShadowsPanel;') ## Shadows Sketchup.send_action('showFogSettingsPanel;') ## Fog Sketchup.send_action('showPhotoMatchPanel;') ## Match Photo Sketchup.send_action('showSoftenEdgesPanel;') ## Soften Edges Sketchup.send_action('showInstructor;') ## Instructor Sketchup.send_action('browse3DWarehouse;') ## 3D Warehouse Sketchup.send_action('browseExtensionStore;') ## Extension Warehouse Sketchup.send_action('toggleInspectors;') ## Hide Dialogs Sketchup.send_action('getPhotoTexture;') ## Photo Textures !!!!!!!!!!!! not working Sketchup.send_action('arrangeInFront;') ## Bring All to Front # Help Sketchup.send_action('showWelcomePanel;') ## Welcome To SketchUp… Sketchup.send_action('showOnlineHelpCenter;') ## Knowledge Center Sketchup.send_action('contactUs;') ## Contact Us # Orphans Sketchup.send_action('fixNonPlanarFaces;') ## Model Info >> Statistics >> Fix Problems I may have missed some... john
  • Web dialog not displaying local image

    7
    0 Votes
    7 Posts
    934 Views
    D
    here's that toolbar example http://sketchucation.com/forums/viewtopic.php?p=363402#p363402... personally I avoid jpg like the plague and would go for png... require 'base64' File.open('imagetobase64.png', 'r') do |image_file| puts Base64.encode64(image_file.read) end john

Advertisement