Element.geometery NOT WORKING

@awilliams are we both talking about this script?
image
I like Jacob’s script, but I like yours as well because it seems like a more universal to identify if anything is mirrored. and I can build a multitude of error handlers from that.

Ah my apologies - I was talking about the one above to get the geometry. Yes that will work with list levels if you put it into a custom node :slight_smile:

Jacob’s script does include a check for if an element is mirrored or not, in the beginning of his code block. Either method will work.

Correct me if I am wrong, and I very well may be, but doesnt Jacob’s script only look for if it is mirrored about the Y axis? Where i looks like yours checks if it has been mirrored at all?

@mix I’d have to double check in a little while but I was just modifying the solution I had worked on yesterday by combining some of Jacob’s methods, and the results identified the bit of geometry that was causing the Geometry node to fail. Is the nested family “850content” necessary? Removing this will allow you to use the OOTB geometry node and disregard the mirroring altogether.

@jacob.small upon further inspection… my first test run. the condulet that I mirrored in the Project x/y plane seems to have come in upside down.

@mix I believe you are seeing the same thing that I encountered with that script. I removed the Geometry.Scale portion and replaced it with Geometry.Mirror

Here is the solution I came up with, which is a combination of what I posted yesterday and using the correct transform methods used by @jacob.small

This graph doesn’t require the elements to be tested beforehand for whether or not they are mirrored.

It appears to be working as expected now:

Correct Mirrored Geometries.dyn (8.6 KB)

1 Like

well it appeared to be working until I connected it back into my graph, and now all of my nurbs curves that were working so nicely seem to be corrupted some how. What is going on here. Can i fix this?

This is what they are supposed to look like:

Sorry I hadn’t realized you were trying to get nurbs curves :slightly_frowning_face: The OOTB Element.Geometry() does not produce nurbs curves and the geometry of the family type does not produce nurbs either. :face_with_raised_eyebrow: How were you getting the nurbs curves before? It appears to be coming from the Geometry.Scale method in Jacob’s script, however that method fails on my sample .rvt file which is simply what I showed in my screenshot above. Were you getting nurbs curves with the OOTB Element.Geometry node on the elements it worked on?

It might be best to just add a Geometry.Mirror node to Jacob’s solution if that was providing you nurbs curves like you need. Again, apologies for so much back and forth. It would probably have been better if I’d acquired the same sample file from you, but I’m also not inclined to think this is truly the best solution if it fails on the sample file I created on my end.

No, Jacobs script is getting 2 nurbs curves per condulet and I only want one. Besides that, the condulets have centerlines built into them that the Geometry node is reading. They are two straight lines. I use the geometry from those lines (start and endpoints) to generate one nurbs curve. Look at the dark green box above. It takes the 4 points and makes a nice curve out of it. However this feature ceases to work after your node and I dont understand why. but the familes have the geometry in them that I need. but cant seem to use it.

Okay I gotcha! It looks like the output geometry from my graph might just be reversed from the Element.Geometry output, perhaps the order of the lines and hence the points is what is causing it to fail. Try using List.Reverse @L2 before converting them to nurbs

Yes that works thanks so much!

1 Like

@mix - glad this worked out. Can you post the final solution (dyn or otherwise) so others can refer to it in the future. Thanks!

1 Like