Search found 6354 matches

Go to advanced search

by openBrain
Fri Sep 24, 2021 5:49 pm
Forum: Python scripting and macros
Topic: How to select a point on Sketcher's screen for use in a macro?
Replies: 3
Views: 147

Re: How to select a point on Sketcher's screen for use in a macro?

Does your macro have a GUI? To me the best solution for you is to set the ViewObserver callback then wait it is called with a left click button. When it happens, just remove the callback and end your macro. And yes, IMO should ensure a minimum of checks on the objects to ensure they are of the right...
by openBrain
Fri Sep 24, 2021 5:29 pm
Forum: Python scripting and macros
Topic: [Solved] RegExp how to get multiline text before two words?
Replies: 3
Views: 167

Re: [Solved] RegExp how to get multiline text before two words?

"non greedy" worked variant: Optimally you should tell the inner parentheses are non capturing with : print(re.search(r'<test>((? :.|\n)*?)<\/test>',test).group()) But this is still simpler to use character class: print(re.search(r'<test>([\s\S]*?)<\/test>',test).group()) Or a flag : prin...
by openBrain
Fri Sep 24, 2021 2:07 pm
Forum: Python scripting and macros
Topic: [Solved] RegExp how to get multiline text before two words?
Replies: 3
Views: 167

Re: RegExp how to get multiline text before two words?

Code: test=""" <test> text text text </test> <test> text text text </test>""" print(re.search(r'<test>(.|\n)*<\/test>',test).group()) What you're looking for is called "non greedy". It should be (not tested) print(re.search(r'<test>(.|\n)*?<\/test>',test).gro...
by openBrain
Fri Sep 24, 2021 7:32 am
Forum: Forum français
Topic: Coder un Atelier en C++
Replies: 5
Views: 531

Re: Coder un Atelier en C++

J'ai la forte impression que pour communiquer avec FreeCAD et son Gui, il faut impérativement passer par Python (dans les sources des commandes, on retrouve des scripts pythons qui seront lancé comme des macros). Non, tout est faisable en C++. Dans FreeCAD, les commandes passent par des commandes P...
by openBrain
Fri Sep 24, 2021 5:42 am
Forum: Open discussion
Topic: [Features Requests] Sketcher Radius/Diameter presentation
Replies: 51
Views: 4015

Re: [Features Requests] Sketcher Radius/Diameter presentation

I'll document in the coming hours. ;)
by openBrain
Thu Sep 23, 2021 6:58 pm
Forum: Open discussion
Topic: [Features Requests] Sketcher Radius/Diameter presentation
Replies: 51
Views: 4015

Re: [Features Requests] Sketcher Radius/Diameter presentation

I encountered a little buggy for the case of external geometry group constraining: Indeed. I remember I didn't think about testing this. :lol: About the parameter name, I have changed them in my local commit Believe it or not, it took me a while to understand "Disp" (Disponibility?). Yes,...
by openBrain
Thu Sep 23, 2021 2:34 pm
Forum: Developers corner
Topic: Changes at TravisCI- affecting open source
Replies: 166
Views: 19636

Re: Changes at TravisCI- affecting open source

yorik wrote: Thu Sep 23, 2021 2:03 pm Is there a way to set gitlab to automatically mirror a github repo? So far I have a local script on my machine that does it everytime I git push...
https://docs.gitlab.com/ee/user/project ... repository ;)

Go to advanced search