SGcreatebin2mfile

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - CODING/DEVELOP
Introduced first in SolidGeometry 5.4, Creation date: 2024-04-21, Last change: 2025-09-15

reads any file, and writes a matlab fnct that can create a copy of this file

Description

reads in any file from disk and converts the binary code into hexcode. This hexcode is automatically written with some additional code lines into an executable m-file with the same name.

If the m file is executed a copy of the binary file is created by the m file in the desktopdir.

This function was written to create on deman different 3mf files in different folder formats for different purposes without knowing exactly the structure of the 3mf (zip) archive

An earlier concept for ascii code was convertCode2String, smbPSLibCreateBlock, smbPSLibCompile, smbPSLibInstall for the simscape multi body simulation

See Also: str2hexsstr , hexstr2str , smbPSLibCreateBlock , smbPSLibCompile , smbPSLibInstall

Example Illustration

 missing image of SGcreatebin2mfile (binfile)

Syntax

SGcreatebin2mfile(binfile)

Input Parameter

binfile: name of a binay file on disk

Examples


SGcreatebin2mfile('/Volumes/LUETH-WIN/WIN AIM Matlab Libraries/SolidGeometry-Code/Bambu.3mf')




Copyright 2024-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth

Last html export of this page out of FM database by TL: 2025-09-21