Search found 1470 matches

Go to advanced search

by Joel_graff
Sat Sep 21, 2019 11:45 am
Forum: Developers corner
Topic: FreeCAD.Vector and Python3 Iterable
Replies: 4
Views: 97

Re: FreeCAD.Vector and Python3 Iterable

You can iterate over a Vector with: Ok. That's good to know. I guess I can just call iter(data) in the class constructor and let the assertion throw an error for non-iterables when I instance my class.. Unless there's some other consistent way to type-check a python data structure to ensure it's a ...
by Joel_graff
Fri Sep 20, 2019 4:24 pm
Forum: Wiki
Topic: FeaturePython : return obj vs fpo
Replies: 7
Views: 106

Re: FeaturePython : return obj vs fpo

Cyril wrote:
Fri Sep 20, 2019 3:31 pm
I would be interested to see some uses cases where you return fpo.
Right - like I say, the objects each reference each other, so it's a non-issue for me. The convention is to return the obj.
by Joel_graff
Fri Sep 20, 2019 3:01 pm
Forum: Developers corner
Topic: FreeCAD.Vector and Python3 Iterable
Replies: 4
Views: 97

Re: FreeCAD.Vector and Python3 Iterable

Am I right that this will be the tp_iter and tp_iternext slots of the type object? Probably. I'd have to look at the Python spec for Iterable to know. I use it in my 'SmartTuple' class, which is designed to emulate a FreeCAD (or numpy) Vector without requring the dependency. For example: from colle...
by Joel_graff
Fri Sep 20, 2019 12:16 pm
Forum: Developers corner
Topic: FreeCAD.Vector and Python3 Iterable
Replies: 4
Views: 97

FreeCAD.Vector and Python3 Iterable

Is App.Vector intended to be iterable? I ask because it's the Python3 basic type to test for to determine if a data type can be converted to a Python iterable (like list or tuple). Given that it will convert to those data structures, it seems as though it ought to inherit collections.abc.Iterable......
by Joel_graff
Fri Sep 20, 2019 11:51 am
Forum: Users Showcase
Topic: Table saw with sliding table
Replies: 2
Views: 329

Re: Table saw with slidding table

Yes, please do.

I have a 1979 Sears Contractor saw that could use similar love ;)
by Joel_graff
Fri Sep 20, 2019 11:36 am
Forum: Wiki
Topic: FeaturePython : return obj vs fpo
Replies: 7
Views: 106

Re: FeaturePython : return obj vs fpo

However, I just noticed that this page was created earlier this year, March 2019, by Joel Graff, as "an update to Scripted objects". Joel likes to program in the best Pythonic style possible, keeping things modular and consistent, so maybe there is a reason why he wrote the examples that way. Let's...
by Joel_graff
Fri Sep 20, 2019 11:18 am
Forum: Open discussion
Topic: Geomatics Workbench
Replies: 152
Views: 7482

Re: Geomatics Workbench

@HakanSeven - BTW, I know you aren't directly involved with the project anymore, but I'd suggest you set up a KanBan board (a project board) on github and start adding issues to it so this stuff can get tracked. You've built a really good thing. It's just going to take a little time and effort to wo...
by Joel_graff
Fri Sep 20, 2019 11:09 am
Forum: Open discussion
Topic: Geomatics Workbench
Replies: 152
Views: 7482

Re: Geomatics Workbench

HakanSeven12 wrote:
Fri Sep 20, 2019 8:45 am
Your data file has more than one whitespace between coordinates. The wb only allow one whitespace.
Might want to put implementing a text file parser on the list to avoid this in the future. I imagine there's plenty of format variations that would have to be coded for... ;)
by Joel_graff
Fri Sep 20, 2019 3:40 am
Forum: Help on using FreeCAD
Topic: Question: is there a way to magnify a point or node when the crosshair is in it's vicinity
Replies: 52
Views: 929

Re: Question: is there a way to magnify a point or node when the crosshair is in it's vicinity

What bug exactly? If you mouse over the point, especially with a larger pick radius, the mouse detection fails every other time, which causes the radius to flash. You can see that in the mouse event output in the report view reports "None" and then the node the cursor is over, alternating each time...
by Joel_graff
Fri Sep 20, 2019 3:27 am
Forum: Wiki
Topic: FeaturePython : return obj vs fpo
Replies: 7
Views: 106

Re: FeaturePython : return obj vs fpo

Honestly, I have no opinion. Both results make sense to me, and I've never seen formal direction on that point. Given that each object references the other, I can't think of a reason to prefer one over the other, except that the general expectation for object creation is that a FreeCAD Document Obje...

Go to advanced search