🔌 Smart Spline | Fluid way to handle splines for furniture design and complex structures. Download
  • PLUGIN - some help please

    4
    0 評價
    4 貼文
    444 瀏覽
    xombie1912X
    @tig said: So, what I see is a parametric 'box', which is an effective 'wall'. What is it you are trying to do in a SketchUp Plugin ? There are already some examples of parametric forms - e.g. su_shapes available from the EW... THANKS TIG i want to do a block workflow this is a older research i made with autocad and sketchup http://www.youtube.com/watch?v=Q4hqt_aNuog sorry its in spanish language because its an older research i made its like revit or archicad the problem i have in this research its the time for export and the materials and my new research i want to do its make a plugin can swap 1 component and other instances for other component with no exactly the same name example in autocad i use component bed-A if i export to sketchup i want to select and replace for bed-B or bed-C bed-A its a line block in autocad bed-B its model for sketchyp in the same folder the bed-A is and the bed-C its proxy the final result you can swap or replace every autocad blocks you work for sketchup 3d models or proxys with a few clicks in sketchup
  • Delete hidden geometry

    3
    0 評價
    3 貼文
    2k 瀏覽
    B
    Ok found it, I installed the thomthom's CleanUp toolset and using the "merge faces" did the trick (5119 faces merged). Saved me a lot of work thanks for the suggestion! Regards, Boein
  • Test Comp to see if it has Nested Components

    4
    0 評價
    4 貼文
    437 瀏覽
    Dan RathbunD
    A bit shorter ...more brute force. The any? enumerable method returns boolean and stops on the first true result: return unless obj.respond_to?(;manifold?) ents = obj.entities rescue obj.definition.entities any = ents.any? {|e| e.is_a?(Sketchup;;ComponentInstance) } exp = any ? "Yes" ; "No"
  • PolygonMesh triangulation... ?

    23
    0 評價
    23 貼文
    3k 瀏覽
    thomthomT
    IN Ruby 1.8 for loops used to be faster - at least in the tests I performed on my extensions. But Ruby 2.0 swapped that around. In any case - you don't really know until you profile your specific case.
  • Plane

    3
    0 評價
    3 貼文
    402 瀏覽
    S
    As happens too often in the API docs, they give a technically correct but superficial definition and expect you to figure it out on your own. If you care, when a plane is represented as [Point3d, Vector3d] The point is a location on the plane, and the vector is the normal to the plane. When a plane is represented as a four-element array, the first three values are the x,y,z components of the normal vector to the plane, and the fourth value is the distance from the origin to the plane along the normal vector. Face#plane returns this version.
  • Passing instructions to active tools

    4
    0 評價
    4 貼文
    395 瀏覽
    thomthomT
    Yea, even the Line tool has a lot of details. I've been replicating Rotate and Move in Vertex Tools. So much more than I originally though. Recently I started on a custom version of PushPull - it's giving me nightmares...
  • Geometry in which group after boolean subtract??

    3
    0 評價
    3 貼文
    376 瀏覽
    Dan RathbunD
    Also, if the subtract statement is the last one evaluated in the method, it's result will be the return object from the method itself. Otherwise you can insert a statement like: return result as the last statement.
  • Getting Rotation Value From Rotate Tool

    4
    0 評價
    4 貼文
    381 瀏覽
    Dan RathbunD
    @kayeee said: Thank you! Exactly what I needed! To see how to wrap that up into a macro file, look at the sample I posted here: forums.sketchup: [Code] Determining Angle Between View and Model’s Axes
  • How to pushpull through a 3d object?

    4
    0 評價
    4 貼文
    486 瀏覽
    TIGT
    Make the new geometry inside a temporary group. Make edges, find_faces of one edge you know will be the loop. Get a reference to the face as I shewed... PushPull in the group. Explode the group when done. If you have a series of ordered points [or edges] they will work with add_face If you have a 'donut shape' face, you need to make the inner face [that will eventually be a hole], get a reference to it, then make the outer face, now erase the inner face to leave a hole. Or find_faces for inner and outer loops' edges, then collect the faces into an array faces=gents.grep(Sketchup;;Face) faces.each{|face| face.erase! if face.loops.length == 1 ## the face with will be the hole - erase it. face.loops.length > 1 ## will be the donut. }
  • Add_face from edges??

    8
    0 評價
    8 貼文
    738 瀏覽
    Dan RathbunD
    @wawmsey7 said: > edge1.transform!(tr) > again the edge draws fine but my rotation code throws up an error! Matt, have the Ruby Console open when testing code, and paste the error message in the post, if your asking about Ruby errors. The first error message line in the backtrace will contain a sub-string like: “filename:lineNo: inmethod'”or “filename:lineNo.”` which tells you exactly what ruby script, it's line number, and possibly the method that it occurred within. The message tells you (usually) exactly what went wrong. For example, Error: #<NoMethodError: undefined methodtransform!' for #Sketchup::Edge:0x00000009e8e690>... tells you that the Sketchup::Edge class has no instance method named " transform!`". So at that point your quickest way to resolve your dilemma, is to go to the API's Method index, and find methods in the "T" category that have to do with transformations. See Exception class, backtrace() method. And more generally dealing with exceptions.
  • Can't glue to face that Sketchup thinks is deleted

    6
    0 評價
    6 貼文
    517 瀏覽
    TIGT
    @Dan you are right. Typo mess. I've corrected the original post.
  • [code] On Screen GUI RGB Colorpicker

    14
    0 評價
    14 貼文
    3k 瀏覽
    D
    download the ruby file... open SU menu >> 'Window' >> 'Ruby Console' copy/paste/return the first line load "~/Downloads/rgb_picker.rb" should return true in 'RC' if that's of your path... copy/paste/return the second line... Sketchup.active_model.select_tool(Col_pick.new) should work... hit spacebar to close the color picker... john
  • Making submenu

    7
    0 評價
    7 貼文
    706 瀏覽
    K
    Ok, Thanks, Dan I will be able to fix it by myself ) Thank you!!
  • Vertex ordering problem

    8
    0 評價
    8 貼文
    673 瀏覽
    tt_suT
    We actually had this issue with the STL exporter. STL doesn't have object hierarchy so we must export everything into one big mesh. See issue here: https://github.com/SketchUp/sketchup-stl/issues/129 Then I think the commit that fixed was this one: https://github.com/SketchUp/sketchup-stl/commit/4ad199a2d46245f2a668e47f2ee81bc36c9b9763
  • SDK: Get Images data

    7
    0 評價
    7 貼文
    728 瀏覽
    tt_suT
    @marc477 said: What is the equivalent of SUTextureGetImageData for a SUImageRef? How can I access images pixel data? Update - SUImageGetData should be equivalent. http://www.sketchup.com/intl/en/developer/su-api/image_8h.html#aedb99aee21a39619602866fc400766cb
  • Google Code Shutting Down

    5
    0 評價
    5 貼文
    484 瀏覽
    thomthomT
    I'll ping Chris as well.
  • Win32ole access violation

    5
    0 評價
    5 貼文
    653 瀏覽
    icehuliI
    I think you need to use another thread for the WinForm windows, e.g MessageBox. I checked the following code. It works. It actually makes more sense to let the WinForm window in a separate thread other than the Sketchup's thread. Imports System.Windows.Forms Public Class MyFunctions Private Sub showMessage(ByVal msg As String) MessageBox.Show(msg) End Sub Public Function AddMyValues() Dim Result As Double Result = 20 Dim t1 As New Threading.Thread(AddressOf showMessage) t1.Start(Result) Return Result End Function End Class
  • Odd results from add_circle/add_face combo

    10
    0 評價
    10 貼文
    853 瀏覽
    thomthomT
    [image: 0Fbs_2015-04-06_21h44_53.png] For for me as well - SU2015 Win8.1. Have you tried with extension disabled?
  • Exit a script before it completes

    4
    0 評價
    4 貼文
    486 瀏覽
    G
    My client wants to be able to stop the process. I've got him copying a file named stop.txt into a folder. I check it every loop. Works great.
  • Start_operation/commit_operation with sandboxTools

    10
    0 評價
    10 貼文
    674 瀏覽
    fredo6F
    Just published the API in the main TopoShaper thread. Documentation is attached in the main post. Fredo

Advertisement