i want to know if anyone can help me, i have a CATpart of a pipe, and the sketch of how it was made is not there, and i want to know if there is a way to transform the pipe into a center line. thankyou for your time and answers
Sure it's possible. Just use the command point/circle sphere center on the edges of the tube. Once you have those points, link them with lines (only the straight portions) as indicated in the attached image. After that, use the intersecion option from the generative shape design workbench to get the points on the elbows. Finally use the polyline command from the generative shape design workbench to link the corresponding points and that's pretty much it.
Thanks a lot for your help, now that I got the points, it drive me to my next question, is there any way to get the coordinates of each point into a TXT file?
I just solve the issue with the coordinates, but what I'm not able to do it to create the lines between each point, and how can I do it if I had elbows, thank you for your time
this is a section of the code i'm using, I'm new at this, so i'm trying to figured out how to get this, first I got the CATpart that is a pipe, with the code a count the edges on this pipe, get the points and their coordinates, but the thing I need it's to get the edges and create the center line, what I do manually is to select the the first edge of the pipe and the following with the spine tool in generative shape design, but I want to get that function in the macro and also get the coordinates of the lines. I hope you can help me, thank you.
'Dim oPartDoc As Part
On Error Resume Next
Set oPartDoc = CATIA.ActiveDocument.Part
If Err.Number <> 0 Then
Message = MsgBox("Sorry, This script works with a CATPart as Active document, so please open CATPart in a new window", vbCritical, "Error")
Exit Sub
End If
'Dim productDocument1 As ProductDocument
Set productDocument1 = CATIA.ActiveDocument
'Dim documents1 As Documents
Set documents1 = CATIA.Documents
'Dim partDocument1 As PartDocument
Set partDocument1 = documents1.Item(1)
Set oPart = CATIA.ActiveDocument.Part
'Dim objSel As Selection
Set objSel = CATIA.ActiveDocument.Selection
objSel.Search ("Type=Edge,Selection_BorderREdge")
objcount = objSel.Count
msgbox objCount
Well, a sample part? I don't have tubing/piping license now...
A pipe with part workbench can be created also with a power copy if you have the points and know the bend radius...I done such a tutorial and power copy, I believe you can find it now on different websites on Internet (see for example
well, the pipes, we are not allowed to upload that info, but, for example, create a pipline in part design, a circle, and a line and do the rib option, now from that part I have to create a macro that generate the center line, so what I am trying to find is a way to count all the adges, and set them as references for the spine, ref 1 and ref2 for one line and get their coordinate,
Well, I've been trying to do EXACTLY that, unfortunately in the best scenario you will get duplicated points since the macro will detect points for the outter and inner diameter (see my post: Remove duplicate point macro). ON other "not so kind" scenarios, the macro will recognize even the lines (tridimfeatedge) and that's a nightmare.
my plan is to get the edges, set them as references and draw the lines, with a macro, and i am new at this i don´t know much about the language, if there is any way or code that can help me with that a really apreciate. thank you for your time and all your help.
here is the thing, I don't have the exact design right now, I don't have tubing license, what I did, is create a pipe in part design, any pipe, then, edit the macro to identify the edges, and is what I have right now, the other thing is to get those edges in pairs to get them as references to do a spine, the tubing that I will be working on, its going to be a web, tubing everywhere, so I try to do something simple, and if it works, it will work for that to. I send you the pipe I am working with, and the part of the code, I hope you can help me with that, just get the center line in the pipe.