sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Select *Most* Collinear Edges

    Scheduled Pinned Locked Moved Plugins
    5 Posts 3 Posters 916 Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M3DAmindM Offline
      M3DAmind
      last edited by

      Is there a plugin to do the following?

      Select Edge
      Operation: read connected edges at selected edge vertices, add to selection the most collinear (In-line with) edge attached to vertice and disregard the rest. Repeat until no edges fall under a custom angle parameter (i.e. X=30°).

      An operation that would start and end as shown on the attached.

      I often use ThomThom's "Select Loop" from QuadFace Tools. Which is fantastic but won't compute in more chaotic meshes.

      Would be a game changer for anyone working in complex meshes/ landscaping/ etc.

      Hopefully I've just been missing out this whole time and it exists somewhere. I need to learn Ruby! Thanks for the help.


      selectcollinearedges.JPG


      selectcollinearedges2.JPG

      1 Reply Last reply Reply Quote 0
      • cottyC Offline
        cotty
        last edited by

        You can use the path select tool from SketchUV (no automatic angle, but more manual control for difficult meshes). Or a similar tool from ProfileBuilder 3, if you have bought this great plugin.

        my SketchUp gallery

        1 Reply Last reply Reply Quote 0
        • M3DAmindM Offline
          M3DAmind
          last edited by

          @cotty said:

          You can use the path select tool from SketchUV (no automatic angle, but more manual control for difficult meshes). Or a similar tool from ProfileBuilder 3, if you have bought this great plugin.

          Thanks! I've used SketchUV & PB2 in the past and completely avoided using the smart path selection tools. Helps, though it some conditions like an expansive sidewalk over hundreds of feet with changes in elevation, it'd be nice to have something instant like ThomThom's select loop with the properties in the OP. I'll have to learn Ruby. Thanks again.

          1 Reply Last reply Reply Quote 0
          • sdmitchS Offline
            sdmitch
            last edited by

            @m3damind said:

            Is there a plugin to do the following?

            Select Edge
            Operation: read connected edges at selected edge vertices, add to selection the most collinear (In-line with) edge attached to vertice and disregard the rest. Repeat until no edges fall under a custom angle parameter (i.e. X=30°).

            An operation that would start and end as shown on the attached.

            Try this

            mod = Sketchup.active_model
            ent = mod.active_entities
            sel = mod.selection
            val = UI.inputbox(["Max Ang;"],[30.0],"Most Colinear")
            if val
              max_ang = val[0].degrees
              sel_edg = sel.first
              sel_edg.vertices.each{|start|
                found=true; nxt_edg = sel_edg
                while found
                  found=false;
                  if start.edges.length > 1
                    edges=start.edges-[nxt_edg];
                    vec = nxt_edg.line[1]
                    edg = edges.min_by{|e|vec.angle_between(e.line[1])}
                    ang = vec.angle_between(edg.line[1])
                    if  ang < max_ang || ang > Math;;PI-max_ang
                      sel.add edg;found=true;
                      start = edg.other_vertex(start)
                      nxt_edg = edg;
                    end
                  end
                end
              }
            end
            
            

            Most Colinear.gif

            Nothing is worthless, it can always be used as a bad example.

            http://sdmitch.blogspot.com/

            1 Reply Last reply Reply Quote 0
            • M3DAmindM Offline
              M3DAmind
              last edited by

              Wow, thanks. I need to hang out here more.

              It looks like I'm still hitting snags. The X/30° param would have to apply to the obtuse conditions, not acute conditions. It doesn't appear to be culling the right edges in some circumstances, and it's terminating early.

              Regardless, thanks for giving me something to tinker with at some point.


              selectcollinearedges3.JPG

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post
              Buy SketchPlus
              Buy SUbD
              Buy WrapR
              Buy eBook
              Buy Modelur
              Buy Vertex Tools
              Buy SketchCuisine
              Buy FormFonts

              Advertisement