How to modify\edit the range box of a smart solid in microstation SS3

Hi

I have a Microstation V8 dgn file in which i have one smart solid. The range of the smart solid is very huge, (not sure why the user designed like that). Is there any way to edit the range box of the smart solid in the file?

Attaching the input file. If you select the smart solid in it, you can see a very huge 2022.Text.dgnrange box for it. 

  • Hi Bency,

    when asking in MicroStation Programming forum, to follow the forum best practices is recommended. Without sharing information about what language or API you prefer to use, it's more complicated to answer.

    The range of the smart solid is very huge

    I do not see any problem in the shared file. SmartSolid range is evidently correct, because the range is used when "fit all" tool is used. When an element's range is wrong, the element is not fitted, which is not the case of the discussed file.

    Is there any way to edit the range box of the smart solid in the file?

    It's not possible to modify the range directly, because it's maintained (calculated) by MicroStation.

    You can use fixrange tool (key-in: mdl load fixrange) to verify and fix ranges for all elements in design file. But as I wrote, I think it's not necessary in the discussed case.

    you can see a very huge range box for it. 

    I see correct range:

    By V8 format definition, the range is stored as integer value in UORs, so when e.g. SmartSolid lower left corner can be snapped at X = 266.8888 (which is not exactly the lowest X coordinate I guess), X min range 266889469 looks correct.

    Regards,

      Jan

  • In addition to Jan's comments, be aware that MicroStation calculates all geometric values using units-of-resolution (UORs).  Usually, a user does not see UORs, but they become visible occasionally — as you have observed, the range of an element is expressed in UORs.  UORs are converted to master/sub units when presented to the user.

    When writing an app for MicroStation...

    • VBA uses mostly master/sub units, so you don't need to convert between UORs
    • MDL and C++ (and C# in CONNECT) calculate everything in UORs, so you must convert when presenting geometric information to a user
    When you select the smart surface in the attached file, you can see a range in the form of blue dots over it

    I don't see blue dots.  I see what I expect to see, which is the element's bounding box.  I'm using MicroStation CONNECT Update 15...

    Bounding Box

    That box should disappear when you key-in SET RANGE and update the view.

     
    Regards, Jon Summers
    LA Solutions

  • Thank you Jan. 

    I am little new to the Microstation V8i. When you select the smart surface in the attached file, you can see a range in the form of blue dots over it. Not sure whether to call it as range or not in microstation terms. But since you said it is correct, what is the purpose of adding such a huge range (blue dots) for the smart surface in the file, i dont understand.. 

  • As mentioned by Jan and Jon, the range of this SmartSurface element is correct.

    The blue dots you are referring to are the modify handles shown for this element by the select tool. In this case, because it's a single face sheet body who's surface is a bspline, the blue dots represent the poles of the underlying un-trimmed surface.

    Since being able to change these is probably not that useful to you in this case, you might want to consider just turning modify handles off in the tool settings dialog.

    HTH

    -B



  • Hi All. 

    Thanks for your inputs. I have investigated it much more deeper and i found one issue. 

    We are using mdlElement_extractRange() to get the range of an element and then checking the range of each element whether it falls under the range of smart surface. So, here are the ranges 

    I opened the model in Microstation V8 SS3 and selected the smart surface and drop it. I found one Bspline surface in it. I copied the range of BSpline surface and the actual Smart Surface. They are not even close enough and hence in my code we are checking whether the range of smart element falls under the smart surface range (with some tolerance) then we are considering it as valid smart surface other wise we are ignoring. We did this because earlier we found some smart surfaces which are very far from the actual model and looks like distorted. 

    Do we have any other API which gets the proper range other than mdlElement_extractRange()???

    B-Spline Surface Range : 

    Range Low : 128457961, -19541295, 3000000

    Range High : 313841647, -39999, 28000089

    Smart Surface Range : 

    Range Low: 266889469, -19222129, 19999984

    Range High: 269339423, -18693798, 23354100

     

  • I have investigated it much more deeper

    I used MicroStation CONNECT Update 15 to analyze your SmartSolid and a B-Spline Surface created from a copy...

    SmartSurfaceB-Spline Surface

     
    Regards, Jon Summers
    LA Solutions

  • Still the Bspline suface range does not fall under the smart surface range.. That's wrong.. Right?

  • the Bspline suface range does not fall under the smart surface range

    The objects are not coincident — I copied the original SmartSurface and moved it before dropping to a B-Spline.

     
    Regards, Jon Summers
    LA Solutions

  • Hi Bency,

    Still the Bspline suface range does not fall under the smart surface range.. That's wrong.. Right?

    Based on Brien's explanation and analysis done by Jon, I also checked your dgn once more.

    I am not experienced too much with B-splines internal implementation in MicroStation, but I think that everything is correct, but your evaluation is based on invalid assumptions. Of course, I can be wrong completely ;-)

    I am not aware of official definition, but the range is usually explained as the smallest range (box or cube) of graphical element, stored in UORs (units of resolution). Because the range is stored as integers, the range is always bigger than element itself.

    A crucial question is: What is an element? Even when it looks like simple question, especially for anything based on b-splines is not so. B-spline consists from many different "sub elements" (because they are many types of b-splines). They can be extensive, e.g. pole, that is invisible, can lie very far from displayed curve. Should be such pole included in the range? Yes, for sure, it's part of element.

    And it's even more complicated, when B-spline surface is created. And next step to complexity is trimmed surface, which I think is the discussed case. When the surface is trimmed, only part of it is displayed, accordingly to defined B-spline Surface Boundary definition (visible in Analyze element dialog).

    Because of that, I think the range is correct: The surface created when the solid is dropped, requires control elements (knots, poles...) far from the visible part, so calculated range seems to be incorrect.

    Also, it's why I think you approach is not robust: It's not ensured that internal element will always have smaller range than external one. Because the range is not always based on visible geometry.

    Bspline suface range

    What you can try is to use something like mdlBspline_extractBoundary() function and to check the range of the received descriptor. Of course you can analyze B-spline Surface Boundary elements directly, but they are store in UV coordinates, not in the model system.

    With regards,

      Jan

  • Hi Bency,

    to understand how the surface is constructed and why the range is correct, see this image:

    Both the range (key-in set range toggle;update all) and control points (key-in dwg splframe 1) are displayed. The control points equals to handles discussed by Brien.

    It's clear that to create the surface, it's necessary to create bigger surface and to trim it. In your case, the result is non-uniform, non-ration, trimmed B-spline surface.

    Regards,

      Jan