Tool to create centerlines piperuns

Hi. Are there any tool inside Microstation CE that can automaticly creat centerlines for existing cylinders and bends? Idealy for large selection sets, and for different types of cylinders/bends object types.

Regards

Helge

  • Thank you for the information Jan. Its good to know it can be done, but as you said might require more effort to get the torus part working.
    Regards
    Helge
  • Hi helgeh,

    Unknown said:
    would IT be possible to create someting that van extract centerlines from plain cylinder and toruses that are connected together ( such AS a pipe run etc)

    Without studying former discussion, if talking about mentioned cylinder and torus, it would be possible. The main issue, that defines how complex such utility would be and if VBA can be used or C/C++ is required, is what element types are used to create pipes.

    E.g. for the cylinder the code is quite simple, because all required data are available through VBA API:

    ' Go through active model and create centerlines of all cones
    Public Sub CreateCenterlinesFromCones()
        Dim esc As New ElementScanCriteria
        esc.ExcludeAllTypes
        esc.IncludeType msdElementTypeCone
        
        Dim ee As ElementEnumerator
        Set ee = ActiveModelReference.Scan(esc)
        
        ProcessElementEnumerator ee
    End Sub
    
    Private Sub ProcessElementEnumerator(ee As ElementEnumerator)
        Do While ee.MoveNext
            ExtractCenterlineFromCone ee.Current.AsConeElement
        Loop
    End Sub
    
    Private Sub ExtractCenterlineFromCone(cone As ConeElement)
        Dim vertices(1 To 2) As Point3d
        vertices(1) = cone.BaseCenterPoint
        vertices(2) = cone.TopCenterPoint
        
        Dim centerline As LineElement
        Set centerline = CreateLineElement1(Nothing, vertices)
        
        ActiveModelReference.AddElement centerline
    End Sub
    

    But for the torus, which for a user is quite similar object, the situation is very different, because the torus is not "torus object", but general solid. It's necessary to go inside the object, to find a proper geometry and to analyse how the centerline should be. Without any testing I assume it can still done using VBA, but the code will be more complex.

    The same analysis has to be done for every object (solid, smart solid etc.) that will be used to create the pipe.

    With regards,

      Jan

  • Hi. If we forget about mesh primitives, would IT be possible to create someting that van extract centerlines from plain cylinder and toruses that are connected together ( such AS a pipe run etc)
  • Hi Jon,

    helgeh
    Does that mean its not possible to extract anything from this dgn file

    All I can find in your file are shapes. Each pipe, for example, is made up of multiple unconnected shapes that form a facsimile of a pipe.

    helgeh
    Yes, this is after i did this, as suggested by Pascal: 1) Drop mesh elements to shapes using the "Drop Element" tool.



    helgeh
    What is the requirements for the pipe extraction tool to work

    I can't see any points. Perhaps Descartes can see more than I with plain old MicroStation.

    helgeh
    I was not aloved to attache the POD file for some reason, so i attaced the txt file wich can be used to create a POD file. See point 6) in Pascals suggestion list.


    helgeh
    Would i need some points also between the 2 ends of a single cylinder?

    The problem is that they are not cylinders: just a collection of shapes that look like a cylinder.

    Okay. My remaining unanswered question was if there are any way to extract enough points to make this work. Im guessing i also would need points wraped around the surfaces with some minimum density ( to make it look like a pointcloud of a pipe ) to make this pipe extraction tool in descartes work.

    Regards
    Helge
  • Unknown said:
    Does that mean its not possible to extract anything from this dgn file

    All I can find in your file are shapes.  Each pipe, for example, is made up of multiple unconnected shapes that form a facsimile of a pipe.

    Unknown said:
    What is the requirements for the pipe extraction tool to work

    I can't see any points.  Perhaps Descartes can see more than I with plain old MicroStation.

    Unknown said:
    Would i need some points also between the 2 ends of a single cylinder?

    The problem is that they are not cylinders: just a collection of shapes that look like a cylinder.

     
    Regards, Jon Summers
    LA Solutions