kumiki.blueprint¶
Flat import path
kumiki/__init__.py re-exports everything on this page via from kumiki import *, so every name below is also available directly as kumiki.sympy_to_float -- you do not need to import from the submodule path shown in the heading above.
kumiki.blueprint
¶
Kumiki - Blueprint export module (STL and STEP)
Exports CutTimber and Frame objects to standard CAD interchange formats.
STL export uses trimesh (triangle mesh). STEP export uses OCP (OpenCascade Python bindings from cadquery-ocp) to produce exact B-rep geometry.
BRepPrimAPI_MakeBox
module-attribute
¶
BRepPrimAPI_MakeCylinder
module-attribute
¶
BRepBuilderAPI_MakeEdge
module-attribute
¶
BRepBuilderAPI_MakeWire
module-attribute
¶
BRepBuilderAPI_MakeFace
module-attribute
¶
BRepBuilderAPI_Transform
module-attribute
¶
BRepPrimAPI_MakePrism
module-attribute
¶
BRepOffsetAPI_ThruSections
module-attribute
¶
STEPControl_Writer
module-attribute
¶
STEPCAFControl_Writer
module-attribute
¶
XCAFDoc_DocumentTool
module-attribute
¶
TCollection_ExtendedString
module-attribute
¶
sympy_to_float
¶
export_cut_timber_stl
¶
export_cut_timber_stl(cut_timber: CutTimber, filepath: Union[str, Path], *, local: bool = True) -> None
Export a single CutTimber to an STL file (metres).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cut_timber
|
CutTimber
|
The timber (with cuts applied) to export. |
required |
filepath
|
Union[str, Path]
|
Destination path. Parent directories are created if needed. |
required |
local
|
bool
|
If True (default), export in the timber's own local coordinates (bottom of timber at the origin). If False, export in global coordinates (its actual assembled position and orientation). |
True
|
Source code in kumiki/blueprint.py
export_frame_stl
¶
export_frame_stl(frame: Frame, output_dir: Union[str, Path], *, local: bool = True, combined: bool = False, include_accessories: bool = True) -> List[Path]
Export every timber and accessory in a Frame to STL files.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
frame
|
Frame
|
The frame to export. |
required |
output_dir
|
Union[str, Path]
|
Directory for the STL files. |
required |
local
|
bool
|
If True (default), each individual file is exported in that part's own local coordinates (bottom at the origin). If False, individual files are exported in global coordinates (their actual assembled position and orientation). The optional combined file is always in global coordinates regardless of this flag, since a merged mesh is only meaningful with parts in their real positions. |
True
|
combined
|
bool
|
If True, also write a single |
False
|
include_accessories
|
bool
|
If True, export accessory meshes. If False, export only timbers. |
True
|
Returns:
| Type | Description |
|---|---|
List[Path]
|
List of paths written. |
Source code in kumiki/blueprint.py
export_frame_obj
¶
export_frame_obj(frame: Frame, output_dir: Union[str, Path], *, local: bool = True, combined: bool = False, include_accessories: bool = True) -> List[Path]
Export every timber and accessory in a Frame to OBJ files.
If True (default), each individual file is exported in that part's
own local coordinates (bottom at the origin). If False, individual files are exported in global coordinates. The combined file (if requested) is always in global coordinates regardless of this flag.
Source code in kumiki/blueprint.py
export_frame_3mf
¶
export_frame_3mf(frame: Frame, output_dir: Union[str, Path], *, local: bool = True, combined: bool = False, include_accessories: bool = True) -> List[Path]
Export individual STL members plus an optional combined 3MF scene.
If True (default), each individual STL member is exported in its
own local coordinates (bottom at the origin). If False, in global coordinates. The combined 3MF scene (if requested) is always in global coordinates regardless of this flag.
Source code in kumiki/blueprint.py
export_cut_timber_step
¶
export_cut_timber_step(cut_timber: CutTimber, filepath: Union[str, Path], *, local: bool = True) -> None
Export a single CutTimber to a STEP file (millimetres).
Requires OCP (cadquery-ocp). Install with: pip install cadquery-ocp
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cut_timber
|
CutTimber
|
The timber (with cuts applied) to export. |
required |
filepath
|
Union[str, Path]
|
Destination path. Parent directories are created if needed. |
required |
local
|
bool
|
If True (default), export in the timber's own local coordinates (bottom of timber at the origin). If False, export in global coordinates (its actual assembled position and orientation). |
True
|
Source code in kumiki/blueprint.py
export_frame_step
¶
export_frame_step(frame: Frame, output_dir: Union[str, Path], *, local: bool = True, combined: bool = False, include_accessories: bool = True) -> List[Path]
Export every timber in a Frame to individual STEP files.
Requires OCP (cadquery-ocp). Install with: pip install cadquery-ocp
Geometry is in millimetres (standard STEP/CAD convention).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
frame
|
Frame
|
The frame to export. |
required |
output_dir
|
Union[str, Path]
|
Directory for the STEP files. |
required |
local
|
bool
|
If True (default), each individual file is exported in that part's own local coordinates (bottom at the origin). If False, individual files are exported in global coordinates (their actual assembled position and orientation). The optional combined file is always in global coordinates regardless of this flag, since a merged compound is only meaningful with parts in their real positions. |
True
|
combined
|
bool
|
If True, also write a single |
False
|
include_accessories
|
bool
|
If True, export accessory solids. If False, export only timbers. |
True
|
Returns:
| Type | Description |
|---|---|
List[Path]
|
List of paths written. |
Source code in kumiki/blueprint.py
783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 | |