Skip to content
Snippets Groups Projects
Commit 19bfc353 authored by Alexander Rose's avatar Alexander Rose
Browse files

fixed StructureElementIterator.fromGroup to pick unit corresponding to instance

parent bb7380ae
No related merge requests found
...@@ -87,11 +87,12 @@ export function getElementLoci(pickingId: PickingId, group: Unit.SymmetryGroup, ...@@ -87,11 +87,12 @@ export function getElementLoci(pickingId: PickingId, group: Unit.SymmetryGroup,
export namespace StructureElementIterator { export namespace StructureElementIterator {
export function fromGroup(group: Unit.SymmetryGroup): LocationIterator { export function fromGroup(group: Unit.SymmetryGroup): LocationIterator {
const unit = group.units[0]
const groupCount = group.elements.length const groupCount = group.elements.length
const instanceCount = group.units.length const instanceCount = group.units.length
const location = StructureElement.create(unit) const location = StructureElement.create()
const getLocation = (groupIndex: number) => { const getLocation = (groupIndex: number, instanceIndex: number) => {
const unit = group.units[instanceIndex]
location.unit = unit
location.element = unit.elements[groupIndex] location.element = unit.elements[groupIndex]
return location return location
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment