Boolean Union of Solids - error in MicroStation Connect Edition SDK

I have attached 2 MicroStation Connect Edition files represention a double curved bridge deck defined in our IBDAS model by BOXES, each BOX defined by 6 box sides each represented by NURBS-surface:

1. SmartSolid.dgn : each box represented by a SmartSolid.

2. SmartSolidApiUnite.dgn: each box represented by a SmartSolid. Boolean Union in SDK are used to union all boxes. Boxes are added to unions one by one and in case a box cannot be added to any existing union
a new union is introduced. It is very easy to see that the SDK dosent work. Same of the boxes disappear - Why? The SDK operations does not reflect error conditions.

You can try to simulate the SDK process just by interactively do the same operations (Unite) in MicroStation Connect Edition using SmartSolid.dgn.SmartSolidApiUnite.dgnSmartSolid.dgn

You can try to simulate the SDK process just by interactively do the same operations (Unite) in MicroStation Connect Edition using SmartSolid.dgn.SmartSolidApiUnite.dgnSmartSolid.dgn

BR

Peder

Parents
  • Hi Jan,

    Sorry, we are using:

    MicroStation Connect Edition ver. 10.110036

    and

    MicroStation Connect Edition SDK ver. 10.130048

    It seems like we are using an old version of MicroStation Connect Edition – and that is maybe the reason why we cant interactively unite the boxes – we have to update.

    How do we set  parameter Merge parametric solid = off  in the SDK  BooleanUnion?

    I have listed our code below.

    Thanks for helping us!

    BR,

    Peder
     

    Selected code lines: 

    //       sew sheets together as smart solid
             bvector<ISolidKernelEntityPtr> sewn;
             bvector
    <ISolidKernelEntityPtr> unsewn;

             succes
    = SolidUtil::Modify::SewBodies (sewn, unsewn, &tool.front(), tool.size (), 2.5e1,10);
                 x
    =succes;
                
    DUMPV8("solid2",&x,6);
                 x
    =sewn.size();
                
    DUMPV8("sewn.size",&x,9);
             

             
    if (succes==0)   // get element descriptor for smartsolid
               {
                x
    =jfirst;
               
    DUMPV8("jfirst",&x,5);
               
    if (jlast-jfirst > 0 )
                   {
                   
    if (j == jfirst) uniontarget.push_back(sewn.front());
                   
    if (j==jfirst) surfdegene[j*6+1]=-10;
                   
    if (j > jfirst) uniontool.push_back(sewn.front());
                  
    DUMPV8("solid3",&x,6);
                    
    if (j == jfirst) kunion++;
                   
    if (j > jfirst)
                    {
                     succes
    =SolidUtil::Modify::BooleanUnion (uniontarget.front(), &uniontool.front (), uniontool.size ());
                     x
    =succes;
                    
    DUMPV8("solid4",&x,6);

                    
    if (succes==0) surfdegene[j*6+1]=-10;
                    
    if (succes == 0) kunion++;
                    
    if (succes!=0) jlastnew=j;
                    
    if (succes==0) kadd++;

                    } 
                   }                     
                 
    else
                  {
                    uniontarget.
    push_back(sewn.front());
                    kunion
    ++;
                  }

     

  • Hi Peder,

    Sorry, we are using:

    thanks for providing the details :-)

    Accordingly to the best practices, may I ask you to:

    • Change the topic subject to recommended format [MStn CE U13 C++] ...
    • Edit the last post and to use Insert > Insert code (plus set language to C++) to share your code snippet?

    MicroStation Connect Edition ver. 10.110036

    and

    MicroStation Connect Edition SDK ver. 10.130048

    Opps ... are aware how big fault it is, especially when you develop native code application?

    One from the most important rule in MicroStation C++ development is to use the same version of MicroStation and MicroStation SDK!

    How do we set  parameter Merge parametric solid = off  in the SDK  BooleanUnion?

    I have no idea :-(

    I guess somebody from Bentley (?) can provide further details...

    With regards,

      Jan

Reply Children
No Data