Offset curves by a fraction

So I know what I want to do but not sure the path to take. My end goal is to have dynamo add a family into precast walls. So what I am trying to so is tale the face of the wall and I want to offset the perimeter in on its self but want it to be a fraction of its total length. Would I need to make long strings of nodes, or even custom ones to clean up the space, or is there already nodes that will let me do that with out me needing to try and make it again from scratch.

Getting the offset curves is fairly easy:

  • Select Face node.
  • Surface.PerimeterCurves node.
  • Polycurve.ByJoinedCurves node.
  • Curve.Offset node.
  • Number node set to your desired offset distance (you will want a negative value to offset into the surface area so you may want a * node and a Number node hard coded to -1 for user understandability).
  • Geometry.Explode node.

Now these will be Dynamo curves, so assuming you want to create/modify Revit elements will require you have a plan for how your family will work. Adaptive components might be well suited here.

@jacob.small Are you sure the offset node is stable? because I have found the node very unpredictable. It doesn’t seem to work always. Most of the time it doesn’t work :(. What is going on? it’s a bug in dynamo? Or maybe it’s Revit, which is in my eyes a very low quality software.

if a line is drawn left to right it has another offset than a right to left one.
is this what you see?
in that case use this one
image

Yes. It is quite stable.

Not sure - can you create a new post which shows the erratic behavior?

Unclear until we see what the issue is. 55 times out of 100 I’ve found this to be an issue upstream of the Curve.Offset node (curves change direction, offsetting curves instead of polycurves, nulls or empty lists, etc). 40 out of 100 times it’s an issue with the geometry (attempting to offset non-planar curves, offset distances which make invalid geometry, etc). The last 5 are bugs somewhere in the system (ASM or Dynamo).

I disagree with the quality comment, but it’s certainly not a Revit issue. Dynamo geometry is Dynamo geometry only until you move it into Revit.

Most of the ‘issues’ people have around the interaction between Dynamo and Revit is a result of not fully understanding the differences in the geometry engines and program structures, which is perfectly understandable. one does not need to know the exact function of every part of their car to drive it, nor should they have to - it’d rarely ever help. But knowing when to go see a mechanic is a really good skill to have. :slight_smile:

@Marcel_Rijsmus - since we’re selecting faces, we can assume that the edges form a single closed polycurve (otherwise we’ll have other issues to deal with), so the Surface.PerimeterCurves node means we’ll be able to build a single closed polycurve, which always moves in one direction, so no need for the springs node (I do use that often though).

1 Like

So i went through your path and it works but i am not sure fully. I added a small section to calculate the offset required as its a persent of the length(in revit it would be the height of the wall) and width (in revit it would be the length). I find that if i run thd program with Polycurve.ByJoindCurves it only applies one offset distance. If i skip that node and go right into Curve.Offset it gives me the right offsets but its nolonger on the same plane of the surface. What am i doing wrong?Lifters.dyn (21.3 KB)
Attached is my script, you will also see a List.GetItemAtIndex as when running the precast program it adds bracing into the face of the panel adding holes making extra points so its getting me just the border points.