PathTests.TestPathPost.TestOutputNameSubstitution Class Reference

Public Member Functions

def test000 (self)
 
def test010 (self)
 
def test015 (self)
 
def test020 (self)
 
def test030 (self)
 
def test040 (self)
 
def test050 (self)
 
def test060 (self)
 
def test070 (self)
 
def test080 (self)
 

Static Public Attributes

 doc = FreeCAD.open(testfile)
 
 ext
 
 job = doc.getObjectsByLabel("MainJob")[0]
 
 macro = FreeCAD.getUserMacroDir()
 
string testfile = FreeCAD.getHomePath() + "Mod/Path/PathTests/test_filenaming.fcstd"
 
 testfilename
 
 testfilepath
 

Detailed Description

String substitution allows the following:
%D ... directory of the active document
%d ... name of the active document (with extension)
%M ... user macro directory
%j ... name of the active Job object


The Following can be used if output is being split. If Output is not split
these will be ignored.
%S ... Sequence Number (default)

%T ... Tool Number
%t ... Tool Controller label

%W ... Work Coordinate System
%O ... Operation Label

    self.job.Fixtures = ["G54"]
    self.job.SplitOutput = False
    self.job.OrderOutputBy = "Fixture"

Assume:
active document: self.assertTrue(filename, f"{home}/testdoc.fcstd
user macro: ~/.local/share/FreeCAD/Macro
Job:  MainJob
Operations:
    OutsideProfile
    DrillAllHoles
TC: 7/16" two flute  (5)
TC: Drill (2)
Fixtures: (G54, G55)

Strings should be sanitized like this to ensure valid filenames
# import re
# filename="TC: 7/16" two flute"
# >>> re.sub(r"[^\w\d-]","_",filename)
# "TC__7_16__two_flute"

Member Function Documentation

◆ test000()

def PathTests.TestPathPost.TestOutputNameSubstitution.test000 (   self)

References App::DynamicProperty::PropData.doc, App::RelabelDocumentExpressionVisitor.doc, App::LinkBaseExtension::PropInfo.doc, Py::PythonType.doc(), ExpressionCompleterModel::Info.doc, Gui::GraphvizView.doc, ItemInfo.doc, ItemInfo2.doc, importIFClegacy.IfcEntity.doc, draftguitools.gui_annotationstyleeditor.AnnotationStyleEditor.doc, draftguitools.gui_base.GuiCommandSimplest.doc, draftguitools.gui_base.GuiCommandBase.doc, draftguitools.gui_base_original.DraftTool.doc, drafttests.test_airfoildat.DraftAirfoilDAT.doc, drafttests.test_creation.DraftCreation.doc, drafttests.test_dwg.DraftDWG.doc, drafttests.test_dxf.DraftDXF.doc, drafttests.test_modification.DraftModification.doc, drafttests.test_oca.DraftOCA.doc, drafttests.test_pivy.DraftPivy.doc, drafttests.test_svg.DraftSVG.doc, WorkingPlane.Plane.doc, Import::ImportOCAF.doc, Import::ImportXCAF.doc, Import::ImportOCAFAssembly.doc, MeshPartGui::Mesh2ShapeGmsh::Private.doc, PartGui::SectionCut.doc, PartGui::FaceColors::Private.doc, PartDesignGui::ComboLinks.doc, Mod.PartDesign.WizardShaft.Shaft.Shaft.doc, Mod.PartDesign.WizardShaft.WizardShaft.TaskWizardShaft.doc, PathTests.TestCentroidPost.TestCentroidPost.doc, PathTests.TestGrblPost.TestGrblPost.doc, PathTests.TestLinuxCNCPost.TestLinuxCNCPost.doc, PathTests.TestMach3Mach4Post.TestMach3Mach4Post.doc, PathTests.TestPathAdaptive.TestPathAdaptive.doc, PathTests.TestPathDrillable.TestPathDrillable.doc, PathTests.TestPathHelix.TestPathHelix.doc, PathTests.TestPathHelpers.TestPathHelpers.doc, PathTests.TestPathPost.TestBuildPostList.doc, PathTests.TestPathPost.TestOutputNameSubstitution.doc, PathTests.TestPathPropertyBag.TestPathPropertyBag.doc, PathTests.TestPathSetupSheet.TestPathSetupSheet.doc, PathTests.TestPathStock.TestPathStock.doc, PathTests.TestPathToolController.TestPathToolController.doc, PathTests.TestPathUtil.TestPathUtil.doc, PathTests.TestRefactoredCentroidPost.TestRefactoredCentroidPost.doc, PathTests.TestRefactoredGrblPost.TestRefactoredGrblPost.doc, PathTests.TestRefactoredLinuxCNCPost.TestRefactoredLinuxCNCPost.doc, PathTests.TestRefactoredMach3Mach4Post.TestRefactoredMach3Mach4Post.doc, PathTests.TestRefactoredTestPost.TestRefactoredTestPost.doc, Sandbox::CustomAddObjectEvent.doc, Sandbox::CustomRemoveObjectEvent.doc, Sandbox::CustomRecomputeEvent.doc, Sandbox::DocumentSaverThread.doc, Mod.Show.SceneDetail.SceneDetail.doc, Mod.Show.SceneDetails.Camera.Camera.doc, Mod.Show.SceneDetails.ClipPlane.ClipPlane.doc, Mod.Show.SceneDetails.ObjectClipPlane.ObjectClipPlane.doc, Mod.Show.SceneDetails.Pickability.Pickability.doc, Mod.Show.SceneDetails.VProperty.VProperty.doc, TestSpreadsheet.SpreadsheetCases.doc, TestSpreadsheetGui.SpreadsheetGuiCases.doc, Commands.TemplatePyMod_Cmd2.doc, PathScripts.PathCamoticsGui.CamoticsSimulation.job, PathScripts.PathJobDlg.JobTemplateExport.job, PathScripts.PathOp.ObjectOp.job, PathScripts.PathOpGui.TaskPanelPage.job, PathScripts.PathOpGui.CommandResources.job, PathScripts.PathSimulatorGui.PathSimulation.job, PathScripts.PathToolLibraryEditor.EditorPanel.job, PathTests.TestPathHelix.TestPathHelix.job, PathTests.TestPathPost.TestBuildPostList.job, PathTests.TestPathPost.TestOutputNameSubstitution.job, and PathTests.TestPathStock.TestPathStock.job.

◆ test010()

◆ test015()

◆ test020()

◆ test030()

◆ test040()

◆ test050()

◆ test060()

◆ test070()

◆ test080()

Member Data Documentation

◆ doc

PathTests.TestPathPost.TestOutputNameSubstitution.doc = FreeCAD.open(testfile)
static

Referenced by draftguitools.gui_lineslope.LineSlope.accept(), draftguitools.gui_dimensions.Dimension.action(), draftguitools.gui_base.GuiCommandSimplest.Activated(), draftguitools.gui_beziers.BezCurve.Activated(), draftguitools.gui_beziers.CubicBezCurve.Activated(), draftguitools.gui_dimension_ops.FlipDimension.Activated(), draftguitools.gui_groups.AddToConstruction.Activated(), draftguitools.gui_heal.Heal.Activated(), draftguitools.gui_layers.Layer.Activated(), draftguitools.gui_splines.BSpline.Activated(), draftguitools.gui_wire2spline.WireToBSpline.Activated(), draftguitools.gui_lines.Line.Activated(), WorkingPlane.Plane.alignToPointAndAxis(), WorkingPlane.Plane.alignToPointAndAxis_SVG(), Mod.Show.SceneDetails.ClipPlane.ClipPlane.apply_data(), Mod.Show.SceneDetails.ObjectClipPlane.ObjectClipPlane.apply_data(), Mod.Show.SceneDetails.Pickability.Pickability.apply_data(), Mod.Show.SceneDetails.VProperty.VProperty.apply_data(), importSVG.svgHandler.characters(), draftguitools.gui_drawing.Drawing.createDefaultPage(), draftguitools.gui_fillets.Fillet.draw_arc(), importSVG.svgHandler.endElement(), draftguitools.gui_arcs.Arc_3Points.finish(), draftguitools.gui_fillets.Fillet.finish(), draftguitools.gui_arcs.Arc.finish(), draftguitools.gui_beziers.BezCurve.finish(), draftguitools.gui_beziers.CubicBezCurve.finish(), draftguitools.gui_polygons.Polygon.finish(), draftguitools.gui_rotate.Rotate.finish(), draftguitools.gui_splines.BSpline.finish(), Mod.Show.SceneDetail.SceneDetail.full_key(), draftguitools.gui_annotationstyleeditor.AnnotationStyleEditor.get_annotations(), importIFClegacy.IfcEntity.getProperties(), importIFClegacy.IfcEntity.getProperty(), draftguitools.gui_groups.AddToGroup.proceed(), draftguitools.gui_annotationstyleeditor.AnnotationStyleEditor.read_meta(), draftguitools.gui_trimex.Trimex.redraw(), draftguitools.gui_lines.Line.removeTemporaryObject(), WorkingPlane.Plane.reset(), draftguitools.gui_annotationstyleeditor.AnnotationStyleEditor.save_meta(), Mod.Show.SceneDetails.ObjectClipPlane.ObjectClipPlane.scene_value(), Mod.Show.SceneDetails.Pickability.Pickability.scene_value(), Mod.Show.SceneDetails.VProperty.VProperty.scene_value(), Mod.Show.SceneDetail.SceneDetail.set_doc(), drafttests.test_creation.DraftCreation.tearDown(), PathTests.TestPathDrillable.TestPathDrillable.tearDown(), PathTests.TestPathHelix.TestPathHelix.tearDown(), PathTests.TestPathPropertyBag.TestPathPropertyBag.tearDown(), PathTests.TestPathSetupSheet.TestPathSetupSheet.tearDown(), PathTests.TestPathToolController.TestPathToolController.tearDown(), TestSpreadsheet.SpreadsheetCases.tearDown(), PathTests.TestPathSetupSheet.TestPathSetupSheet.test00(), PathTests.TestPathUtil.TestPathUtil.test00(), PathTests.TestPathPost.TestOutputNameSubstitution.test000(), PathTests.TestPathSetupSheet.TestPathSetupSheet.test01(), PathTests.TestPathUtil.TestPathUtil.test01(), PathTests.TestPathAdaptive.TestPathAdaptive.test02(), PathTests.TestPathUtil.TestPathUtil.test02(), PathTests.TestPathAdaptive.TestPathAdaptive.test03(), PathTests.TestPathHelix.TestPathHelix.test03(), PathTests.TestPathUtil.TestPathUtil.test03(), PathTests.TestPathAdaptive.TestPathAdaptive.test04(), PathTests.TestPathHelix.TestPathHelix.test04(), PathTests.TestPathUtil.TestPathUtil.test04(), PathTests.TestPathAdaptive.TestPathAdaptive.test05(), PathTests.TestPathAdaptive.TestPathAdaptive.test06(), PathTests.TestPathAdaptive.TestPathAdaptive.test07(), PathTests.TestPathSetupSheet.TestPathSetupSheet.test13(), drafttests.test_creation.DraftCreation.test_dimension_linear_obj(), drafttests.test_creation.DraftCreation.test_dimension_radial_obj(), drafttests.test_creation.DraftCreation.test_facebinder(), drafttests.test_creation.DraftCreation.test_fillet(), drafttests.test_creation.DraftCreation.test_label(), TestSpreadsheet.SpreadsheetCases.testAggregates(), TestSpreadsheet.SpreadsheetCases.testAlias(), TestSpreadsheet.SpreadsheetCases.testAmbiguousAlias(), TestSpreadsheet.SpreadsheetCases.testBindAcrossSheets(), TestSpreadsheet.SpreadsheetCases.testBindHiddenRefAcrossSheets(), TestSpreadsheet.SpreadsheetCases.testClearAlias(), TestSpreadsheetGui.SpreadsheetGuiCases.testCopySingleCell(), TestSpreadsheet.SpreadsheetCases.testCrossDocumentLinks(), TestSpreadsheet.SpreadsheetCases.testExpressionWithAlias(), TestSpreadsheet.SpreadsheetCases.testFixPR6843(), TestSpreadsheet.SpreadsheetCases.testFunctions(), TestSpreadsheet.SpreadsheetCases.testInsertColumnsAlias(), TestSpreadsheet.SpreadsheetCases.testInsertRows(), TestSpreadsheet.SpreadsheetCases.testInsertRowsAlias(), TestSpreadsheet.SpreadsheetCases.testInvoluteGear(), TestSpreadsheet.SpreadsheetCases.testIssue3128(), TestSpreadsheet.SpreadsheetCases.testIssue3225(), TestSpreadsheet.SpreadsheetCases.testIssue3363(), TestSpreadsheet.SpreadsheetCases.testIssue3432(), TestSpreadsheet.SpreadsheetCases.testIssue4156(), TestSpreadsheet.SpreadsheetCases.testIssue6840(), TestSpreadsheet.SpreadsheetCases.testIssue6844(), TestSpreadsheet.SpreadsheetCases.testMatrix(), TestSpreadsheet.SpreadsheetCases.testMergeCells(), TestSpreadsheet.SpreadsheetCases.testMergeCellsAndBind(), TestSpreadsheet.SpreadsheetCases.testNumbers(), TestSpreadsheet.SpreadsheetCases.testPlacementName(), TestSpreadsheet.SpreadsheetCases.testPrecedence(), TestSpreadsheet.SpreadsheetCases.testQuantitiesAndFractionsAsNumbers(), TestSpreadsheet.SpreadsheetCases.testRelationalOperators(), TestSpreadsheet.SpreadsheetCases.testRemoveColumnsAlias(), TestSpreadsheet.SpreadsheetCases.testRemoveColumnsAliasReuseName(), TestSpreadsheet.SpreadsheetCases.testRemoveRows(), TestSpreadsheet.SpreadsheetCases.testRemoveRowsAlias(), TestSpreadsheet.SpreadsheetCases.testRemoveRowsAliasReuseName(), TestSpreadsheet.SpreadsheetCases.testRenameAlias(), TestSpreadsheet.SpreadsheetCases.testRenameAlias2(), TestSpreadsheet.SpreadsheetCases.testRenameAlias3(), TestSpreadsheet.SpreadsheetCases.testSetInvalidAlias(), TestSpreadsheet.SpreadsheetCases.testSetInvalidAlias2(), TestSpreadsheet.SpreadsheetCases.testSketcher(), TestSpreadsheet.SpreadsheetCases.testUndoAliasCreationReuseName(), TestSpreadsheet.SpreadsheetCases.testUnits(), draftguitools.gui_trimex.Trimex.trimObject(), draftguitools.gui_trimex.Trimex.trimObjects(), Mod.PartDesign.WizardShaft.Shaft.Shaft.updateConstraint(), Mod.PartDesign.WizardShaft.Shaft.Shaft.updateEdge(), and Mod.Show.SceneDetails.ObjectClipPlane.ObjectClipPlane.val().

◆ ext

PathTests.TestPathPost.TestOutputNameSubstitution.ext
static

◆ job

PathTests.TestPathPost.TestOutputNameSubstitution.job = doc.getObjectsByLabel("MainJob")[0]
static

Referenced by PathScripts.PathOp.ObjectOp.addBase(), PathScripts.PathDrilling.ObjectDrilling.circularHoleExecute(), PathScripts.PathToolLibraryEditor.EditorPanel.copyTools(), PathScripts.PathOp.ObjectOp.execute(), PathScripts.PathOp.ObjectOp.getJob(), PathScripts.PathOpGui.TaskPanelBaseGeometryPage.modifyPanel(), PathScripts.PathSimulatorGui.PathSimulation.onJobChange(), PathScripts.PathPocket.ObjectPocket.opUpdateDepths(), PathScripts.PathSurface.ObjectSurface.opUpdateDepths(), PathScripts.PathWaterline.ObjectWaterline.opUpdateDepths(), PathScripts.PathOp.ObjectOp.setDefaultValues(), PathTests.TestPathStock.TestPathStock.test00(), PathTests.TestPathPost.TestOutputNameSubstitution.test000(), PathTests.TestPathStock.TestPathStock.test01(), PathTests.TestPathPost.TestBuildPostList.test010(), PathTests.TestPathPost.TestOutputNameSubstitution.test010(), PathTests.TestPathPost.TestOutputNameSubstitution.test015(), PathTests.TestPathHelix.TestPathHelix.test02(), PathTests.TestPathPost.TestBuildPostList.test020(), PathTests.TestPathPost.TestOutputNameSubstitution.test020(), PathTests.TestPathHelix.TestPathHelix.test03(), PathTests.TestPathPost.TestBuildPostList.test030(), PathTests.TestPathPost.TestOutputNameSubstitution.test030(), PathTests.TestPathHelix.TestPathHelix.test04(), PathTests.TestPathPost.TestBuildPostList.test040(), PathTests.TestPathPost.TestOutputNameSubstitution.test040(), PathTests.TestPathPost.TestBuildPostList.test050(), PathTests.TestPathPost.TestOutputNameSubstitution.test050(), PathTests.TestPathPost.TestBuildPostList.test060(), PathTests.TestPathPost.TestOutputNameSubstitution.test060(), PathTests.TestPathPost.TestOutputNameSubstitution.test070(), PathTests.TestPathPost.TestOutputNameSubstitution.test080(), PathTests.TestPathStock.TestPathStock.test10(), PathTests.TestPathStock.TestPathStock.test11(), PathTests.TestPathStock.TestPathStock.test12(), and PathScripts.PathJobDlg.JobTemplateExport.updateUI().

◆ macro

PathTests.TestPathPost.TestOutputNameSubstitution.macro = FreeCAD.getUserMacroDir()
static

◆ testfile

string PathTests.TestPathPost.TestOutputNameSubstitution.testfile = FreeCAD.getHomePath() + "Mod/Path/PathTests/test_filenaming.fcstd"
static

◆ testfilename

PathTests.TestPathPost.TestOutputNameSubstitution.testfilename
static

◆ testfilepath

PathTests.TestPathPost.TestOutputNameSubstitution.testfilepath
static

The documentation for this class was generated from the following file: