⚠️ Important | Libfredo 15.6b introduces important bugfixes for Fredo's Extensions Update
  • All faces with their backs facing the camera.

    9
    0 評價
    9 貼文
    524 瀏覽
    M
    i now my idea sounds insane but it could be a good way for those who model building as boxes with no details inside them. But really thank you for all the great help
  • Instructor content

    84
    0 評價
    84 貼文
    9k 瀏覽
    Dan RathbunD
    Here's a version cleaned up and made into a Mixin module. Added Class Variables declarations: # CLASS VARIABLES @@relative_instructor_path = '' @@temp_instructor_folder = false @@tool_filepath = '' # must be redefined in the Tool class for rbs files Added method definitions: public def relative_instructor_path return @@relative_instructor_path end def temp_instructor_folder return @@temp_instructor_folder end private # initialize() # # Likely to be redefined in the Tool class definition. # We define it here just in case the Tool author does not. # def initialize help_setup() end # help_setup( instructor_folder=false, temp_folder=false ) # # Sets up and inits some instance variables used for # the tool's Instructor help system. # # ** Must be called by the Tool's initialize() method. ** # def help_setup(instructor_folder=false, temp_folder=false) # if @@tool_filepath.empty? if __FILE__ != '(eval)' && File.exist?(File.expand_path(__FILE__)) @@tool_filepath = __FILE__ else raise(ScriptError,"#{self.class.name}; @@tool_filepath class variable error. @@tool_filepath must be declared for rbs files!") end else unless File.exist?(File.expand_path(@@tool_filepath)) raise(ScriptError,"#{self.class.name}; @@tool_filepath class variable error. File '#{@@tool_filepath}' does not exist!") end end # if instructor_folder @instructor_folder = instructor_folder else @instructor_folder = getDefaultInstructorFolder() end if temp_folder @temp_folder = temp_folder elsif RUBY_PLATFORM =~ /darwin/i # on a Mac @temp_folder = @instructor_folder else @temp_folder = getDefaultTempFolder() end # @@relative_instructor_path = returnRelativePath() # end #def help_setup() and: # getInstructorContentDirectory() # # Callback for tool to give Sketchup the relative path # to the tool's help directory. # def getInstructorContentDirectory unless @@temp_instructor_folder # copy help files copyInstructor() @@temp_instructor_folder = returnTempInstructorFolderName() end return @@relative_instructor_path end #def I did not make any changes to the "engine" methods, except: getDefaultInstructorFolder() changed all __FILE__ to @@tool_filepath returnTempInstructorFolderName() inserted a 'short circuit' as the first line, for Macs return @temp_folder if @temp_folder == @instructor_folder File Removed - Get the latest version in Niall's [ code ] topic: [ code ] Load Instructor I also wonder if there should be an AppObserver instance that deletes the temp/instructor file at the end of the session ??
  • Rename the names of the materials

    4
    0 評價
    4 貼文
    332 瀏覽
    bagateloB
    TIG I'm so grateful for your help. But if I like to complete clean old names, and serialize by numbers? Thanks again. This is great to me.
  • Orient Faces

    3
    0 評價
    3 貼文
    3k 瀏覽
    M
    Great, it does the job for me. Thanks again
  • Over right the face class

    4
    0 評價
    4 貼文
    278 瀏覽
    M
    Tig you are right, using AttributeDeictionary is the right way to go and does exactly what i need. Thank you
  • Zoom Selection

    36
    0 評價
    36 貼文
    6k 瀏覽
    D
    @pixero said: @cadfather said: if i select something inside of a group it does not work - but will fit the contents to screen if nothing is selected. What do you mean with "It doesnt work" ? What do you want it to do? If you are inside a group the group itself isn't selected. My script zooms in to whats selected. Inside group or not. Thx a lot! Great plugin. Work fine, no problem with selection zoom. Can you recommend me any other useful plug?
  • Lock an object with password?

    8
    0 評價
    8 貼文
    422 瀏覽
    Rich O BrienR
    SimLab have a plugin that exports to PDF
  • Urgent question to the ruby API gurus

    2
    0 評價
    2 貼文
    229 瀏覽
    thomthomT
    Change the camera: http://code.google.com/apis/sketchup/docs/ourdoc/camera.html#set
  • Ruby created images not ok?

    3
    0 評價
    3 貼文
    295 瀏覽
    P
    Hey Tig, Thx for the answer. Why i am not using teh animation exporter is because it skips page observers. Since changing from one page to another invokes a function in my model i cannot use it. That's why i'm looking for an alternative to create movies. You think it's possible that adding the compression an transparent factor solves the issue? Cause i have also tried it with images generated by Export-->2D graphic and that had the same error. Thx!
  • Uploading JSON with js/php

    4
    0 評價
    4 貼文
    322 瀏覽
    chrisglasierC
    The answer from Stack Overflow is: <span class="syntaxhtml">d&nbsp;=&nbsp;<span class="syntaxdefault"><?php&nbsp;</span><span class="syntaxkeyword">echo&nbsp;</span><span class="syntaxdefault">json_encode</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">$target_path</span><span class="syntaxkeyword">);&nbsp;</span><span class="syntaxdefault">?></span>;</span> They pointed out this is only useful if you are working with localhost.
  • Newbie's anxiety ---- simple question

    3
    0 評價
    3 貼文
    250 瀏覽
    B
    really helpful!!! thanks a lot
  • Face front side outwards

    3
    0 評價
    3 貼文
    551 瀏覽
    mitcorbM
    Hi, morci429: Perhaps this recent development from honoluludesktop? http://forums.sketchucation.com/viewtopic.php?t=32088#p283327
  • UI.openpanel - wildcard bug

    7
    0 評價
    7 貼文
    816 瀏覽
    Dan RathbunD
    @honoluludesktop said: Someone previously showed me that it works this way. chosen_file=UI.openpanel("Select DXF File","", "*.Dxf") And also like: chosen_file=UI.openpanel("Select DXF File","*.Dxf") However... Windows will use it's own directory paths it automatically saves into the Registry, for each file extension. (1) If the openpanel has never before selected a *.dxf file, then the openpanel will (likely) open in the user's My Documents folder. (2) If the User did previously select a *.dxf file, with the openpanel, Windows will open in the Most Recently Used (MRU) path Windows saved for the *.dxf extention. Setting the working directory via Dir.chdir has no effect on what directory the openpanel starts in.
  • Get group location over Ruby Script

    10
    0 評價
    10 貼文
    3k 瀏覽
    H
    @tig said: tr=group.transformation to that point pt.transform!(tr) Thank you very much for the tip !
  • Ruby &lt;-&gt; cmd command line: How to get return value?

    4
    0 評價
    4 貼文
    4k 瀏覽
    TIGT
    This might be clearer ruby: x="E;/new_batch.cmd" UI.openURL(x) returns true batch file: @echo off echo "Hello World" echo pause exit Waits for you to close it... x="file:/E:/new_batch.cmd" will also work... Writing the bat or cmd file to the root directory would probably be better if it were into a Temp folder ?
  • How to add coordinate into SU api

    20
    0 評價
    20 貼文
    2k 瀏覽
    Dan RathbunD
    @borg.stef said: ... and it gives me this error: #<NoMethodError: undefined methodpoint3d' for Geom:Module>` Because methods begin with lower case identifiers. Class (and Module,) indentifiers are titlecase. @borg.stef said: How can i put a simple model in the required location? I did the following coding: model = Sketchup.active_model pt = Geom::point3d.new(0,0,0) tr = Geom::Transformation.new(pt) model.transform!(tr) The model origin is already at [0,0,0], and there is a constant ORIGIN for it. So your code above does nothing.
  • Slicer-excellent ruby

    19
    0 評價
    19 貼文
    11k 瀏覽
    TIGT
    I have reported the weirdness to the powers that be at Google - it is certainly reproducible although I had never seen it before... Meanwhile the temp fix 'Triangulate Faces' is here http://forums.sketchucation.com/viewtopic.php?p=175613#p175613 for the rest of you...
  • Calculating bezier curve smoothness?

    7
    0 評價
    7 貼文
    615 瀏覽
    mitcorbM
    Check his updates at the end of the article also.
  • Api-diagram

    5
    0 評價
    5 貼文
    447 瀏覽
    Dan RathbunD
    @larsen said: Please, is this api diagram correct? NO (you should remove it.) Thanks for taking it down Larsen There are links to the available diagrams: SketchUp Ruby API - Class Diagram http://code.google.com/apis/sketchup/docs/diagram.html Sketchup Ruby API Class Diagrams by Jim Foltz http://sketchuptips.blogspot.com/2008/08/sketchup-ruby-api-class-diagrams.html
  • Calculating the final vertices of a nested face

    3
    0 評價
    3 貼文
    327 瀏覽
    S
    @tig said: Have you tried tr=container.transformation.inverse and applying it to the initial object and then iterating and getting/setting the transformation for the container's container etc until you get to the model level... That didn't seem to work (inverse), though I may very well have misunderstood what you meant, but what you said gave me an answer anyway. By applying the transform to the points at each container successively, it works perfectly! (or at least in every test so far) Which is how I should have tried it initially but I was thinking from a performance standpoint, and forgot the old adage "premature optimization is the root of all evil" def WALK.GetParent(ent) Sketchup.active_model.start_operation("Walk") model = Sketchup.active_model @newg = model.entities.add_group m = model.materials.add "test" m.color="red" orig = ent tpos = Geom;;Point3d.new 0,0,0 # keep track of origin trans = Geom;;Transformation.new(Geom;;Point3d.new(0,0,0)) # add transforms to this vertices = orig.outer_loop.vertices.map {|v| v.position.clone} while (ent.respond_to?('parent') ) # walk up hierarchy if ((ent.is_a? Sketchup;;ComponentDefinition)) if ent.group? t = ent.instances[0].transformation # Get the group's transform vertices.each_with_index do |v,i| vertices[i].transform! t end end ent = ent.instances[0] # become the instance end ent = ent.parent end f = @newg.entities.add_face vertices # create the face f.material=m Sketchup.active_model.commit_operation end Thanks again for the help!

Advertisement