Onion - new package

Hi @maciek.glowka
Great, I will test it and I Will give you a feedback !
cheers

1 Like

Hi,
should be possible by making a copy and adjusting top level / base level…I will take a look - just have to figure out how to specified desired split level.

@paris - thanks :slight_smile: let me know!

Hello @maciek.glowka ,

Would the walls not loose their connection with other walls when you copy them?

I have to check. Walls tend to join automatically, so maybe after adjusting heights the connections would appear.
For sure all the annotations on one of the walls (copy) would disappear.

1 Like

The annotations are the least of my worries :slight_smile: Thank you for looking in to it, I am curious to see the result!

1 Like

Hi @maciek.glowka I still have some issues with the node for spit on multiple points, I will send you an example, maybe you can look this post with recursive function for modify your node on python…thanks, cheers

1 Like

Maybe can I create a new topic for split pipes and ducts at multiple points with python lambda function?
Cheers

Hi!

can you send a sample RVT that is causing problems?
The node should split pipes in multiple points - it adds split fragments back to the list. I have did some tests and it seemed working, but probably not in all cases then…

Hi @maciek.glowka sure, here we go

Can you send me your e-mail for the file? I can’t upload it

Maybe @c.poupin can help us with python?

hi, i have tried by using c# node so far and it seems to be working on those pipes…I will do some more testing and check the Python as well.
But…I have had some weird splitpoints on the diagonal pipes…did you have also problem with that? I think I also have to check that now :slight_smile:

Hi @maciek.glowka, yes you are right, I have same issues…thanks for yours effort. Cheers

Hi @maciek.glowka,
Do you have any news of the python for split pipes and duct with lambda function method like the post below?

Thank you very much for your efforts
Cheers

Hi @paris,

I am sorry but I didn’t have time recently to either look into c# or python code.
I will publish some info here if I manage (hopefully not too far in the future)

Hi @maciek.glowka,
Ok, thanks for your efforts.
I’ll create a new topic in the future for split pipes and ducts at multiple points with python lambda function
Cheers

1 Like

hi @paris!

I have managed finally to take a look at this, sorry it took that long. I have fixed the wrong intersection points for the diagonal pipes.
The new package version is pushed to the package manager.
If you want to take look at the code:

Do you still need the Python code as well?

  1. Another fixed thing - I have added tolerance parameter to AutoJoin, as I had some comments that it is not always working for touching elements (I guess it is precission issue).

Hi @maciek.glowka

Great, it’ a very good news !!! I’ll try, the new version of your package is available from the package manager ?
Yes, I still need the python, it’s very hard to made a custom node in python for splitting multiple pipes and ducts at multiple points …
Thank you very much.
Cheers

yes @paris it is available in the package manager.

I have tried to translate the splitting node into python and it seems to be working - it uses breakCurve method so it works now for pipes and ducts only.
It can split multiple elements at multiple points. The input is two lists one for elements and one for points. Always in pairs. So if you have three points for the same element you have to input the element three times (indexes for point/elment pair have to match)

import clr

clr.AddReference("RevitAPI")
import Autodesk
from Autodesk.Revit.DB import *

clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.GeometryConversion)

doc = DocumentManager.Instance.CurrentDBDocument


elements = UnwrapElement(IN[0])
points = UnwrapElement(IN[1])


output = []
children = {}

TransactionManager.Instance.EnsureInTransaction(doc)

for e, p in zip(elements,points):
	to_check = [e]
	if e.Id in children:
		to_check.extend(children[e.Id])
		
	for ec in to_check:
		splitId = None
		if isinstance(ec,Autodesk.Revit.DB.Plumbing.Pipe):
			try:
				splitId = Autodesk.Revit.DB.Plumbing.PlumbingUtils.BreakCurve(doc, ec.Id, p.ToXyz())
			except:
				pass				
		elif isinstance(ec,Autodesk.Revit.DB.Mechanical.Duct):
			try:
				splitId = Autodesk.Revit.DB.Mechanical.MechanicalUtils.BreakCurve(doc, ec.Id, p.ToXyz())
			except:
				pass
			
		if splitId:
			split = doc.GetElement(splitId)
			if e.Id in children:
				children[e.Id].append(split)
			else:
				children[e.Id] = [split]
			output.append([ec,split])
		else:
			output.append(None)
			

TransactionManager.Instance.TransactionTaskDone()
			

OUT = output

Hi @maciek.glowka
Great! thank you very much for your effort, I’ll test it and I’ll give you a feedback.
Cheers

1 Like