Search found 100 matches

Go to advanced search

by MrRossi
Fri Jan 15, 2021 12:36 pm
Forum: Python scripting and macros
Topic: Name of Std Part an object belongs to
Replies: 1
Views: 69

Re: Name of Std Part an object belongs to

Hello

Found myself a solution.

Code: Select all

obj.Parents()
can deliver this information

Greetings
Chris
by MrRossi
Fri Jan 15, 2021 10:33 am
Forum: Python scripting and macros
Topic: Name of Std Part an object belongs to
Replies: 1
Views: 69

Name of Std Part an object belongs to

Hello Community Can I somehow find out the Std Part name to which an object belongs? Let`s say the Std Part = "Part100" and there are several object in it. Can I somehow find out this name "Part100" when working with any of the included objects? Thanks for help. Chris OS: Windows 10 (10.0) Word size...
by MrRossi
Wed Jan 06, 2021 3:03 pm
Forum: Forum in Deutsch
Topic: FeaturePython und Placement
Replies: 2
Views: 153

Re: FeaturePython und Placement

Danke. Ich probier das aus.
by MrRossi
Mon Jan 04, 2021 6:33 am
Forum: Forum in Deutsch
Topic: FeaturePython und Placement
Replies: 2
Views: 153

FeaturePython und Placement

Hallo Zusammen Ich habe da ein kleines Verständnisproblem mit dem FreeCAD-Placement. Warum gibt es in einem FeaturePython-Objekt (sagen wir es ist ein einfacher Part.makeCircle), das auf der Position x, y im Raum sitz, keine Placement-Werte? Die stehen alle auf "0". class Knt_builder: def __init__(s...
by MrRossi
Wed Dec 30, 2020 9:48 am
Forum: Forum in Deutsch
Topic: Verständnisproblem mit Python code und FC API
Replies: 0
Views: 89

Verständnisproblem mit Python code und FC API

Hallo zusammen Vielleicht kann mir jemand helfen, stehe hier komplett daneben: Kann mir jemand bitte erklären, warum das nicht funktionert: Das war mein erster Entwurf. def get_point(point, obj): return point vec1 = FreeCADGui.Snapper.getPoint(callback=get_point) vec2 = FreeCADGui.Snapper.getPoint(l...
by MrRossi
Tue Dec 29, 2020 1:39 pm
Forum: Python scripting and macros
Topic: FreeCAD loses focus after form.close()
Replies: 6
Views: 230

Re: FreeCAD loses focus after form.close()

Thanks for your help, but nothing changes. I`ve tried any possible combination. What is so strange is, that below signals, self.wk_form.lw_wkstoffe.itemDoubleClicked.connect(self.add_pipe_by_OK) self.wk_form.bb_box1.accepted.connect(self.add_pipe_by_OK) have the same slot, but DoubleClick minimize M...
by MrRossi
Mon Dec 28, 2020 6:52 pm
Forum: Python scripting and macros
Topic: How to get objectInfo from given world coordinates
Replies: 6
Views: 159

Re: How to get objectInfo from given world coordinates

I have a solution. With this

Code: Select all

FreeCADGui.activeDocument().activeView().getCursorPos()
I get the cursor position and not the coordinates and I can work with

Code: Select all

getObjectInfo
.

Thanks for help.

Greetings
Chris
by MrRossi
Mon Dec 28, 2020 4:51 pm
Forum: Python scripting and macros
Topic: How to get objectInfo from given world coordinates
Replies: 6
Views: 159

Re: How to get objectInfo from given world coordinates

What I found out by myself is, the difference between the both (one with "s" the other without) is just
the number of objects under the cursor.
If using

Code: Select all

getObjectInfo
returns only information of 1 object.

Code: Select all

getObjectsInfo
returns a list with information of all objects.

Maybe I`m wrong ? :o
by MrRossi
Mon Dec 28, 2020 3:47 pm
Forum: Python scripting and macros
Topic: How to get objectInfo from given world coordinates
Replies: 6
Views: 159

Re: How to get objectInfo from given world coordinates

Code: Select all

getObjectInfo(x, y)
can be used with a Pivy Mouse Observer if using the screen coordinates, but not the drawing world
coordinates (from placement).
If I wanna use this function I have to convert, but I don`t know whether this is possible somehow.
by MrRossi
Sun Dec 27, 2020 6:01 pm
Forum: Python scripting and macros
Topic: How to get objectInfo from given world coordinates
Replies: 6
Views: 159

How to get objectInfo from given world coordinates

Hello Community Would need some help again: I know it`s possible to get object info froma clicked point in the active view, with Pivy obserers for example. (getObjectInfo()) I`m wondering whether it`s possible to get this also from a given 2D world coordinates point? E.g. we have point x= 200, y=0. ...

Go to advanced search