Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@mario52a
mario52a / Macro Rotate To Point.FCMacro
Last active October 17, 2022 18:52
Macro for rotate on object on itself with the axis of rotation the boundbox center, center of mass or last point clicked and save the coordinate in a complete macro file for simulate the animation
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
"""
***************************************************************************
* Copyright (c) 2017 2018 2019 2020 2021 2022 <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 / 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 / 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_FCInfoToMouse.FCMacro
Last active September 20, 2022 08:23
Provide informations coordinates, length and angles in real time on the mouse in a bubble annotation displayed in the 3D screen
# -*- coding: utf-8 -*-
"""
***************************************************************************
* Copyright (c) 2016 <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) *
* as published by the Free Software Foundation; either version 2 of *
@mario52a
mario52a / Macro_FCInfoGlass.FCMacro
Last active December 18, 2021 19:23
Gives a series of informations about the selected shape and can display a directly in the 3D view
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
"""
***************************************************************************
* Copyright (c) 2015 2016 <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_FCTreeView.FCMacro
Last active December 18, 2021 19:21
Macro for list all objects in the project in one list without hierarchy, options sort by name, label, visibility, group, by length option search by name, label .... without case sensitive or with case sensitive and select all objects displayed in the macro window.
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
#
"""
***************************************************************************
* Copyright (c) 2017 2018 2019 2020 <mario52> *
* *
* This file is a supplement to the FreeCAD CAx development system. *
* *
* This program is free software; you can redistribute it and/or modify *
@mario52a
mario52a / Macro_FCSpreadSheet_Extract.FCMacro
Last active December 18, 2021 19:20
This macro save the spreadsheet data in a csv file with the formula or in a xml file.
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
"""
***************************************************************************
* Copyright (c) 2018 2019 2020 <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 CirclePlus.FCMacro
Last active December 18, 2021 19:19
This small macro create a circle or arc giving radius, diameter, circumference, area, startangle, endangle, arc, anglecenter, cord, arrow, center (point), placemObject on choice. And ccreate sector.
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
#
"""
***************************************************************************
* Copyright (c) 2018 2019 <mario52> *
* *
* This file is a supplement to the FreeCAD CAx development system. *
* *
* This program is free software; you can redistribute it and/or modify *
@mario52a
mario52a / Delta_XYZ
Last active December 18, 2021 19:19
Gives the Delta values and distance between 2 points. If the SHIFT key is pressed, the Delta value begin on coordinate 0,0,0 to point clicked (the coordinate 0,0,0 is displayed in red).
# -*- coding: utf-8 -*-
#Delta x y z Click Q to quit
#
#OS: Windows 10 (10.0)
#Word size of OS: 64-bit
#Word size of FreeCAD: 64-bit
#Version: 0.19.22808 (Git)
#Build type: Release
#Branch: master
#Hash: 72eb41b24f12b572d55081042160954b93f4614c
@mario52a
mario52a / Macro_CloneConvert.FCMacro
Last active September 7, 2021 22:56
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
#
#OS: Windows 10 (10.0)