Selecting wire vertex problem
Forum rules
and Helpful information
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help
Also, be nice to others! Read the FreeCAD code of conduct!
Also, be nice to others! Read the FreeCAD code of conduct!
Re: Selecting wire vertex problem
Found point size under appearance. But even after making them huge, I still cannot select the vertex that has another line or wire intersecting.
Re: Selecting wire vertex problem
Try to increasing this parameter.
- Attachments
-
- Capture.JPG (69.53 KiB) Viewed 698 times
Re: Selecting wire vertex problem
could it be that you are talking about a z-order thing?
fc only has the "top one from current view" selectable.
pics are with wire black points, and the line with brown points, one view is "top", the other "bottom" (points are overemphasized) now, there is a way to get to the "hidden" objects
- make selection view visible
- check the "pick list" box
- select in 3d-view
- select from the list...
fc only has the "top one from current view" selectable.
pics are with wire black points, and the line with brown points, one view is "top", the other "bottom" (points are overemphasized) now, there is a way to get to the "hidden" objects
- make selection view visible
- check the "pick list" box
- select in 3d-view
- select from the list...
-
- Veteran
- Posts: 3112
- Joined: Thu Sep 24, 2020 10:31 pm
- Location: Hawaii
- Contact:
Re: Selecting wire vertex problem
I can pick the vertex in 'As Is' drawstyle, but not in 'Wireframe'
Re: Selecting wire vertex problem
indeed, how peculiar - and annoying
Re: Selecting wire vertex problem
What's weird is, as said in wireframe exist the problem. But changing to draw style "as is" or "flat lines" allows picking the vertex.
-
- Veteran
- Posts: 3112
- Joined: Thu Sep 24, 2020 10:31 pm
- Location: Hawaii
- Contact:
Re: Selecting wire vertex problem
Have the user pick an edge at a point close to the desired vertex, then
returns the vertex you want.
Code: Select all
sel, = Gui.Selection.getSelectionEx()
pp =sel.PickedPoints[0]
edge = sel.SubObjects[0]
dists = [((v.Point - pp).Length, v) for v in edge.Vertexes]
closestVertex = dists[0][1] if dists[0][0] < dists[1][0] else dists[1][1]
Part.show(closestVertex, 'Picked Vertex')
Re: Selecting wire vertex problem
@edwilliams16
That is genius, holy moly how did you learn some of this stuff.
Edit, I get:
And the other end will be selected also, 4 vertices of a face at least is selected.
That is genius, holy moly how did you learn some of this stuff.
Edit, I get:
Also I need to integrate into existing code:File "C:/Users/Owner/AppData/Roaming/FreeCAD/Macro/ed_pick.FCMacro", line 15, in <module>
closestVertex = dists[0][1] if dists[0][0] < dists[1][0] else dists[1][1]
<class 'IndexError'>: list index out of range
Code: Select all
selX = FreeCADGui.Selection.getSelectionEx()
PrintMsg = FreeCAD.Console.PrintMessage
PrintMsg("Objects selected:\n")
KOUNT = 0
for sel in selX:
maxname = max((len(name) for name in sel.SubElementNames)) + 4
msg = '{:>%d} ---> (X,Y,Z) = ({:.3f}, {:.3f}, {:.3f})\n' % maxname
PrintMsg(f'{sel.Object.Name} ({sel.Object.Label})\n')
for subName, p in zip(sel.SubElementNames, sel.PickedPoints):
KOUNT = KOUNT + 1
X = p.x * .039370078
Y = p.y * .039370078
Z = p.z * .039370078
######### More code ############
Last edited by jfc4120 on Sun Aug 07, 2022 3:51 am, edited 1 time in total.
-
- Veteran
- Posts: 3112
- Joined: Thu Sep 24, 2020 10:31 pm
- Location: Hawaii
- Contact:
Re: Selecting wire vertex problem
Please see edit in my last reply.