Function Reference: model.read

drafting: A = model.read (FILE)

Read an assembly from a STEP or 3MF file.

A = model.read (FILE) returns the product the STEP file FILE holds as a model.Assembly, in millimetres whatever unit the file was written in: its parts with their names and the colours of their solids, placed where the file places them and named as it names the placements, and its sub-assemblies the same way. A part the file places several times is one part placed several times. Several products at the top of the file are placed where they are in one assembly, and a file of a single part gives an assembly placing it once; either is named after the base name of FILE.

A = model.read (FILE) reads a 3MF file, .3mf, the same way: each object a polymesh.Mesh part, in the colours of its triangles, each object made of others an assembly of them, and the build an assembly named after FILE, unless it is one assembly placed as it is. An object without a name is named after its number, and a name used twice is made distinct. 3MF may place an object scaled or mirrored, which a geom.UCS cannot: such an object is placed as a copy of it, made so, at the origin, named after it with ' (placed)'.

solid.read reads a STEP file as one shape, its parts the solids of it, and polymesh.read a 3MF file as one mesh.

See also: model.Assembly, solid.read, polymesh.read

Source Code: model.read