Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use representation instances for reducers #1089

Merged
merged 3 commits into from
Jan 6, 2025
Merged
Changes from all commits
Commits
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
9 changes: 8 additions & 1 deletion Elements.MEP/src/Fittings/Reducer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,14 @@ public override void UpdateRepresentations()
var arrows = this.Start.GetArrow(branchSideTransformInverted.OfPoint(startNodeTransform.Origin))
.Concat(this.End.GetArrow(endNodeTransform.Origin)).Concat(GetExtensions());

this.Representation = new Representation(new List<SolidOperation> { sweep1, sweep2 }.Concat(arrows).ToList());
// TODO: Update the Factory pattern for setting representationInstances to work with Reducer transforms.
// It would also be ideal to fully understand the geometry artifacts seen with certain Reducers that result in
// bad boolean graphics which result in invisible or fractured geometry.
var solidOperations = new List<SolidOperation> { sweep1, sweep2 }.Concat(arrows).ToList();
foreach (var solidOperation in solidOperations)
{
this.RepresentationInstances.Add(new RepresentationInstance(new SolidRepresentation(solidOperation), this.Material));
}
}

public override void ApplyAdditionalTransform()
Expand Down
Loading