Skip to main content

Module spec_notes

Module spec_notes 

Source
Expand description

Surface finish, threads, knurls and notes authored in the Spec (draftwright-rust #43 item 1, the second part; stream K1b), the way crate::spec_gdt authors datums and controls. Python draftwright’s Sheet.finish(ra, ref), _Hole.thread(spec, depth=), _Dim.thread(spec), _Dim.knurl(pitch, pattern), Sheet.note(text, ref) and Sheet.default_surface_finish(ra) are the reference for what may be said:

  • features/<id>/finish and faces/<face>/finish: an ISO 1302 surface texture, {ra, removal?} (Ra in µm; removal is required, prohibited or any, the default), drawn as a face’s AP242 surface texture is (the symbol on a leader from the face’s edge); sheet/default_finish, the same, is the part’s default finish beside the title block.
  • features/<id>/thread: an ISO metric thread {designation, length?} (M6, M10x1.25-6g, M5 LH) on a hole the callouts state on its own, a hole pattern or a turned step, printed after its callout’s size as an AP242 thread is (⌀6 THRU M6, ø10 M10; 15 MIN FULL THREAD).
  • features/<id>/knurl: {pattern, pitch} (straight or diamond, mm) on a turned step, printed after its diameter as an AP242 knurl is (ø24 STRAIGHT KNURL P0.8).
  • features/<id>/note and faces/<face>/note: free text on a leader to the feature or face, drawn as an AP242 surface label is. A note on the sheet is a general note (notes), and the general tolerance is the title block’s (sheet/title/tolerance): both were authored before.

Each is lowered into the record an AP242 requirement of its kind is read into (crate::pmi::Record, its source spec:<path>), merged into the Analysis’s PMI reading with the datums and controls (crate::spec_gdt::effective). Where the file states the same (a finish on any of the same faces, the part’s default finish, a thread or knurl on any of the same faces) the Spec’s wins with spec_overrides_pmi. What cannot be read (a roughness not positive, an unknown removal, a designation that is not ISO metric, an empty note) is refused; a thread or knurl its feature cannot carry (a knurl on a hole, a tap larger than its hole, a length past its feature’s) is reported as an AP242 one no feature owns is (pmi_not_lowered, crate::pmi_lowering::manufacturing).

Structs§

FinishSpec
An ISO 1302 surface texture the Spec authors (draftwright’s finish(ra)).
KnurlSpec
A knurl the Spec authors on a turned step (draftwright’s knurl(pitch, pattern)).
ThreadSpec
An ISO metric thread the Spec authors on a hole, hole pattern or turned step (draftwright’s thread(spec, depth=)).

Functions§

authors
Whether spec authors any finish, thread, knurl or note, or a default finish.