⚠️ Important | Libfredo 15.6b introduces important bugfixes for Fredo's Extensions Update
  • Drop Geometry to Surface - Brainstorming for methods

    12
    0 Votes
    12 Posts
    1k Views
    thomthomT
    @notareal said: Maybe kirill2008 Stick groups to mesh can inspire http://forums.sketchucation.com/viewtopic.php?t=24676 Same as Jeff's link.
  • Geom::Transformation.new(pt, xaxis, yaxis)

    14
    0 Votes
    14 Posts
    2k Views
    C
    @thomthom said: No - I wondered if it preserved it. I wanted to only move and rotate the object to a new plane. I wondered if this method would be an option as oppose to combining a translation and two rotation transformations. Well, first you have to determine which axis gets priority (because the angles between the axes in the original transformation may not be the same as the angles between the axes the user picked) then measure the angles between the prioritized axis and the other two, and apply the angles to the user axes (including face normal). I'm pretty sure that doesn't make sense but I can't think of how else to describe it. If you have any specific questions, I might be able to help a bit more.
  • ComponentDefinition.instances strange behavior. Bug?

    3
    0 Votes
    3 Posts
    305 Views
    V
    Thanks!
  • Removing entity observers

    7
    0 Votes
    7 Posts
    1k Views
    Dan RathbunD
    @dmac said: removeMaterials takes more time after calling addObservers/removeObservers again. What is taking the time if the observers aren't active? Some of us are suspicous about the remove_observer() (I recall some other topics, here at SCF where other people reported slow downs as the number of model entities increased. Do a search on this forum.) When you are done with an observer instance, set it to nil and run Garbage Collection. GC.start Also: @@watchedFaces.each { |f, o| needs to be: @@watchedFaces.each_with_index { |f, o| if you are using an Array... ... but I think you want to use a Hash instead, where the keys are the object_id of the face objects, and the Hash values are references to the observer instance that is attached to it. @@watchedFaces = Hash.new model.entities.to_a.each { |e| (@@watchedFaces[e.object_id]=MyEntityObserver.new) if e.instance_of?(Sketchup::Face) } (Since the entity is getting a 'change' by attaching an observer, it is smart, to iterate an array, rather than the C++ entities collection directly.) If there are Groups and Components in the model, then the above will only find "free" face objects, not faces nested down in Group or Component hierarchies.
  • Exporting as a solid object for 3D printing?

    5
    0 Votes
    5 Posts
    476 Views
    Didier BurD
    Hi, @unknownuser said: Was just wondering if there was a known way of makign a solid and not just a 'surface' based model The 3D printing file formats (most of them AFAIK) are not based on solid(s) description(s). The STL format for instance (even if it starts with "solid" and ends with "endsolid" keywords) is just a watertight mesh of triangles.
  • Resizing images via SU Ruby

    2
    0 Votes
    2 Posts
    326 Views
    thomthomT
    Oh crap. That linked to a PHP library... ?
  • Select a Group in Ruby code instead of using the mouse

    3
    0 Votes
    3 Posts
    378 Views
    TIGT
    If you want to clear any previous selection first use... Sketchup.active_model.selection.clear then Sketchup.active_model.selection.add(mogroup)
  • [SOLVED]set standard view

    15
    0 Votes
    15 Posts
    1k Views
    P
    Overview of the code for each standard view (informative) Top direction = Z_AXIS.reverse Sketchup.active_model.active_view.camera.set( ORIGIN, direction, direction.axes.y) Sketchup.active_model.active_view.zoom_extents Bottom direction = Z_AXIS Sketchup.active_model.active_view.camera.set( ORIGIN, direction, direction.axes.y) Sketchup.active_model.active_view.zoom_extents Front direction = Y_AXIS Sketchup.active_model.active_view.camera.set( ORIGIN, direction, direction.axes.y) Sketchup.active_model.active_view.zoom_extents Back direction = Y_AXIS.reverse Sketchup.active_model.active_view.camera.set( ORIGIN, direction, direction.axes.y) Sketchup.active_model.active_view.zoom_extents Left direction=X_AXIS Sketchup.active_model.active_view.camera.set( ORIGIN, direction, direction.axes.y) Sketchup.active_model.active_view.zoom_extents Right direction=X_AXIS.reverse Sketchup.active_model.active_view.camera.set( ORIGIN, direction, direction.axes.y) Sketchup.active_model.active_view.zoom_extents Iso direction=Geom;;Vector3d.new -0.666667, 0.666667, -0.333333 Sketchup.active_model.active_view.camera.set( ORIGIN, direction, direction.axes.y) Sketchup.active_model.active_view.zoom_extents This emulates the standard cameras, combined with zoom extents. Credits to ThomThom!
  • Render options - profile only?

    4
    0 Votes
    4 Posts
    366 Views
    Dan RathbunD
    @honoluludesktop said: Not the profile in "styles"? NO ... That is DrawSilhouettes in the Page's rendering_options hash. rendering_options['DrawProfilesOnly'] must have been related (or was intended to be used for something related.)
  • Plugin for Sketchup using VB.NET or C#

    7
    0 Votes
    7 Posts
    10k Views
    P
    i'm not into the dll stuff, but i'm currently working on communication between Sketchup and Microsoft PowerPoint and Microsoft Project. Win32OLE.so can be used in that case
  • An intereting question

    6
    0 Votes
    6 Posts
    379 Views
    Dan RathbunD
    @zps222 said: Is it possible that Only run the ruby script to build the model, without "openning" SketchUp. You can use Ruby to write a Collada XML file (.DAE), and then that can be imported into Sketchup.
  • Is window.location="skp:" a protocol?

    6
    0 Votes
    6 Posts
    919 Views
    Dan RathbunD
    Yup ... but really the better course would be duplex pipes.
  • Ruby widechar filenames not supported

    2
    0 Votes
    2 Posts
    291 Views
    thomthomT
    I ran into that as well. My write-up from back then: http://forums.sketchucation.com/viewtopic.php?f=180&t=20657 (Probably outdated and not 100% correct.) I had thought of doing a CExtension available, with some basic file, read,write,exist? methods - but I'm not that familiar with C yet.
  • Points equal but distance is not larger or less?

    3
    0 Votes
    3 Posts
    328 Views
    AdamBA
    Sure you know this, but if you're comparing distances rather than interested in the absolute distance, the fastest way will be to project a vector onto itself using scalar product. p1.dot(p1) < p2.dot(p2) Adam
  • JS loading problem under Mac OS X SU

    14
    0 Votes
    14 Posts
    2k Views
    Dan RathbunD
    @richmorin said: It turns out that the relative paths to my library JS (and probably CSS) were working under the browsers, but not under SU. !@#$%^ (Thanks, Dan!) Ok that's a common booboo, nothing too bad. There's a fix we talked about in another thread where we were brainstorming how to set up a "mini" 3Dwarehouse for Eric's SketchTHIS.net website: Re: Download to Sketchup button
  • Get list of colour names?

    5
    0 Votes
    5 Posts
    369 Views
    Dan RathbunD
    @thomthom said: Thought it'd be in a collection class. Like Colors (if it had existed) It is... but the collection is inside the class, where it belongs. @thomthom said: Or Sketchup.colors - as a list of the colours SketchUp recognized. That could be implemented... but would just be a method that accessed the data structure in the Color class. Don't want to overload the parent module with too many methods.
  • WebDialog Sub Forum? (Poll added)

    25
    0 Votes
    25 Posts
    2k Views
    4
    @ webdialog votes: Yes!I have in fact been using sketchup's "UI::WebDialog.new()"frequently. The Attachment below is a webdialog that contains easy-to-access tools. Contains weld, delete complanar edges, makeface, and more.Just make sure 'ToolsInDialog.rb'(file) and 'stuff'(folder) are in "Plugins".It may have errors, but it is being checked. [image: Nyif_Capture.JPG] Tools In A Dialog
  • About generating KMZ using Ruby Script instead of &quot;Click&quot;

    2
    0 Votes
    2 Posts
    321 Views
    TIGT
    Use Sketchup.active_model.export("folderpath/file.kmz",false) Next for exporting to Google Earth ? Try UI.openURL("folderpath/file.kmz") ?
  • About color

    14
    0 Votes
    14 Posts
    787 Views
    Z
    Thank you all guys
  • View.zoom(entity) for entities outside the context?

    2
    0 Votes
    2 Posts
    213 Views
    thomthomT
    Using view.zoom(entity) - then transforming the camera's eye, target and up worked.

Advertisement