Skip to content

The shadow method Transformer.transformCollection prevents space.Geometry.Simplify() to work correctly #92

@andreacomparini

Description

@andreacomparini

Using DP geometry simplification I noted that the shadow method tranformCollection() in Tranformer obscure the call at a missing method in DPTransformer and the call at space.Geometry.Simplify() doesn't work in case of geometry collection.
I suppose the following method has to be added for DPTransformer.

func (d *DPTransformer) transformCollection(geom matrix.Collection, parent matrix.Steric) matrix.Steric {
	transGeoms := matrix.Collection{}
	for _, v := range geom {
		transformGeom, _ := d.Transform(v)
		if transformGeom == nil {
			continue
		}
		if d.pruneEmptyGeometry && transformGeom.IsEmpty() {
			continue
		}
		transGeoms = append(transGeoms, transformGeom)
	}
	return transGeoms
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions