{{ message }}

Instantly share code, notes, and snippets.

# mario52a

Created Feb 25, 2015
This small macro create a line giving as an argument the XYZ coordinates, length, and angle
View Macro_Line_Length.FCMacro
 # -*- coding: utf-8 -*- # créer une ligne avec une coordonnée une longueur et un angle sur le plan X Y # create line with coordinate length and angle to plane X Y import FreeCAD, FreeCADGui, Draft from math import cos, sin, radians #from FreeCAD import Base def line_length(x1 = 0.0, y1 = 0.0, z1 = 0.0, length = 10.0, angle = 0.0): x2 = x1 + (length * cos(radians(angle))) y2 = y1 + (length * sin(radians(angle)))
Created Feb 25, 2015
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. (Version Française)
View FCInfo_fr_Ver_1-12_No_Docked_Ubuntu.FCMacro
 # -*- coding: utf-8 -*- """ *************************************************************************** * Copyright (c) 2014 * * * * 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) * * as published by the Free Software Foundation; either version 2 of *
Last active Jan 2, 2016
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. (English version)
View FCInfo_en_Ver_1-12_No_Docked_Ubuntu.FCMacro
 # -*- coding: utf-8 -*- """ *************************************************************************** * Copyright (c) 2014 * * * * 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) * * as published by the Free Software Foundation; either version 2 of *
Created Feb 22, 2015
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.
View Cartouche.FCMacro
 # -*- 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
Created Feb 23, 2015
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.
View Macro_Make_Circle_3 Points.FCMacro
 # -*- 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
Created Jan 2, 2016
This macro hidden all objects not selected if you selected one object hidden the hidden object are displayed and all objects not selected are hidden
View Macro_SelectVisible.FCMacro
 import FreeCAD # Macro_SelectVisible __title__="Macro_SelectVisible" __author__ = "Mario52" __url__ = "http://www.freecadweb.org/index-fr.html" __version__ = "00.02" __date__ = "12/11/2015" try: compt = 0
Last active Jan 31, 2016
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)
View Macro_CloneConvert.FCMacro
 # -*- 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 #
Created Feb 9, 2016
Specially written for easy lofting with lines generated by the macro Macro_FCTexture (but may be suitable and used for common lofts)
View Macro_FCCreaLoft.FCMacro
 # -*- coding: utf-8 -*- """ *************************************************************************** * Copyright (c) 2016 * * * * 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) * * as published by the Free Software Foundation; either version 2 of *
Created Jun 7, 2016
Start the macro select the object IN THE 3D VIEW the "ForbiddenCursor" stay if the or one selection is duplicate the macro stay resident
View Macro_Duplicate_Selection.FCMacro
 # -*- coding: utf-8 -*- import FreeCADGui import PySide from PySide import QtGui ,QtCore from PySide.QtGui import * from PySide.QtCore import * __title__ = "Macro_Duplicate_Selection" __author__ = "Mario52" __url__ = "http://www.freecadweb.org/index-fr.html"
Last active Jul 14, 2016
Creates a arc from 3 selected points
View Macro_Make_Arc_3_points.FCMacro
 # -*- coding: utf-8 -*- from FreeCAD import Base __title__ = "Macro_Make_Arc_3_points" __author__ = "Mario52" __url__ = "http://www.freecadweb.org/index-fr.html" __version__ = "00.01" __date__ = "14/07/2016" global selected; selected = []