• Stars
    star
    148
  • Rank 249,983 (Top 5 %)
  • Language
    Python
  • Created over 9 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A repository for FreeCAD macros

FreeCAD-macros

Total alerts Language grade: Python

A repository of peer-reviewed FreeCAD macros.

This repository hosts FreeCAD macros that volunteers have vetted and added for use to the whole community in general available through the FreeCAD Addon Manager.

How to submit a macro

  • The best way to submit a macro is to post it to the FreeCAD Python Scripting and Macros subforum for review. After a green light is given then:

  • Fork this repository

  • Clone your fork locally git clone https://github.com/your-gh-username/FreeCAD-macros

  • Go to the newly-created local repository cd FreeCAD-macros

  • Setup the upstream git remote add upstream https://github.com/FreeCAD/FreeCAD-macros

  • Create a branch to work in git checkout -b your_branch

  • Follow our guidelines below on how to add a macro

  • When you're ready to push your changes: git push -u origin your_branch

  • Create a PR (pull request) against upstream

  • Achieve global fame once PR is merged

Guidelines for submitting a macro

Macro description

Please add a complete description how to use the macro near the top of your macro as normal Python comments. Ideally write a Wiki page explaining what your macro does and how to use it by following the instructions on the Wiki. It's a good habit to write a changelog, especially when bringing API breaking changes, from latest to oldest.

CamelCase macro name

