Skip to content

Instantly share code, notes, and snippets.

@mario52a
mario52a / Macro_Copy3DViewToClipboard.FCMacro
Created September 15, 2016 10:21
Macro will copy the contents of the 3D view to the clipboard
# -*- coding: utf-8 -*-
import PySide
from PySide.QtGui import *
from PySide import QtGui ,QtCore
from PySide import QtOpenGL
#from gimpfu import *
__title__ = "Macro_Copy3DViewToClipboard"
__author__ = "Mario52"
__url__ = "http://www.freecadweb.org/index-fr.html"
@mario52a
mario52a / Macro_FCCreaLoft.FCMacro
Last active August 12, 2021 23:50
Specially written for easy lofting with lines generated by the Macro Texture (but may be suitable and used for common lofts)
# -*- coding: utf-8 -*-
"""
***************************************************************************
* Copyright (c) 2016 2017 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 *
* 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_CloneConvert.FCMacro
Last active January 6, 2025 21:39
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 -*-
"""
***************************************************************************
* Copyright (c) 2014 2015 2016 2017 2018 2019 2020 2021 2022 <mario52> *
* 2025 *
* 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_Copy3DViewToClipboard.FCMacro
Created September 20, 2016 20:12
Macro will copy the contents of the 3D view to the clipboard
# -*- coding: utf-8 -*-
import PySide
from PySide.QtGui import *
from PySide import QtGui ,QtCore
from PySide import QtOpenGL
#from gimpfu import *
__title__ = "Macro_Copy3DViewToClipboard"
__author__ = "Mario52"
__url__ = "http://www.freecadweb.org/index-fr.html"
@mario52a
mario52a / Macro_FCWire_To_Volume.FCMacro
Last active August 12, 2021 23:50
This macro create on object boolean with the object Draft selected.
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
#
"""
***************************************************************************
* Copyright (c) 2016 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_Compound_Plus.FCMacro
Last active November 11, 2024 20:40
Draf command set in a small macro for the 2D sketch example : files DXF
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
"""
***************************************************************************
* Copyright (c) 2016 2017 2018 1019 2020 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) *
@mario52a
mario52a / Macro_DXF_to_Shape.FCMacro
Last active August 12, 2021 23:50
Macro utility for create unique wire with many wires, the type wire created is selected to MakeWire, Bspline, BsplineCurve, BsplineCurve + Arc, Polygon, Bezier curve
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
"""
***************************************************************************
* Copyright (c) 2016 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 *
* it under the terms of the GNU Lesser General Public License (LGPL) *
@mario52a
mario52a / Macro_Perpendicular_To_Wire.FCMacro
Last active August 12, 2021 23:50
This macro positioned your object perpendicularly to wire selected.
# -*- coding: utf-8 -*-
__title__ = "Macro Perpendicular To Wire"
__author__ = "Mario52"
__url__ = "https://www.freecadweb.org/wiki/index.php?title=Macro_Perpendicular_To_Wire"
__version__ = "00.02"
__date__ = "06/04/2019"
import Draft, Part
try:
@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 / Macro_FCTreeView.FCMacro
Last active July 4, 2025 14:54
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) <mario52> 2017 2018 2019 2020 2021 2022 2023 2024 2025 *
* *
* This file is a supplement to the FreeCAD CAx development system. *
* *
* This program is free software; you can redistribute it and/or modify *