fix(SingleThreadedFragmentsModel): apply common fragments model interface#227
fix(SingleThreadedFragmentsModel): apply common fragments model interface#227ShaMan123 wants to merge 9 commits into
Conversation
|
Methods that can be added to getGuids() {
return this._virtualModel.getGuids();
}
getItemsWithGeometryCategories() {
return this._virtualModel.getItemsWithGeometryCategories();
}
getItemsVolume(localIds: number[]) {
return this._virtualModel.getItemsVolume(localIds);
}
getAttributeNames() {
return this._virtualModel.getAttributeNames();
}
getAttributeValues() {
return this._virtualModel.getAttributeValues();
}
getAttributeTypes() {
return this._virtualModel.getAttributeTypes();
}
getRelationNames() {
return this._virtualModel.getRelationNames();
}
getAttributesUniqueValues(params: AttributesUniqueValuesParams[]) {
return this._virtualModel.getAttributesUniqueValues(params);
}
getItemsMaterialDefinition(localIds: number[]) {
return this._virtualModel.getItemsMaterialDefinition(localIds);
}
getMergedBox(localIds: number[]) {
return this._virtualModel.getBBoxes(localIds);
}
getBoxes(localIds?: number[]) {
const ids = localIds ?? (this._virtualModel.getLocalIds() as number[]);
return ids.map((id) => this._virtualModel.getBBoxes([id]));
}
setLodMode(lodMode: LodMode) {
this._virtualModel.setLodMode(lodMode);
} |
…`getItemsIdsWithGeometry`
9e82a89 to
40961c6
Compare
c99c6db to
c428f5a
Compare
| * @param localIds - The local IDs of the items to look up. | ||
| */ | ||
| getPositions(localIds: number[]) { | ||
| getPositions(localIds?: number[]) { |
There was a problem hiding this comment.
fixed signature, non breaking
ShaMan123
left a comment
There was a problem hiding this comment.
Ready for review
Regarding file/interface naming please suggest to desired pattern so I can align with standards.
|
Should |
|
Thanks for pushing this through, the Two things to reshape:
Everything else is good to go:
On your question: should |
|
See the last commit with requested changes. |
Description
closes #216
asyncdirectivesBREAKING: renameexposedSingleThreadedFragmentsModel#getItemsWithGeometrytogetItemsIdsWithGeometryfor compat withFragmentsModelgetItemsIdsWithGeometryand deprecatedgetItemsWithGeometrygetItemsVolumeAdditional context
Misalignments — methods present in one class but absent (or internal) in the other
FragmentsModelonly (missing fromSingleThreadedFragmentsModel):getGuids()— VirtualFragmentsModel exposes this but SingleThreaded does not.getItemsWithGeometryCategories()— same situation.getItemsIdsWithGeometry()— FragmentsModel only.getCoordinationMatrix()— FragmentsModel only.getMergedBox()/getBoxes()— FragmentsModel only.getAlignments()/getHorizontalAlignments()/getVerticalAlignments()/getAlignmentStyles()— FragmentsModel only.getGrids()/getGridMaterial()/setGridMaterial()/getGridLabelMaterial()/setGridLabelMaterial()— FragmentsModel only.useCamera()/setLodMode()— FragmentsModel only.raycast()/raycastAll()/raycastWithSnapping()/rectangleRaycast()— FragmentsModel only.setVisible()/toggleVisible()/resetVisible()/getVisible()/getItemsByVisibility()— FragmentsModel only.highlight()/setColor()/resetColor()/setOpacity()/resetOpacity()— FragmentsModel only.getHighlight()/resetHighlight()/getHighlightItemIds()— FragmentsModel only.getItemsMaterialDefinition()— FragmentsModel only.getAttributesUniqueValues()— FragmentsModel only.getEditedElements()— FragmentsModel only.getItemsVolume()— FragmentsModel only.getAttributeNames()/getAttributeValues()/getAttributeTypes()/getRelationNames()— FragmentsModel only.getGeometries()— FragmentsModel only.getItem()— FragmentsModel only.SingleThreadedFragmentsModelonly (absent or internal inFragmentsModel):edit()— public in SingleThreaded;FragmentsModelexposes_edit()(internal) and routes edits through theEditorclass.reset()/save()— same;_reset()/_save()are internal in FragmentsModel.undo()/redo()— SingleThreaded only; no equivalent in FragmentsModel.getRequests()/setRequests()/selectRequest()— SingleThreaded only;_getRequests()etc. are internal in FragmentsModel.What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following:
feat(examples): add hello-world example).fixes #123).