Search found 2118 matches

Go to advanced search

by freedman
Mon Sep 13, 2021 3:53 am
Forum: Python scripting and macros
Topic: [Solved] Is there a simple way to get all Vertex coords from a sketch?
Replies: 31
Views: 2598

Re: [Solved] Is there a simple way to get all Vertex coords from a sketch?

It was this from chris_G; sel = Gui.Selection.getSelectionEx() for so in sel: for sub in so.SubElementNames: if "Vertex" in sub: n = eval(sub.lstrip('Vertex')) geo, pos = so.Object.getGeoVertexIndex(n-1) p = so.Object.getPoint(geo, pos) print(p) Anyway, this is what I was after, I wanted t...
by freedman
Sun Sep 12, 2021 5:45 pm
Forum: Python scripting and macros
Topic: [Solved] How to get Sketcher point location, cartesion coords.
Replies: 7
Views: 740

Re: How to get Sketcher point location, cartesion coords.

Here is a link to an additional topic that solved the question. Marking this solved.
https://forum.freecadweb.org/viewtopic.php?f=22&t=62126
by freedman
Sun Sep 12, 2021 7:05 am
Forum: Python scripting and macros
Topic: [Solved] Is there a simple way to get all Vertex coords from a sketch?
Replies: 31
Views: 2598

Re: Is there a simple way to get all Vertex from a sketch?

openBrain So everything appears nicely to the user without Z-fighting effect. And it appears that these slight offsets are also returned in the local geometry coordinates. I see things like this; Everything from a local sketch point of view is a Z of 0.00000. The global of that sketch could be slig...
by freedman
Sun Sep 12, 2021 4:30 am
Forum: Python scripting and macros
Topic: [Solved] Is there a simple way to get all Vertex coords from a sketch?
Replies: 31
Views: 2598

Re: Is there a simple way to get all Vertex from a sketch?

To test this there are two variables. 1) We need to be in sketch edit mode and 2) We need to attach the sketch to an off axis face. Paullee, whenever I see the Z coord (see pic) as anything but 0.00 then I presume it's not local geometry of Sketcher X,Y,Z. When I see Z coords that are close to zero ...
by freedman
Sat Sep 11, 2021 6:29 pm
Forum: Python scripting and macros
Topic: [Solved] Is there a simple way to get all Vertex coords from a sketch?
Replies: 31
Views: 2598

Re: Is there a simple way to get all Vertex from a sketch?

edwilliams16, I did ask for that but I didn't like the solution :) , what you show is all calculated and will have rounding errors. I had an idea the raw data was in the object somewhere and that's what I get from what Chris_G did. Paullee, change axis or go off axis and the data has calculated erro...
by freedman
Sat Sep 11, 2021 6:08 pm
Forum: Python scripting and macros
Topic: [Solved] Is there a simple way to get all Vertex coords from a sketch?
Replies: 31
Views: 2598

Re: Is there a simple way to get all Vertex from a sketch?

Thank you Chris_G, that works! :) :) I don't understand the code as yet but a quick test confirms this working. And Yes! We are in Sketch edit mode. Hopefully this will clear a path for what seemed to be a very complicated issue. Trying to describe what goes on here, I'm not that good in Python: for...
by freedman
Sat Sep 11, 2021 1:59 am
Forum: Python scripting and macros
Topic: [Solved] Is there a simple way to get all Vertex coords from a sketch?
Replies: 31
Views: 2598

Re: Is there a simple way to get all Vertex from a sketch?

paullee, thats return the global coords. The real sketcher coords are in the geometry.
Thanks anyway.
by freedman
Fri Sep 10, 2021 11:28 pm
Forum: Python scripting and macros
Topic: [Solved] Is there a simple way to get all Vertex coords from a sketch?
Replies: 31
Views: 2598

Re: Is there a simple way to get all Vertex from a sketch?

I'm trying to do this while in sketcher; Click on any vertex and get it's local X,Y coords, the Z should be zero because it's Sketcher geometry. Is there a simplier way to do this other than this: 1) find the mouse selected vertex global coords, store them. 2) scan thru the entire list of sketcher g...
by freedman
Fri Sep 10, 2021 6:19 pm
Forum: Python scripting and macros
Topic: [Solved] Is there a simple way to get all Vertex coords from a sketch?
Replies: 31
Views: 2598

[Solved] Is there a simple way to get all Vertex coords from a sketch?

For a macro; How to get a list of all Vertex without identifying all the attribute types. This is probably a Python question and I can't figure it out.
I have the obj.Geometry, I just don't know how to search thru it.
Thanks
by freedman
Fri Sep 10, 2021 5:49 am
Forum: Job offers
Topic: Open Hardware licenced anti-tremor cup
Replies: 10
Views: 1392

Re: Open Hardware licenced anti-tremor cup

Another approach could be based around magnets and a coil of looped wire. As the magnet passes by the coil, induced current will flow thru the wire. By adjusting the current you can change the damping factor.

Go to advanced search