Skip to content

Instantly share code, notes, and snippets.

@mario52a
mario52a / FCInfo_en_Ver_1-28b_Docked.FCMacro
Last active October 30, 2023 12:05
Gives a series of informations about the selected shape and can display a conversion of length, inclination (degrees, radians, grades, pourcent) shape, surface, volume and the weight of the form in the density selected in different units of quantities international and Anglo-Saxon.
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
"""
***************************************************************************
* Copyright (c) <mario52> 2014 2015 2016 2017 2018 2019 2020 2021 2022 *
* 2023 *
* This file is a supplement to the FreeCAD CAx development system. *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License (LGPL) *
@mario52a
mario52a / BoundBoxTracing.FCMacro
Last active September 20, 2022 08:23
This macro red trace (editable) around the BoundingBox 6 Faces with 6 rectangles.
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
# cette macro trace en rouge (modifiable) le tour du boundingbox avec 6 rectangles
# si "createVol" = 1 il sera cree un volume (rouge) de la dimension du BoundBox
# this macro red trace (editable) around the BoundingBox with 6 rectangles
# if "createVol" = 1 on volume (red) is created
# Macro_BoundingBox_Tracing
#
#OS: Windows Vista #OS: Windows 8.1 #OS: Windows 10 #OS: Windows 10
@mario52a
mario52a / Cartouche.FCMacro
Created February 22, 2015 19:33
This macro is a complete application, it allows to fill simply all the fields of the cartridge of the drawing sheet delivered with FreeCAD. The date and time fields are separated by a "space negative space" " - " and constitute a single line textedit.
# -*- coding: utf-8 -*-
# Macro_Cartouche.py
# Remplir les zones du cartouche de la feuille originale de FreeCAD
# http://www.freecadweb.org/wiki/index.php?title=Macro_CartoucheFC/fr
# il faut que la page (drawing viewer) s'appelle " Page " qui est le nom par défaut du module Drawing
# Fill the area of the cartridge
# http://www.freecadweb.org/wiki/index.php?title=Macro_CartoucheFC
# It is necessary that the page (drawing viewer) is called "Page", which is the default name of the Drawing module
# ver 0.3
# Created: 02/07/2014
@mario52a
mario52a / CartoucheFC_2_Ver_04.FCMacro
Last active August 12, 2021 23:52
This macro is a complete application, it allows to fill simply all the fields of the cartridge A3 Landscape english
# -*- coding: utf-8 -*-
"""
***************************************************************************
* Copyright (c) 2014 2015 2016 <mario52> *
* *
* This file is a supplement to the FreeCAD CAD development system. *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License (LGPL) *
* as published by the Free Software Foundation; either version 2 of *
@mario52a
mario52a / CartoucheFC_Full.FCMacro
Last active August 12, 2021 23:52
This macro is a complete application, it allows to fill simply all the fields of the cartridge A3_Landscape_US_Text_Complet_Without_Convention Here the order of filling in the line FreeCAD texteditable. The date and time fields are separated by a "space negative space" " - " and constitute a single line textedit.
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
"""
***************************************************************************
* Copyright (c) 2014 2016 2017 <mario52> *
* *
* This file is a supplement to the FreeCAD CAx development system. *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License (LGPL) *
@mario52a
mario52a / Macro_CenterFace.FCMacro
Last active September 20, 2022 08:23
This macro red trace (editable) the center face (mass) with 1 point and print the coordinates.
# -*- coding: utf-8 -*-
#OS: Windows Vista #OS: Windows 10
#Platform: 32-bit #Word size of OS: 64-bit
#Version: 0.14.3389 #Word size of FreeCAD: 64-bit
#Python version: 2.6.2 #Version: 0.17.13528 (Git)
#Qt version: 4.5.2 #Build type: Release
#Coin version: 3.1.0 #Branch: releases/FreeCAD-0-17
#SoQt version: 1.4.1 #Hash: 5c3f7bf8ec51e2c7187789f7edba71a7aa82a88b
#OCC version: 6.5.1 #Python version: 2.7.14
@mario52a
mario52a / Macro_Make_Circle_3 Points.FCMacro
Created February 23, 2015 17:18
This macro creates a circle circumscribed on 3 selected points, orthogonal manner or in 3D at the option space. Points can be objects such as cubes, cylinders,... then selected coordinates will be the centre of these forms.
# -*- coding: utf-8 -*-
# Cercle sur 3 points.py
# create a circle from 3 points selected
# combination of the two programs 'create a circle from 3 points selected'
# with as options (orthogonal) circle can be built on a choice plans
# to coordinate one of the three selected choice shapes
# mode by default, creates the circle in 3D space
# the options create the circle of orthogonal way on the map and view the choice
# with the creation of a central color related to the axes Y/N Y/N
# 04/03/2013 # 24/03/2013 # 08/08/2014 by mario52
@mario52a
mario52a / circle.FCMacro
Last active August 12, 2021 23:52
This small macro create a circle or arc giving radius, diameter, circumference, area, startangle, endangle, arc, anglecenter, cord, arrow, center (point), placemObject on choice. The circle is still facing the screen (with getCameraOrientation) (or give the placement)
# -*- coding: utf-8 -*-
# creer un cercle ou un arc entierement parametrabel en utilisant :
# create a circle or arc fully parametrabel using:
# x x x coordinates
#with radius
#with diameter
#with circumference
#with area
#with startangle
#with endangle
@mario52a
mario52a / Macro_CloneConvert.FCMacro
Last active August 12, 2021 23:52
Creates a clone or copy of the object and the converted in the chosen position and size (inch, mm, m, µm...) or free. The base object is recognized in mm (FreeCAd base)
# -*- coding: utf-8 -*-
# CloneConvert.FCMacro
# Cree un clone ou une copie de l'objet ou des objets selectionne(s) et le met e l'echelle de la grandeur choisie
# utilisation : lancer CloneConvert selectionnez un objet choisissez la grandeur et cliquez sur OK
#
# Creates a clone of one copy the selected object and updates the selected size range
# use: start CloneConvert select an object choose the size and click OK
#
@mario52a
mario52a / Macro_FCCircularText.FCMacro
Last active November 17, 2023 17:37
This macro writes a text, standing or flat, circumferential or helical in the manner of Trajan Column and creates a clock with Arabic numerals 1 2 3 ... or Roman I II III ... (inspired to Macro to Create Clock Face to cblt2l). Also to follow the path with selection one wire, edge, line, circle.
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
"""
***************************************************************************
* Copyright (c) 2014 2015 2016 2017 2018 2019 2020 2021 2022 <mario52> *
* 2023 *
* *
* This file is a supplement to the FreeCAD CAx development system. *
* *
* This program is free software; you can redistribute it and/or modify *