Skip to content

CADability 1.8.6

Latest

Choose a tag to compare

@dsn27 dsn27 released this 02 Dec 07:47
· 2 commits to master since this release
115f121

CADability 1.8.6

CADability 1.8.6 is on nuget.org. This patch release fixes the STEP import: length units such as the inch, solids that came twice, closed B-spline surfaces with a periodic knot vector, and the units of parts in parallel import.

No recompilation needed. 1.8.6 is source and binary compatible with 1.8.5: no public API is added, removed or changed.

STEP files may import differently. Files whose length unit is an inch, a foot or another conversion based unit now come in at their real size, which is 1000 times larger than before for inch files from SolidWorks. Assemblies in metres or centimetres get their parts at the right places. Read the behaviour changes below before you update an application that compensated for the old results.

Fixes

All fixes are in ImportStep.

  • Length units given as a conversion based unit were scaled wrongly (#573, #574). SolidWorks writes the inch as CONVERSION_BASED_UNIT('INCH', …) of 0.0254 of SI_UNIT($,.METRE.). The import scaled by the bare factor 0.0254 instead of 25.4, because it never read the unit the factor is expressed in, so such parts came in 1000 times too small. Length units are now resolved recursively: an SI_UNIT METRE with its prefix, or a conversion based unit as its factor times the size of its own unit, so a foot defined as 12 inch works as well. The geometry and the placements of an assembly use the same factor.
  • Assemblies in metres or centimetres had their parts at the wrong places (#574). The geometry of such a file was scaled to millimetres, but the locations of the placements were not, so the parts were placed 1000 (or 10) times too close to the origin of the assembly.
  • A single-part file gave every solid twice (#575, #577) when the representation of its solids takes part in two relationships, typically a SHAPE_REPRESENTATION_RELATIONSHIP and a CONSTRUCTIVE_GEOMETRY_REPRESENTATION_RELATIONSHIP to "supplemental geometry", as many CAD systems write it. Each relationship and each representation sharing the context added the solids again. Assemblies were not affected.
  • Closed B-spline surfaces with an unclamped (periodic) knot vector (#576, #578) overlapped themselves. Such a surface is only defined on one period, [t(p), t(m−p)] of its knot vector; the import now trims it to that range. For the polygon taper of a Sandvik Capto boring bar the faces were inconsistent, the solid had holes and reading the file took about 9 s; now the faces are consistent, the volume agrees with Open CASCADE within 0.002 %, and the file is read in about 0.5 s.
  • With StepImport.Parallel (the default), parts were made with the units of other parts (#579, #581). All threads of the parallel import shared one object with the length unit, the angle unit and the uncertainty of "the current representation". In assemblies whose parts have different units or uncertainties, bodies were lost, became open shells or got wrong cones, differently from one import to the next. Each thread now has its own units, and the list of import problems is written under a lock.
  • An angle unit of RADIAN did not reset a previous DEGREE (#580, #581), also in sequential import: a part read after a part whose angle unit is a CONVERSION_BASED_UNIT('DEGREE', …) got cones with semi-angles about 57 times too small. A representation context that assigns units now starts from millimetre, radian and no uncertainty, and only a context without units keeps the values of the previous one.

Behaviour changes

  • STEP files with a conversion based length unit (inch, foot, a millimetre written as 0.001 of a METRE, …) are imported at their real size. Files in millimetres, whether written as SI_UNIT(.MILLI.,.METRE.) or as a conversion based 'MILLIMETRE' of 1 MILLI METRE, are unchanged.
  • In STEP assemblies whose length unit is METRE or CENTI METRE, the placements of the parts are scaled like their geometry.
  • Single-part STEP files of the kind described above contain each solid once.
  • Closed B-spline surfaces with an unclamped knot vector are trimmed to one period, which changes their parameter range (GetNaturalBounds) where the knot vector extends beyond the period by more than one knot.
  • A representation context that assigns units no longer inherits the uncertainty of the previous context when it declares none.

Package

CADability.1.8.6.nupkg contains CADability.dll and CADability.xml for netstandard2.0, with ACadSharp.dll and ACadSharp.xml 3.8.49 (FriendsOfCADability fork) embedded, as in 1.8.5. Dependencies are unchanged from 1.8.5. Symbols are on the nuget.org symbol server (CADability.1.8.6.snupkg, Source Link).