Wall location curve

@john_pierson

Two Clockwork nodes, an Archilab node, and a single code block to get interior, exterior, interior core face, and exterior core face from a wall. If anyone wants to include it in a package feel free.

get wall faces.dyn (12.3 KB)

{wallcurves,direction,walltypes,Widths,cores};
/* get the distance from wall location (centerline) to the
exterior face of wall*/
distance =
	walltypes.GetParameterValueByName("Width")/2;
//get the curves at the exterior face
ExtFaceCurves =
	wallcurves.Translate(direction,distance);

/*Get the number of indicies which need to be dropped*/

ExtDrop =
	-(List.Count(cores<1L>)
		-
	IndexOf(cores<1L>, true));

/* Drop the widths which are not outside the core to get the
width from the exterior face to exterior face of the core */

ExtFaceToExtCore =
	Math.Sum(
		List.DropItems(
			Widths@@-2<1L>,
			ExtDrop<1L>
		)
	);

/* Drop the widths which are not inside the core to get the
width from the exterior face to interior face of the core */

IntDrop =
	-IndexOf(
		List.Reverse(
			cores<1L>
		)@-2<1>,
		true
	);
/* Drop the widths which are not inside the core to get the
width from the exterior face to interior face of the core */
ExtFacetoIntCore =
	Math.Sum(
		List.DropItems(
			Widths@@-2<1L>,
			(IntDrop<1L>)
		)
	);

// OffsetExterior Face to Exterior of Core
ExtCore =
	ExtFaceCurves.Translate(
		Vector.Reverse(direction),
		ExtFaceToExtCore
	);


// OffsetExterior Face to Interior of Core
IntCore =
	ExtFaceCurves.Translate(
		Vector.Reverse(direction),
		ExtFacetoIntCore
	);

//Get total wall width
TotalWidth =
	walltypes.GetParameterValueByName("Width");

/*Get interior face of wall by offsetting the
exterior face by the total width*/
IntFace =
	ExtFaceCurves.Translate(
		Vector.Reverse(direction),
		TotalWidth
	);

Just used it in combination with a Springs.LineLoop.Merge to generate floors which align with the exterior core face in a few heartbeats. Why anyone would ever do the one billion click method when there are tools like this out there is beyond me.

12 Likes