MCPcopy Index your code
hub / github.com/CadQuery/cadquery / export

Method export

cadquery/cq.py:4526–4561  ·  view source on GitHub ↗

Export Workplane to file. :param path: Filename. :param tolerance: the deflection tolerance, in model units. Default 0.1. :param angularTolerance: the angular tolerance, in radians. Default 0.1. :param unit: The internal unit of the model's geometry values.

(
        self: T,
        fname: str,
        tolerance: float = 0.1,
        angularTolerance: float = 0.1,
        unit: UnitLiterals = "MM",
        outputUnit: Optional[UnitLiterals] = None,
        opt: Optional[Dict[str, Any]] = None,
    )

Source from the content-addressed store, hash-verified

4524 return rv
4525
4526 def export(
4527 self: T,
4528 fname: str,
4529 tolerance: float = 0.1,
4530 angularTolerance: float = 0.1,
4531 unit: UnitLiterals = "MM",
4532 outputUnit: Optional[UnitLiterals] = None,
4533 opt: Optional[Dict[str, Any]] = None,
4534 ) -> T:
4535 """
4536 Export Workplane to file.
4537
4538 :param path: Filename.
4539 :param tolerance: the deflection tolerance, in model units. Default 0.1.
4540 :param angularTolerance: the angular tolerance, in radians. Default 0.1.
4541 :param unit: The internal unit of the model's geometry values. Only used for STEP. Default "MM".
4542 :type unit: UnitLiterals
4543 :param outputUnit: The unit to use in the STEP file header. If None, defaults to the value of ``unit``.
4544 Use this when you want the output file to declare a different unit than the model's internal unit,
4545 for example to export a MM model as a STEP file declaring meters.
4546 :type outputUnit: UnitLiterals or None
4547 :param opt: additional options passed to the specific exporter. Default None.
4548 :return: Self.
4549 """
4550
4551 export(
4552 self,
4553 fname,
4554 tolerance=tolerance,
4555 angularTolerance=angularTolerance,
4556 unit=unit,
4557 outputUnit=outputUnit,
4558 opt=opt,
4559 )
4560
4561 return self
4562
4563
4564# alias for backward compatibility

Callers 15

test_exportFunction · 0.45
_exportBoxMethod · 0.45
testSVGOptionsMethod · 0.45
test3MFMethod · 0.45
testVRMLMethod · 0.45
testVTPMethod · 0.45
testDXFMethod · 0.45
testBINMethod · 0.45
testTypeHandlingMethod · 0.45
test_stl_asciiFunction · 0.45
test_stl_binaryFunction · 0.45
test_exportMethod · 0.45

Calls 1

exportFunction · 0.90

Tested by 15

test_exportFunction · 0.36
_exportBoxMethod · 0.36
testSVGOptionsMethod · 0.36
test3MFMethod · 0.36
testVRMLMethod · 0.36
testVTPMethod · 0.36
testDXFMethod · 0.36
testBINMethod · 0.36
testTypeHandlingMethod · 0.36
test_stl_asciiFunction · 0.36
test_stl_binaryFunction · 0.36
test_exportMethod · 0.36