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

    Topics

    • H

      Notepad++ and SketchUp Bridge in SU8

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      8
      0 Votes
      8 Posts
      2k Views
      H
      @dan rathbun said: I actually have the bridge files installed in a common dir: %(#000000)[C:\Program Files\Google\TBD\SU_Bridge] .. and then I put a bridge_ext.rb file in each Plugin dir of the SU versions, that loads the files from the common dir. That way SUB.EXE is always in the same place, and you do not need to change the path to it within Notepad++ regardless of whatever version of Sketchup is loaded. [attachment=0:1pazsmqa]<!-- ia0 -->bridge_ext.rb<!-- ia0 -->[/attachment:1pazsmqa] This is excellent way, and it 's greatness solution ,thanks for your kindly help
    • H

      [Help!] creat a face from edges on existing face

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      13
      0 Votes
      13 Posts
      714 Views
      K
      @heven7_floor said: I just learning ruby code in SU, and found problem about draw a face onto existing face, I can identify any method in new face further , such as <span class="syntaxdefault"><br /></span><span class="syntaxkeyword">@</span><span class="syntaxdefault">cir_face </span><span class="syntaxkeyword">=</span><span class="syntaxdefault"> entities</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">add_face edges                     </span><span class="syntaxkeyword">----------></span><span class="syntaxdefault"> drawing it on existing face<br /><br />if not</span><span class="syntaxkeyword">(@</span><span class="syntaxdefault">cir_face</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">normal</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">samedirection</span><span class="syntaxkeyword">?</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">@</span><span class="syntaxdefault">dir_vec</span><span class="syntaxkeyword">)</span><span class="syntaxdefault">        </span><span class="syntaxkeyword">---------></span><span class="syntaxdefault"> get error </span><span class="syntaxstring">"undefine method 'normal' on nil "</span><span class="syntaxdefault"> <br />  puts </span><span class="syntaxstring">"change to initial direction"<br /></span><span class="syntaxdefault">  </span><span class="syntaxkeyword">@</span><span class="syntaxdefault">cir_face</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">reverse</span><span class="syntaxkeyword">!<br /></span><span class="syntaxdefault">end<br /></span> any one please help me to explain why cause of this error , I don't understand why I can't undentify this method thanks everyone in advance I've run into this problem before. Sketchup won't let you make a internal face with the add_face method. For example, if you simply draw a rectangle inside the interior of a face. Delete the rectangle's face. Select the 4 edges. The following code using Jim Foltz's Ruby Web Console won't remake the face: model = Sketchup.active_model ent = model.entities sel = model.selection edges = sel.to_a ent.add_face edges You need to use the "find_faces" method, but that only returns the number of faces made. So you have to go through the trouble of finding the face it made. So rewriting your code, it would work this way: #@cir_face = entities.add_face edges edges[0].find_faces faces = edges[0].faces for i in (0..faces.length) result = faces[i].classify_point(@f_point) if result == Sketchup;;Face;;PointInside @cir_face = faces[i] break end end I found this plugin very interesting. Here are some extra stuff, I cleared up at the beginning. The "normal=@inputpoints[0].normal" was giving an error, like everyone pointed out. Looks like to me, its the same vector as "@dir_vec". So I set it equal to that vector: #normal=@inputpoints[0].normal @dir_vec = find_vec(@inputpoints[0],@inputpoints[1]) normal = @dir_vec v_axes = @dir_vec.axes And I found that your pushpull direction only went positive and not negative. So added these extra lines before your pushpull: @pushpull_dir_vec = (@cpt_l-@f_point) if !(@pushpull_dir_vec.samedirection? @dir_vec) @cy_dist = -@cy_dist end status = @cir_face.pushpull @cy_dist,true Here is the modified file: circle_any_plan_&Pull(modified).rb
    • H

      Where can find descriptive for ruby 's event driven ?

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      3
      0 Votes
      3 Posts
      197 Views
      H
      Thanks you very much Jim , their place was simple to access ,but I can't see them
    • H

      Where can find descriptive of Ruby 's event driven ?

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

      Can we create parametric in new component by ruby script ?

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      5
      0 Votes
      5 Posts
      323 Views
      H
      Hi remus ! Due of query about component parameter has post in SCF , which had occured since I play in SU6, I make several component to compose/assembly for piping drawing, and I spent time to create various size of fitting , and though that may wasted time, due it why so I try to learn in deep for ruby script the reason that I attempt to spent lot of time into SU and pause my default CAD software(expensive cost of Autodesk ), I want to seek potential of SU to decision making for cost saving substitution I don't thing far as that, and there are several feature different between Pro & free version,however there are may advantage in Pro version if we need it really so I ever learned a little bit of business and know why google have SU in Pro and Free version. even I have the way to access its ability ,I don't sure that it will be enough reason that I shall purchase SU in Pro version
    • H

      Can we create/change attribute in DC compoment

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

      Can we got SketchUp API Docs in offline ?

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      7
      0 Votes
      7 Posts
      480 Views
      R
      I know this does not answer the question about downloading the API, but it does address david's comment about updates. The Groups Documentation is updated by Todd and myself as we get time and feedback. AFAIK, it is now more accurate than the standard online API documents accessed via the Sketchup Help>Ruby Help link.
    • H

      How do Install SketchUp Ruby API ?

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      3
      0 Votes
      3 Posts
      337 Views
      H
      Thanks you for your suggestion moris , now I have found the right way
    • H

      Place camera view on SP animation

      Watching Ignoring Scheduled Pinned Locked Moved SketchyPhysics
      3
      0 Votes
      3 Posts
      1k Views
      H
      Thank for your kindly suggestion
    • 1 / 1