Please follow the CamelCase.FCMacro convention for the macro name (other associated files except the macro icon don't need to follow this convention). Please don't start your macro name with Macro or FC or similar (we already know it's a macro for FreeCAD).

Macro name specifics

Also, if possible, start the macro name with the type of object it's working on, e.g. use ViewRotation instead of RotateView, so that all macros related to View will be together when sorting alphabetically.

Macro metadata

Please add the following metadata in your macro after the Macro description (mentioned above).

Macro metadata

    __Name__ = ''
    __Comment__ = ''
    __Author__ = ''
    __Date__ = ''
    __Version__ = ''
    __License__ = ''
    __Web__ = ''
    __Wiki__ = ''
    __Icon__ = ''
    __Xpm__ = ''
    __Help__ = ''
    __Status__ = ''
    __Requires__ = ''
    __Communication__ = ''
    __Files__ = ''

Explanation of metadata

NOTE: All metadata elements are simple strings, and may not contain code to evaluate. The FreeCAD Addon Manager parses these strings by searching for an equals sign followed by something inside quotes (single or double), all on a single line. Lines may not wrap. For example:

# Good, valid
__Comment__ = "When run, this macro reads your mind and creates the thing your are imagining."

# Bad, contains code:
__Author__ = ",".join(author_list)

# Bad, not a single string:
__Comment__ = "Some descriptive text" + " and more text"

# Bad, multiple lines:
__Files__ = "MyFirstFile.FCMacro \
MySecondFile.FCMacro"

# EXCEPTION: __Version__ may be set to __Date__ as long as __Date is defined first
__Date__ = 2022.05.19
__Version__ = __Date__

# EXCEPTION: XPM data must be a triple-quoted multi-line string
__Xpm__ = """
/* XPM */
static char * XFACE[] = {
"48 4 2 1",
"a c #ffffff",
"b c #000000",
"abaabaababaaabaabababaabaabaababaabaaababaabaaab",
"abaabaababaaabaabababaabaabaababaabaaababaabaaab",
"abaabaababaaabaabababaabaabaababaabaaababaabaaab",
"abaabaababaaabaabababaabaabaababaabaaababaabaaab"
};
"""
  • __Name__ - The name of the macro, for display by the Addon Manager. Generally the filename of the macro without extension, and with spaces between words. For example, the macro file "DxfToSketchLayers.FCMacro" becomes "DXF to Sketch Layers"
  • __Comment__ - A description of what the macro does. Displayed and searched by the Addon Manager.
  • __Author__ - Comma-separated list of authors (as a single string, e.g. "Jane Doe, John Smith, Bobbi Jones")
  • __Version__ - Use semantic versioning (1.2.3-beta), or CalVer (2022.05.19)
  • __Date__ - The date of the last update, YYYY-MM-DD
  • __License__ - 'License identifier from https://spdx.org/licenses/, e.g. LGPL-2.0-or-later as FreeCAD, MIT, CC0-1.0'
  • __Web__ - A URL to fetch the macro from
  • __Wiki__ - The wiki page (generally at https://wiki.freecad.org) describing the macro, and displayed as the "Details" page in the Addon Manager.
  • __Icon__ - Either a relative path to an icon file included in the FreeCAD macros repository, or a URL where the icon may be downloaded from. Must be a direct download of an image file.
  • __Xpm__ - (OPTIONAL) Instead of specifying an __Icon__, icon data may be set directly as a triple-quoted string containing XPM data.
  • __Help__ - A short explanation how to use the macro, e.g. what to select before launching
  • __Status__ - Stable|Alpha|Beta
  • __Requires__ - e.g. FreeCAD >= v0.17, there is no programmatic use of this for now
  • __Communication__ - e.g. https://github.com/FreeCAD/FreeCAD-macros/issues/ if on the github
  • __Files__ - comma-separated list of files that should be installed together with this file, use paths relative to this file, do not include this file, and do not wrap the line, all files must be listed in the same single-line quoted string.

More Repositories

1

FreeCAD

This is the official source code of FreeCAD, a free and opensource multiplatform 3D parametric modeler.
C++
18,688
star
2

FreeCAD-library

A library of Parts for FreeCAD. WARNING - This library is huge. It might take a long time to download and make the addons manager unresponsive for many minutes.
HTML
1,211
star
3

FreeCAD-addons

A convenient gathering of useful and well-developed FreeCAD plugins made by the community.
721
star
4

FreeCAD-Bundle

Stand-alone repo to Build and Deploy installable FreeCAD images. Do not open general FreeCAD issues here.
Python
298
star
5

FreeCAD-render

The Render workbench
Python
153
star
6

Examples

A storage location for all kinds of example FreeCAD files
67
star
7

homebrew-freecad

Homebrew recipes for FreeCAD
Ruby
54
star
8

FreeCAD_Conda

conda recipes for freecad and dependencies of freecad
Dockerfile
41
star
9

FreeCAD-documentation

An automatic markdown-based conversion of the FreeCAD wiki. Please no pull requests for the time being, edit the wiki instead, thanks!
Python
41
star
10

freecad.workbench_starterkit

template for a FreeCAD workbench / module
Python
39
star
11

DevelopersHandbook

A handbook about FreeCAD development
HTML
38
star
12

FreeCAD-symbols

A repository of SVG symbols to be used in FreeCAD's Drawing pages
Python
31
star
13

FPA

The FreeCAD Project Association
Python
26
star
14

FreeCAD-Homepage

The homepage at http://www.freecad.org
CSS
25
star
15

freecad.ship

ship-workbench for freecad
Python
24
star
16

FreeCAD-LibPack

Library collection to compile FreeCAD on Windows
Python
23
star
17

FreeCAD-Enhancement-Proposals

FreeCAD-Enhancement-Proposals (FEP's)
9
star
18

FreeCAD-Help

A new Help system for FreeCAD
Python
9
star
19

FreeCAD-Getting-Started

FreeCAD Getting Started Wizard
C++
8
star
20

FreeCAD-snap

The official Snap package of the FreeCAD project
Python
8
star
21

freecad.plot

Python
8
star
22

SourceDoc

The source documentation of FreeCAD, generated with 'make WebDoc'
HTML
8
star
23

FreeCAD-ports-cache

FreeCAD ports cache to reduce Travis-CI build times for Mac OS X
Shell
8
star
24

FreeCAD-icons

FreeCAD icon themes repository
Python
7
star
25

FreeCAD-translations

Repository tracking localization issues and progress
Shell
5
star
26

FreeCAD-Doc

Synced FreeCAD online documentation
HTML
4
star
27

Docker

FreeCAD development & deployment with Docker
4
star
28

API

This repo contains the FreeCAD API docs generated with "make WebDoc"
HTML
3
star
29

issues-backup

backup of issues and pull requests
Python
3
star
30

FreeCAD-documentation-docusaurus

Documentation of the FreeCAD software made using Docusaurus
JavaScript
2
star
31

FreeCAD-CI

all in the regard of CI
Python
2
star
32

ArchDesign

experimental rewrite of Arch based on Geofeature and Origin Group Assembly concepts
Python
2
star
33

FreeCAD-WebServices

Administrative tools for the FreeCAD project's web services
Ruby
2
star
34

FreeCAD-themes

Theme repository for first-party FreeCAD themes
2
star
35

FreeCAD-blog

Source for generated blog at freecad.github.io
Python
1
star
36

FreeCAD-developer-meetings

Minutes and agendas for regular meetings of the FreeCAD developer community
1
star
37

freecad.github.io

A generated static-site FreeCAD news blog powered by Nikola
HTML
1
star