Join between 3 beams
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi everyone , I am struggling with join/connection between 3 beams .As per attachment ,point highlighted with orange color is endpoint location of Beam2 and Beam1 and same point is start point location for Beam3. I want to connect these beams as per Expected Outcome image. It will be ok if there is no join between these three beams but they should place as per expected outcome image.
First approach I tried : I have not used JoinGeometry API and directly placed beams as per their location. In this approach I am getting random results, any of the the beam is extending which I don't have control.
Second approach I tried : I used join geometry API .Below is the code for that and Current condition image is the output of this approach. Kindly please suggest how to get the required results.
private void JoinGeometryBeam1ToBeam2Beam3(Document activeDoc, FamilyInstance Beam1)
{
XYZ minPt = primaryBeam.get_BoundingBox(activeDoc.ActiveView).Min;
XYZ maxPt = primaryBeam.get_BoundingBox(activeDoc.ActiveView).Max;
Outline outLine = new Outline(minPt, maxPt);
outLine.Scale(1.5);
BoundingBoxIntersectsFilter filter = new BoundingBoxIntersectsFilter(outLine);
List<FamilyInstance> connectedBeams = new FilteredElementCollector(activeDoc).WherePasses(filter)
.OfCategory(BuiltInCategory.OST_StructuralFraming)
.OfClass(typeof(FamilyInstance)).Cast<FamilyInstance>().ToList();
foreach (FamilyInstance beam in connectedBeams)
{
JoinGeometryUtils.JoinGeometry(this.ActiveDoc, beam, Beam1);
}
}