MoveToOrigin macro

Need help, or want to share a macro? Post here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
edwilliams16
Veteran
Posts: 3106
Joined: Thu Sep 24, 2020 10:31 pm
Location: Hawaii
Contact:

Re: MoveToOrigin macro

Post by edwilliams16 »

mario52 wrote: Wed Jun 30, 2021 9:31 am hi

now installable with AddonManager

mario
Aloha Mario

How do I update the Macro now it's in the Manager - just in the wiki page?
mario52
Veteran
Posts: 4673
Joined: Wed May 16, 2012 2:13 pm

Re: MoveToOrigin macro

Post by mario52 »

Aloha edwilliams16

yes only change your code (or all you want in the page) not forgot the Date last modified and the Macro Version


Principle AddonManager:

AddonManager search the link in the Macros_recipes page (if not write in this page, the macro is not visible by AddonManager)

if your code is extra wiki FreeCAD you must use {{Codeextralink|}} and the RAW page of the macro code

ex:

Code: Select all

{{Codeextralink|https://gist.githubusercontent.com/mario52a/8d40ab6c018c2bde678f/raw/e16ad9ea7b38c0c47e42aa3019be01dd1267a620/FCInfo_en_Ver_1-20_Docked.FCMacro}}
if you have not page in the Wiki FreeCAD and your macro is on GithHub (or other) you make one demand to galou_breizh or Kunda1 for attach the macro in the GithHub repo to be visible by AddonManager

mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
edwilliams16
Veteran
Posts: 3106
Joined: Thu Sep 24, 2020 10:31 pm
Location: Hawaii
Contact:

Re: MoveToOrigin macro

Post by edwilliams16 »

LHC wrote: Sat Jul 03, 2021 12:28 am Glad I could provide you with a challenge ! :lol:
Latest (V0.02) version of Macro now handles objects nested in a chain of Std_Part containers - like your file.
LHC
Posts: 321
Joined: Thu Sep 17, 2020 4:21 pm
Location: Canadian Coffee Shop

Re: MoveToOrigin macro

Post by LHC »

edwilliams16 wrote: Wed Jul 07, 2021 6:46 pm
LHC wrote: Sat Jul 03, 2021 12:28 am Glad I could provide you with a challenge ! :lol:
Latest (V0.02) version of Macro now handles objects nested in a chain of Std_Part containers - like your file.
Yes Sir ! I'll check it out. With service like that I'll be coming back for more macros ! :lol:
Thanks very much for your efforts to rescue us all from the other cad system abyss, made dark with cloud storage and vendor lockins.

Lewis
LHC
Posts: 321
Joined: Thu Sep 17, 2020 4:21 pm
Location: Canadian Coffee Shop

Re: MoveToOrigin macro

Post by LHC »

Yup - works just as advertised. According to the report window it moved all 294 vectors/features. It had to think for a moment but then "bing" everything is at the origin.

Many thanks again.

Lewis
drmacro
Veteran
Posts: 8865
Joined: Sun Mar 02, 2014 4:35 pm

Re: MoveToOrigin macro

Post by drmacro »

edwilliams16 wrote: ping
I thought early on in the life of this macro it could also move to a selected vertex.

Am I dreaming?

:roll:
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
edwilliams16
Veteran
Posts: 3106
Joined: Thu Sep 24, 2020 10:31 pm
Location: Hawaii
Contact:

Re: MoveToOrigin macro

Post by edwilliams16 »

Only to the origin. I'd have to think about how to optionally move to a selected point.
Post Reply