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

    Topics

    • N

      About Mysql and Ruby (it's working)

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      2
      0 Votes
      2 Posts
      717 Views
      Chris FullmerC
      Ooohhh, this looks good! too.....many....cool.....projects, .....not................enough....time.......in...the..............day. <chris dies>
    • N

      About ruby mysql (need help)

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      1
      0 Votes
      1 Posts
      163 Views
      No one has replied
    • N

      What is best database solution ?

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      3
      0 Votes
      3 Posts
      231 Views
      N
      @chris fullmer said: Are you going to work on a multi-user SketchUp environment where the server database holds the actions of all users and pushes that info back out to all other users simultaneously?????? Eh, noo... not for now. Your idea is nice, anyway . What I need is to store information about materials, dimensions and other characteristics of some predefined objects that will be created. And to be able to alter that data using a webdialog interface. What is this post here? Because I find this http://www.tmtm.org/en/ruby/, but there I could find just linux packages. I don't know what I'm looking for... I just don't want to use a lot of programming languages. It's enough to me that I'm forced to use that ugly JavaScript for webdialog
    • N

      How to orient component in space using ruby?

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      11
      0 Votes
      11 Posts
      415 Views
      Chris FullmerC
      Also, in case you know nothing about axes, like me, Fredo showed me that if you multiply 2 axes together, you get a perpendicular axis. This is helpful if you can find 2 axes, say the x and y, you can just multiply them together to get the z axis. Then you have all 3 axes needed for the transformation. It would look like this: xaxis = Geom::Vector3d.new(10,-23,110) yaxis = Geom::Vector3d.new(23,52,9) zaxis = xaxis * yaxis Gives the result of: (-5927.0, 2440.0, 1049.0) for the zaxis. Chris
    • N

      How to use lock_inference ?

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      2
      0 Votes
      2 Posts
      197 Views
      Chris FullmerC
      You need to have an inputpoint for inference to work. Check out the InputPoint class for how that works. That's about all I can say. I am currently working on inputpoints too, and its going slowly. There is a good example in the utilities directory. Open utilitiestools.rb and look at the TrackMouseTool in there. It is found in Tools>Utilities>Query Tool inside of Sketchup. It uses inference points. It seems more complex than I thought it should be, but it definitely works. Chris
    • N

      "include" vs "require"

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      2
      0 Votes
      2 Posts
      246 Views
      tbdT
      5 sec search on google - What's the difference between "include" and "require" in Ruby? Answer: The include and require methods do very different things. The require method does what include does in most other programming languages: run another file. It also tracks what you've required in the past and won't require the same file twice. To run another file without this added functionality, you can use the load method. The include method takes all the methods from another module and includes them into the current module. This is a language-level thing as opposed to a file-level thing as with require. The include method is the primary way to "extend" classes with other modules (usually referred to as mix-ins). For example, if your class defines the method "each", you can include the mixin module Enumerable and it can act as a collection.
    • N

      How can I aply correct the texture?

      Watching Ignoring Scheduled Pinned Locked Moved SketchUp Discussions sketchup
      5
      0 Votes
      5 Posts
      737 Views
      soloS
      http://www.sketchucation.com/forums/scf/viewtopic.php?f=40&t=8446&st=0&sk=t&sd=a&hilit=rock
    • N

      Smart way to model small details !

      Watching Ignoring Scheduled Pinned Locked Moved SketchUp Discussions sketchup
      4
      0 Votes
      4 Posts
      474 Views
      N
      @thomthom said: I used the same method of a recent product design project. Lots of rounded edges. (and mine included an DVI plug, as oppose to your USB ) Though I for some reason found myself making the x100 version and then make an instance that was x0.001 smaller. I did that because it seemed that I still had problems creating the small faces, even though the instance was scaled up x100, which is why I scaled the definition instead. But maybe it was another problem... Leave the original on desired dimension and scale just the working-with instance. Use 10x 100x 1000x. The point is to have lines big enough to can create faces. If you round an edge with r=1mm and use 6 segments for 1/4circle arc, you will have each segment smaller than 0,3mm ! In this case 10x is ok. But are lots of situations when durring intersection you can't get faces because the distance between two lines is too small. In this case you will need 100x-1000x scalling. I used up to 1.000.000x scalling Don't be shy to scale... it's free!
    • N

      Scaled components question

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      5
      0 Votes
      5 Posts
      185 Views
      Chris FullmerC
      Good, glad I could help. It also lets you reset the skew.....I've never been able to get a component to skew though. Maybe I'm missing something? I'll go ask in the SketchUp forum. Chris
    • N

      Can we add new menus on SketchUp ?

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      8
      0 Votes
      8 Posts
      377 Views
      thomthomT
      It would be nice to add top level menu if there was a good way that users could manager all plugin menus and toolbar buttons which would override the plugin maker's.
    • N

      ** Sticky - DC TUTORIALS

      Watching Ignoring Scheduled Pinned Locked Moved Dynamic Components sketchup
      2
      0 Votes
      2 Posts
      26k Views
      M
      Interesting timing on your question! Just today I put up a tutorial here: http://www.sketchucation.com/forums/scf/viewtopic.php?f=18&t=17301 Even though it is how to make a specific "thing", I think going through the motions will give anyone a pretty good idea of what DCs are capable of. Regards, Matt
    • N

      Exploded circle not circle anymore... (request code or idea)

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      8
      0 Votes
      8 Posts
      875 Views
      N
      I played around with Curve class methods model = Sketchup.active_model edges = Sketchup.active_model.selection first_edge = edges[0] curve = first_edge.curve puts edges.count puts first_edge puts curve and for a selected circle the output was: 24 #Sketchup::Edge:0x3fc8cc0 #Sketchup::ArcCurve:0x40f86e0 but for an exploded circle i got 24 #Sketchup::Edge:0x3dbd9a8 nil The only conclusion is that add_circle method add some extra information (like center point and radius) to the circle object. And that makes the difference. One way could be to redraw selected segments with circle or arc. I'll think about this. First select wanted segments then compute the point wehere vectors perpendicular on edges intersect. Now distance from that point to a segment's vertex is the radius. First vertex on edges[0] and last vertex on edges[-1] can help to find the starting and ending angle. In the end, edges.count represents the number of segments for add_arc. Now selected segments can be replaced with an ArcCurve object. One thing remains: to check if selected edges were part of a face. If not, just redraw the arc. But if the face exists, i think an array must be created with all vertexes to redraw the face. Ok, things can become messy if selection contains other strange entities... but it can be refined. grrr... I think those guys from Google could make a lot of things more transparent here... and not just here
    • N

      How to snap?

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      8
      0 Votes
      8 Posts
      499 Views
      Chris FullmerC
      This is an entire working script, from start to finish. Save it as a .rb file and its ready to go. It installs itself as "Plugins>Mouse Tools". There are no comments in the code whatsoever. I took them all out because the ones that were there were not terribly helpful, mostly just made it hard to read the code straight through. I believe that this code is more complex than absolutely necessary because it adds a few checks to make sure it does not call the draw method unnecessarily. Hopefully this helps. I'm still confused what portions of this code are doing.... require 'sketchup.rb' class Clf_mousetools def activate @ip = Sketchup;;InputPoint.new @iptemp = Sketchup;;InputPoint.new @displayed = false end def onMouseMove(flags, x, y, view) pos = @ip.position Sketchup;;set_status_text("#{pos.x}, #{pos.y}, #{pos.z}") @iptemp.pick view, x, y if( @iptemp.valid? ) changed = @iptemp != @ip @ip.copy! @iptemp pos = @ip.position; if( changed and (@ip.display? or @displayed) ) view.invalidate end end end def draw(view) if( @ip.valid? && @ip.display? ) @ip.draw view @displayed = true else @displayed = false end end end if !file_loaded?(__FILE__) then UI.menu("Plugins").add_item("Mouse Tools") { Sketchup.active_model.select_tool Clf_mousetools.new } end file_loaded(__FILE__) Chris
    • N

      Make group from component?

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      2
      0 Votes
      2 Posts
      234 Views
      J
      I haven't looked at this in a long time, and after looking at it again I'm not sure why I did it the way I did. m=Sketchup.active_model inss=m.active_entities.find_all{|e| e.typename=="ComponentInstance"} inss.each_with_index { |ins, ind| name = ins.definition.name g = m.entities.add_group ins.explode.find_all{|e| e.typename=="Face"} g.name = name #g.to_component }
    • N

      A candle

      Watching Ignoring Scheduled Pinned Locked Moved Gallery
      4
      0 Votes
      4 Posts
      364 Views
      J
      Great model; awesome renders.
    • N

      How to make low-poly model in sketchup?

      Watching Ignoring Scheduled Pinned Locked Moved SketchUp Discussions sketchup
      8
      0 Votes
      8 Posts
      8k Views
      K
      @davidboulder said: If your model is simple architectural shape, but with a lot of underlying detail. You could export jpegs and then make a photo-matched version. Can add in as little or much detail as you would like. If you want to get more accurate textures then instead of appying through PhotoMatch, you can jsut export matching elevations and use those to texture yoru building. That's a funny method. Wouldn't really work when using photoreal render software... I think Google could add 'proxy objects' to their export routines. The Render engine developers would be happy. It would be nice if Sketchup would provide these developers with a better platform to code their apps. (Or make Sketchup itself adapted to cope with higher poly objects...)
    • N

      Full ruby documentation for SU7?

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      2
      0 Votes
      2 Posts
      355 Views
      R
      I think its currently being updated, you should be ale to find it here when its finished: http://code.google.com/apis/sketchup/
    • N

      Boundingbox.width (height, depth) related to global axes?

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      3
      0 Votes
      3 Posts
      324 Views
      N
      @cphillips said: Use the bounding box from the definition componentinstance.definition.bounds Note: if your component instance is scaled you will need to scale the bounds the same amount. Thanks a lot ! You made my day
    • N

      Change axes from ruby

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      10
      0 Votes
      10 Posts
      2k Views
      B
      Hi NewOne It looks like I misunderstood what you were after. I thought you wanted to change the Sketchup Axes before placing a component ie the orientation of a placed component is determined by the current axes orientation. There is no method for changing the axes as far as I am aware. This statement invokes the Axes tool which allows the user to set the axes orientation prior to next call Sketchup.send_action("selectAxisTool:") The place_component method places a component "modcomp" in the Model using the component placement tool. status = Sketchup.active_model.place_component modcomp, false Apologies for the confusion.
    • 1
    • 2
    • 3
    • 3 / 3