Create CurtainSystem gridlines

it would be a good solution…

thank u so much! :))

Yeah, let me try to get it published in Rhythm by the end of the week

1 Like

Ok, perfect!
Let me know if you can do this.
Thank you :))
S

I used CurtainGrid.ByWallElement and CurtainGrid.AddGridLineByPoint togeather and workd fine for me…!
might be a good option to consider until @john_pierson publish his package…!

Thanks for the mention @saju_autodesk.

The problem with this node is it does not take a curtain system as an element.

Gave me a bit of an idea.

The CurtainSystem has a property giving the CurtainGrids. However, these are not exactly what you’d expect. Instead they’re more like the panels in the CS. From which you can then obtain CurtainCells, and from there the surrounding loop curves. Though this is Autodesk.Revit.DB.Curve elements of which you cannot really work correctly inside Dynamo (they don’t convert to Geometry objects readily). Was a bit of a work around for me, but:


In that the Py.RvtCurveToGeomCurve is effectively performing the following Python script:

def XYZtoPoint (xyz):
    	return Autodesk.DesignScript.Geometry.Point.ByCoordinates(xyz.X, xyz.Y, xyz.Z)

def XYZtoVector (xyz):
	return Autodesk.DesignScript.Geometry.Vector.ByCoordinates(xyz.X, xyz.Y, xyz.Z)

def RvtCurveToGoemCurve(elem):
	if hasattr(elem, 'ControlPoints'):
		return Autodesk.DesignScript.Geometry.NurbsCurve.ByPoints ([XYZtoPoint(xyz) for xyz in elem.ControlPoints])
	elif hasattr(elem, 'CtrPoints'):
		return Autodesk.DesignScript.Geometry.NurbsCurve.ByControlPoints ([XYZtoPoint(xyz) for xyz in elem.CtrPoints], elem.Degree)
	elif hasattr(elem, 'Center'):
		if hasattr(elem, 'Radius'):
			return Autodesk.DesignScript.Geometry.Arc.ByThreePoints(XYZtoPoint(elem.Evaluate(0.0, True)), XYZtoPoint(elem.Evaluate(0.5, True)), XYZtoPoint(elem.Evaluate(1.0, True)))
		else:
			return list()
	elif hasattr(elem, 'Direction'):
		return Autodesk.DesignScript.Geometry.Line.ByStartPointDirectionLength(XYZtoPoint(elem.Origin), XYZtoVector(elem.Direction), elem.Length)
	else:
		return list()

You’ll note the Arc is done, though I’ve omitted elliptical arcs. And of course Circles & Ellipses - they’re not be possible as the loops of a curtain panel.

Then the actual Python script doing the “real” work:

def ExtractFaces(cs):
	result = list()
	for grid in cs.CurtainGrids:
		for cell in grid.GetCurtainCells():
			for loop in cell.CurveLoops:
				result.append(Autodesk.DesignScript.Geometry.Surface.ByPatch(Autodesk.DesignScript.Geometry.PolyCurve.ByJoinedCurves([RvtCurveToGoemCurve(elem) for elem in loop])))
	return Autodesk.DesignScript.Geometry.PolySurface.ByJoinedSurfaces(result)

The special node (Py.List.MapEachNonList) just recursively goes through a list applying a python function to each item which is not a list. I prefer doing this instead of wondering about on strange inputs - i.e. the result gets structured in the same arrangement as the input:

Inputs = UnwrapElement(IN[0])
Func = IN[1]

def mapLists(item, func):
	if hasattr(item, '__getitem__'):
		result = list()
		for i in item:
			result.append(mapLists(i, func))
		return result
	else:
		try:
			return func(item)
		except:
			return list()

OUT = mapLists(Inputs, Func)

Though this is just extracting the surfaces of the CurtainSystem, and it actually fails when there are grids on those surfaces (since for some or other reason these come in as lines going past the edges of the system.


image

This is amazing!!
Was it published? I couldn’t find it.

Yeah, @john_pierson, are you done yet? :wink:

Let me push an update today. :slight_smile: I have had a few other things going on, and wanted to make sure the next update was a good one. :slight_smile:

2 Likes

@Greg_McDowell @andresmontemayor

The nodes are in the latest version. Kick the tires around and let me know if they help out. :slight_smile:

Thanks, John.

Unrelated to OP but how are people keeping track of package updates? Seems I only know about them if I stumble across them online.

1 Like

Unfortunately, this is a pretty difficult process. I think there are some fixes in the future but nothing now. I am actually working on something on the side to help as well, but it’s far from ready.

For now I see updates on twitter.

John

@john_pierson

Thanks so much! I just tried it out but I don’t know if I’m doing something wrong or not.
In the previous release, the “CurtainGrid.AddGridLineByPoint” would allow me to add multiple lines at the same time and apparently now I can only add one at a time?

My file is inserting a grid line where it finds a reference plane.

Might change the lacing to longest for now and I will release a fix in the
future.

Hi guys!
@john_pierson I download your Rhythm package (thank u) and I used a node named CurtainGrid.ByCurtainSystem :slight_smile:
My goal is to create a parametric grids layout for CurtainWallSystem create by a mass.
I would align my grids on the Levels in Revit model, in this way i can change the values when I want.

I have developed the function with Revit 2017, but I have to use Revit 2016, and the package Rhythm wtih CurtainGrid.ByCurtainSystem script doesn’t works with Revit 2016…
Can you help me or give me others solutions to use this script in Revit 2016?
Thank u so musch :))
S

1 Like

Hello , @john_pierson ,

actually ,i am trying to create curtain wall with the help of curtain system by face node and it kept failing with warning shows in screenshot .is there any other way to create curtain wall by surface only, please advise .

thank you !

1 Like

D%C3%B6%C5%9Feme%20hizas%C4%B1ndan%20%C3%A7izgi%20%C3%A7ekme%20-%20Error%201 Hi Guys,
I am trying to do the same thing. but it cause error. " Warning: One or more of the input types are not matching. Couldn’t find a version of ByCoordinates that takes arguments of type (int,int,__array) ". What should ı do ?

Hi Saju,

you had posted a workflow to create a CS Grid system, would you be to expand on this topic: I have an issue creating grid pattern horizontally and vertically an certain distances.
Thank you for your help