Macro WireFilter

From FreeCAD Documentation
Jump to navigation Jump to search
Other languages:
English • ‎français

Wirefilter.svg Macro WireFilter

Description
Filter wires from sketches, 2D offsets, scales, rearranges wire order

Macro version: 0.2021.12.13
Last modified: 2021-12-13
FreeCAD version: python 3 versions
Download: ToolBar Icon
Author: TheMarkster
Author
TheMarkster
Download
ToolBar Icon
Links
Macro Version
0.2021.12.13
Date last modified
2021-12-13
FreeCAD Version(s)
python 3 versions
Default shortcut
None
See also
None

Description

WireFilter is a macro that can be used to filter certain wires from a sketch. It can also be used on any object with wires, such as a solid. With WireFilter you can do a 2D offset of a wire, you can scale the wire, you can use one of 4 different facemakers (Part::FaceMakerBullseye, Part::FaceMakerCheese, Part::FaceMakerSimple, or Part::FaceMakerExtrusion) if you want to make a face. You can also reset the wire order, which can be useful where a loft is criss-crossing because the wire order is different with the 2 sketches being used.

Examples and full documentation can be found on github: WireFilter.

In the screenshot below, WireFilter is used to make faces from a bullseye sketch (with nested holes within holes) for use with a PartDesign::Pad. Normally, Pad cannot manage such sketches, but if we make the face for it (using FaceMakerBullseye) and select the faces for the Pad it will be able to pad the WireFilter.

Wirefilter scr1.png

Macro WireFilter screenshot‎

Known Issues

Sometimes Pad cannot find the correct normal and the WireFilter is padded off in the wrong direction. This can be fixed by toggling the Fix Normal property of the WireFilter object, which sets the Pad's custom direction to the correct normal. This also works for Extrude when it fails to find the correct normal.

Legend

Temporary code for external macro link. Do not use this code. This code is used exclusively by Addon Manager.


# This code is copied instead of the original macro code
# to guide the user to the online download page.
# Use it if the code of the macro is larger than 64 KB and cannot be included in the wiki
# or if the RAW code URL is somewhere else in the wiki.

from PySide import QtGui, QtCore

diag = QtGui.QMessageBox(QtGui.QMessageBox.Information,
    "Information",
    "This macro must be downloaded from this link\n"
    "\n"
    "https://gist.github.com/mwganson/0aedd5e9057650d0a1f0483f3cc2fa6c/raw/bfff4a29d8484f02bda2a49fea196dad21752280/wirefilter.FCMacro" + "\n"
    "\n"
    "Quit this window to access the download page")

diag.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint)
diag.setWindowModality(QtCore.Qt.ApplicationModal)
diag.exec_()

import webbrowser 
webbrowser.open("https://gist.github.com/mwganson/0aedd5e9057650d0a1f0483f3cc2fa6c/raw/bfff4a29d8484f02bda2a49fea196dad21752280/wirefilter.FCMacro")
<class="rawcodeurl"><a href="https://gist.github.com/mwganson/0aedd5e9057650d0a1f0483f3cc2fa6c/raw/bfff4a29d8484f02bda2a49fea196dad21752280/wirefilter.FCMacro">raw code</a>


ToolBar Icon Wirefilter.svg

Script

Macro Wirefilter.FCMacro