Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 61 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,63 @@ API between minor releases.

### Added

- `RvtDocument.FamilyOwnerId` names the owner family of a family document (`.rfa`). `ProjectElementsOnly` no longer
leaves out the content of a family document: it was the whole model, so a scene of a family had no geometry.
- The meshes and the scene of a family file show the family at its saved type: solid forms and nested families, without
the hosts, reference planes and voids of the template. A form hidden by the family parameter that drives its visibility
has no geometry. `MeshSet.FamilyGaps` and the `family-incomplete` scene diagnostic say when the shape is incomplete.
- `RvtDocument.FamilyTypes` reads the types of a family file and their parameter values from its records, and
`RvtSceneResult.FamilyTypes` lists them with value texts. The scene still holds the saved type only.
- `ElementMeshes.ComputeFamilyType` computes the shape of a family file in another of its types from the relations of the
family, and `RvtSceneResult.FamilyTypes` gives each computed type its instances. Families of extrusions whose sides are
straight lines along the family axes, or arcs and circles whose centre and radius the dimensions fix, are computed, and only
when the computed saved type is what the file stores; any other type says why it is not computed, and no approximate shape
is given. A circle takes the faces the file stores for it: the caps of a loop of arcs alone, or of a circle with circular
holes (a ring), face inward, as the file keeps them, and a circle the file tessellates otherwise than evenly is refused as `saved-state-mismatch`. The circle of a hole
is read whichever way round the file draws its halves.
- A revolution of a whole turn about a line of its sketch along an axis of the sketch plane, whose profile is closed loops of
straight lines (a cylinder, a ring, a cone, a stepped body, a slanted side) is computed like an extrusion: the surface of each
line is cut into 18 facets, a line on the axis makes no face, a loop inside an odd number of loops is a hole, and a profile that
crosses the axis or itself, or loops that meet, are refused as `degenerate-geometry`. For the saved type the file's own faces of a
revolution are accepted when every corner of each lies on one surface of the revolution (or inside it, on a side of the polygon
the file cuts a circle of it into: a chord between two neighbouring stored corners of the circle that go round the axis, up to
3.8 mm inside the body of the valve; where the file leaves a corner out, as the rim of the valve at 90 degrees, a chord between
two corners of the regular polygon the stored corners define, when they are all on the grid of one whole number of sections to
the turn, the step being the smallest gap), every surface has faces that reach both its circles, and the faces of a surface
share a material (the one its parameter gives), because the file cuts round surfaces as it likes; the way a stored face faces
is not compared, since the file stores half of the side of a cone facing into the solid. A corner inside the circle that is on
no such side (to the tolerance of 1e-6 feet) is a `saved-state-mismatch`.
- A combination of forms (`FamilyGeomCombination`, joined solid geometry) of extrusions and revolutions of the family is
computed: it is drawn as the faces of its members, whole, so where the members overlap the faces inside the union stay and the
shell is not a trimmed one. The file stores the joined shape trimmed and tessellated again, so for the saved type each member is
checked on its own stored faces and the joined shape only by its bounding box against that of the stored faces of its members.
A combination without members, a form that two combinations hold, a member that is no extrusion or revolution of the family or
that a family parameter shows or hides, and a parameter that drives the combination itself are refused. A side alignment of two
joined lines of a sketch that run along one axis is read as the relation the join already gives.
- An instance of a family loaded into the family (the flanges of a valve) is computed in every type from the document of the
loaded family, which the file keeps in a block of its own: that family takes the values of the type of the host through the
associations of the instance, its extrusions are solved like those of the host, and its faces are placed by the origin and
the basis of the instance. For the saved type the placed faces must be the faces the file stores for the instance, one for
one, and each face takes the style of the stored face it is. A type of the host that chooses another type of the loaded
family is refused alone. A loaded family of several types, with hidden or void content, a revolution, a combination, an
instance or a parameter of visibility or material of its own, or an instance whose basis is no rotation, is refused with the
reason. A shared parameter that a loaded family uses is read from the first block of the file. A dimension that holds an
angle, reference lines that lie apart from the drawn lines of a sketch and an instance tied to a work plane are read as relations.
- The scene of a family file and the computed types of it draw a round form round: a circle of an extrusion or a surface of a
revolution that the file keeps as a few flat faces (eight facets for the circles of the flanges of the valve, 18 for a revolution)
is cut into 720 facets, so the volume of what is drawn is the exact volume to 1.3e-5 (the valve: the body to 1e-3, the ring and
the flanges to 1e-4 of the volumes Revit gives) and not a tenth below it. The saved type is drawn so too, as the other types are,
in place of the coarse meshes of its elements, so that the shape does not change when the type does. The members of a
combination keep their 18 facets, as Revit draws them. The faces that are checked against the file are those it stores, and
`ElementMeshes.ComputeFamilyType(document, index, smooth)` is the overload that gives the finer ones. A scene of a family has
many more vertices than before (the valve: some 25 MB of viewer page for all its types, from 1.8 MB).
- A parameter that drives a dimension or a form of a family and is given by a formula no longer makes the family refuse: each
type stores the value its parameter has, that value is used as stored, and the formula is not evaluated again. For the saved
type the computed faces are still checked against the stored ones.
- `RvtReaderOptions.FineCircularEdges` and `RvtSceneOptions.FineCircularEdges` (off by default). A circle where a cylinder meets a
plane is sampled by default as Revit's low detail level samples it, a polygon of about eight sides for a pipe; with the option the
faces take the finer points the file stores, so the circle looks round. The faces of other surfaces do not change.
- Add experimental native RVT downgrade output using a target-release profile. The CLI writes a separate file and can report known omissions. Writing projects for Revit 2020 or 2021 requires a complete target project with unit data.

- Report progress while reading a Revit file: `RvtReadProgress` (phase, completed and total units),
`RvtReaderOptions.Progress` and `RvtSceneOptions.ReadProgress` (for `RvtSceneReader.Read(path)`). The reader calls
`IProgress<RvtReadProgress>.Report` synchronously on the reading thread, in phase order; see
Expand Down Expand Up @@ -163,6 +218,11 @@ API between minor releases.

### Fixed

- A cylinder or a surface of revolution with no trim edge, or a trimmed one with a single row of samples, takes no more
grid cells than a trimmed face may (20000; 1024 at the coarse level), and the angular samples of a surface of a huge
radius are bounded. A damaged file could otherwise ask for tens of gigabytes.
- A face of a surface of revolution that is bounded only by its meridians and meets the axis at both ends, such as half
a sphere, is no longer drawn flat: its triangles now follow the angle between the meridians.
- IFC export with Revit parameters grouped (`--ifc-revit-parameter-groups`) no longer writes several properties of one
name in a property set. Entries of one name and value are merged into one property; if only one is left, it keeps the
plain name. If values differ, each remaining property gets ` [parameter id]` appended, then ` #2`, ` #3`, … if that
Expand Down
Loading
Loading