Skip to content

Instantly share code, notes, and snippets.

@mario52a
mario52a / FCInfo_ToolBar.FCMacro
Last active September 6, 2023 21:33
Gives information about the selected shape and can display a conversion of length, area, volume in different units (metric and imperial) in a ToolBar.
"""
***************************************************************************
* Copyright (c) 2022 2023 <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 *
* the License, or (at your option) any later version. *
@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_Screen_Wiki.FCMacro
Last active October 10, 2024 16:45
This macro allows to save the 3D view in the desired format. The 3D view or the full 3D window of FreeCAD takes the desired dimensions. A rotation of the selected object or of the 3D view is possible to give a rotation angle the number of images is calculated automatically it is possible to give a departure angle and an arrival angle. You must u…
# -*- coding: utf-8 -*-
"""
***************************************************************************
* Copyright (c) 2019 2020 2021 2022 2023 2024 <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_FCSpring_On_Surface.FCMacro
Last active January 15, 2024 10:28
This macro creates a helix around a solid object whatever its shape, the helix follows the entire surface of the object. (Python2 is request)
# -*- coding: utf-8 -*-
#from __future__ import unicode_literals
#
"""
***************************************************************************
* Copyright (c) 2019 2020 2021 2022 2023 2024 <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_Fonts_Win10_PYMP.FCMacro
Last active August 12, 2021 23:49
This little macro is dedicate to users of Windows 10 (and other). The explorer fonts for use the ShapeString is empty and this little macro can help you see aesily the font to use.
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
"""
***************************************************************************
* Copyright (c) 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 / 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 Select Hovering.FCMacro
Last active January 11, 2024 22:01
This macro select a choice Face, Edge, Vertex hovering by the mouse.
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
#
"""
***************************************************************************
* Copyright (c) 2017 2018 2019 2020 2023 2024 <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_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 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) *