Select *Most* Collinear Edges
-
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.
-
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.
-
@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.
-
@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
-
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.
Advertisement