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
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
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
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