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

    Topics

    • D

      Lengthening a series of lines in equal increments

      Watching Ignoring Scheduled Pinned Locked Moved Newbie Forum sketchup
      31
      0 Votes
      31 Posts
      2k Views
      sdmitchS
      @davecon said: Thanks for the help so far everyone I have got the hang of doing this on a straight line, now the complex bit is trying to do it on a spiral. Currently I am trying to turn the model on the left (spiral with even length lines) in the model on the right (spiral with lines increasing by XX per length) [attachment=1:2ramdbm4]<!-- ia1 -->spiral lines.jpg<!-- ia1 -->[/attachment:2ramdbm4] Ideally what I would like to be able to do is select the first line (red) and then the last line (green) and be able to input something like "starting the with the first line make all the others increase in XXmm increments" Here is the file itself so far. [attachment=0:2ramdbm4]<!-- ia0 -->spiral lines.skp<!-- ia0 -->[/attachment:2ramdbm4] Instead of going to the trouble of creating the equal length lines then extending them incrementally, I would make the "baseline", be it a flat spiral or a straight line divided into the desired number of segments, into a curve using weld and then you can create the lines originating from the curve's vertices. The code to do this is as simple as this mod = Sketchup.active_model ent = mod.entities sel = mod.selection if !sel.empty? && sel.first.curve vers=sel.first.curve.vertices # d is initial length, i is the increment, and a is the direction vector d=875.0.mm;i=87.5.mm;a=[0,0,-1] for v in vers p=v.position;pp=p.offset(a,d) ent.add_line(p,pp) d += i end else UI.messagebox "select a curve" end It would be a monumental task to try to figure out the order of the equal length lines. When you select a group of anything, there is no guaranty that Sketchup will add them to the selection in the proper order. At least that has been my experience.
    • D

      Splitting a spiral line into equal segments

      Watching Ignoring Scheduled Pinned Locked Moved Newbie Forum sketchup
      23
      0 Votes
      23 Posts
      307 Views
      pilouP
      A more mystery one! And the original curve is not "divided" by 50 on its path! Maybe at the start but surely not at the end! About strictly the question asked i prefer my solution! Each segment is equal length and can be used for redraw the same Spiral!
    • 1 / 1