Path: AerospaceUtils/CAD
% Load a 3D CAD file. Handles .obj LoadOBJFile will open myFile.obj. If you want to scale the units of the model, for example from vertex units to inches, you can define the factor using kScale. If you call the function with no outputs it will draw the model. If you call the function with an empty filename you can select a file using the dialog box. If you want to use the model data in BuildCADModel, pass the component vertex (v) and face (f) fields to a generic component. m = CreateComponent( 'make', 'generic', 'vertex', v, 'face', f ... ) -------------------------------------------------------------------------- Form: g = LoadOBJFile( file, path, format, kScale ) LoadOBJFile % Demo LoadOBJFile( [] ) % Dialog box -------------------------------------------------------------------------- ------ Inputs ------ file (1,:) Filename kScale (1,1) Optional scale factor of the model ------- Outputs ------- g (.) Data structure .name (1,:) Model name .component (:) Component structure .radius (1,1) Maximum radius of the object --------------------------------------------------------------------------
AerospaceUtils: CAD/CreateComponent Common: Graphics/NewFig Common: Graphics/XLabelS Common: Graphics/YLabelS Common: Graphics/ZLabelS Math: Linear/Mag
Back to the AerospaceUtils Module page