Update 5 10.05 Builds

MicroStation CONNECT Update 5 10.05.00.XX Builds

In Update 5 we have moved to use the Visual Studio 2015 compiler throughout the MicroStation product line. It is advisable to recompile applications with this compiler when delivering applications with update 5

There are a number of functions and methods which have been deprecated in this release please see MicroStation CONNECT Update 5 Deprecated functions for the list of functions and their replacements

The following methods/functions have been added to this release of the SDK

Geometry

New data structure "CurveLocationDetailPair" which consists of a pair of CurveLocationDetail structs, as produced by curve-curve intersection code.

Constructors

CurveLocationDetailPair::CurveLocationDetailPair (ICurvePrimitiveCP curve, double fraction0, DPoint3dCR point0, size_t componentIndex, size_t numComponent, double componentFraction);

Methods

CurveLocationDetailPair::Set (double fraction0, DPoint3dCR point0, double a0, double fraction1, DPoint3dCR point1, double a1);

Select the method to be used to offset bspline curves in MSBsplineCurve::CreateCopyOffsetXY and ICurvePrimitive::CloneAsSingleOffsetPrimitiveXY.

1 – offset with fit points at offsets of the Greville knots. (Moving averages of (order-1) knots) This is appropriate (and strongly preferred) when the input curve is smooth.

0 – (and other) offset to multiple fit points within each bezier span. Use SetBCurfvePointsPerKnot () to control fit point counts. This method significantly increases number of knots. This may be more accurate for a single offset, but leads to overly dense curves if offset is repeated.

DoubleOps methods

Return the ith of n chebyshev points, cos(PI * (2i+1)/(2n)), starting at i=0

DoubleOps::ChebyshevPoint (size_t i, size_t n);

Test with tolerance for equality

DoubleOps::ClearlyIncreasing (double a, double b, double tol);

Return determinant

DoubleOps::DeterminantXYXY (double x0, double y0, double x1, double y1);

Test if x is between 0 and 1 inclusive, with AlmostEqualFraction at each end.

In DRay.h

Return a ray with origin interpolated between points. The ray direction is the point0 to point1 vector scaled by vectorScale

DRay3d DRay3d::FromIinterpolateWithScaledDifference (DPoint3dCR point0, double fraction, DPoint3dCR point1, double vectorScale);

In DVec3d.h

Returns a DVec3d from a 2d vector (with 0 z)

DVec3d DVec3d::From (DVec2dCR vector);

Get a unit length vector in X

DVec3d DVec3d::UnitX ( )

Get a unit length vector in Y

DVec3d DVec3d::UnitY ( )

Get a unit length vector in Z

DVec3d DVec3d::UnitZ ( )

Triangulate selected facets

bool PolyfaceHeader::Triangulate (size_t maxEdge, bool hideNewEdges, IPolyfaceVisitorFilter* filter);

Get the closest point on an edge to a given point.

bool SolidUtil::ClosestPointToEdge (Bentley::ISubEntityCR subEntity, Bentley::DPoint3dCR testPt, Bentley::DPoint3dR point, double& param);

Get the closest point on a face to a given point.

bool SolidUtil::ClosestPointToFace (Bentley::ISubEntityCR subEntity, Bentley::DPoint3dCR testPt, Bentley::DPoint3dR point, Bentley::DVec3dR normal, Bentley::DPoint2dR param);

Test if a point is inside or on the boundary of the given body.

bool SolidUtil::IsPointInsideBody (Bentley::ISolidKernelEntityCR entity, Bentley::DPoint3dCR testPt);

Draw geometry for the given face, edge, or vertex to the specified ViewContext.

BentleyStatus SolidUtil::Draw (Bentley::ISubEntityCR subEntity, Bentley::ViewContextR context);

Evaluate point and tangent at a u parameter on the curve of the given edge sub-entity.

BentleyStatus SolidUtil::EvaluateEdge (Bentley::ISubEntityCR subEntity, Bentley::DPoint3dR point, Bentley::DVec3dR uDir, double uParam);

Evaluate point, normal, and derivatives at a uv parameter on the surface of the given face sub-entity.

Evaluate point of the given vertex sub-entity.

BentleyStatus SolidUtil::EvaluateVertex (Bentley::ISubEntityCR subEntity, Bentley::DPoint3dR point);

Get u edge parameter range for the given edge sub-entity.

BentleyStatus SolidUtil::GetEdgeParameterRange (Bentley::ISubEntityCR subEntity, Bentley::DRange1dR uRange);

Get uv face parameter range for the given face sub-entity.

BentleyStatus SolidUtil::GetFaceParameterRange (Bentley::ISubEntityCR subEntity, Bentley::DRange1dR uRange, Bentley::DRange1dR vRange);

Get an axis aligned bounding box for the given body.

BentleyStatus SolidUtil::GetEntityRange (Bentley::DRange3dR range, Bentley::ISolidKernelEntityCR entity);

Get an axis aligned bounding box for the given face or edge.

BentleyStatus SolidUtil::GetSubEntityRange (Bentley::DRange3dR range, Bentley::ISubEntityCR subEntity);

Evaluate point and normal at center of face parameter range for the given face sub-entity.

BentleyStatus SolidUtil::GetPlanarFaceData (Bentley::DPoint3dP point, Bentley::DVec3dP normal, Bentley::ISubEntityCR subEntity);

Create an element to represent the given body.

Utility methods for help with debugging

Output topology information for the given body to the console window.

void SolidUtil::Debug::DumpEntity (Bentley::ISolidKernelEntityCR entity, Bentley::WCharCP label);

Output topology information for the given sub-entity to the console window.

void SolidUtil::Debug::DumpSubEntity (Bentley::ISubEntityCR subEntity, Bentley::WCharCP label);

Support for persistent topological ids on faces, edges, and vertices.

Assign new topology ids to faces of the given body. Resolves duplicate face ids such as from a face being split.

BentleyStatus SolidUtil::TopologyID::AddNodeIdAttributes (Bentley::ISolidKernelEntityR entity, UInt32 nodeId, bool overrideExisting);

Remove the topology ids from all faces of the given body.

BentleyStatus SolidUtil::TopologyID::DeleteNodeIdAttributes (Bentley::ISolidKernelEntityR entity);

Find the highest and lowest nodeId values from the topology ids currently assigned to the faces of the given body. Used to avoid nodeId conflicts between target and tool bodies.

BentleyStatus SolidUtil::TopologyID::FindNodeIdRange (Bentley::ISolidKernelEntityCR entity, UInt32& highestNodeId, UInt32& lowestNodeId);

Get the EdgeId currently assigned to a given edge sub-entity.

BentleyStatus SolidUtil::TopologyID::IdFromEdge (Bentley::EdgeId& edgeId, Bentley::ISubEntityCR subEntity, bool useHighestId);

Get the FaceId currently assigned to a given face sub-entity.

BentleyStatus SolidUtil::TopologyID::IdFromFace (Bentley::FaceId& faceId, Bentley::ISubEntityCR subEntity, bool useHighestId);

Get the VertexId currently assigned to a given vertex sub-entity.

BentleyStatus SolidUtil::TopologyID::IdFromVertex (Bentley::VertexId& vertexId, Bentley::ISubEntityCR subEntity, bool useHighestId);

Increment the topology ids for all faces of the given body. Used to avoid nodeId conflicts between target and tool bodies.

BentleyStatus SolidUtil::TopologyID::IncrementNodeIdAttributes (Bentley::ISolidKernelEntityR entity, Int32 increment);

GeoCoord

Permanently deletes the saved Geographic Coordinate System parameters saved in the model.

static StatusInt DgnGCS::DeleteFromModel (DgnModelRefP modelRef,bool primaryCoordSys);

Two factory methods that constructs an DgnGCS instance by attempting to locate the element that saves the geographic coordinate system parameters in the specified DgnModel, and creating the instance based on those parameters.

static DgnGCSP DgnGCS::FromModel (DgnModelRefP modelRef, bool primaryCoordSys);
static DgnGCSP DgnGCS::FromCache (DgnModelP cache, bool primaryCoordSys);

Reloads geographically transformed and geographically projected references, responding to GCS changes in modelRef.

Methods to Set or remove a coordinate system event handler.

static void DgnGCS::RemoveEventHandler (GeoCoordinateEventHandler* handler);
static void DgnGCS::SetEventHandler (IGeoCoordinateEventHandler* handler);

Writes the GCS parameters to the model.

StatusInt DgnGCS::ToModel (DgnModelRefP modelRef, bool primaryCoordSys, bool writeToFile, bool reprojectData, bool reportProblems);

Sets the Paper Scale for this GCS. The Paper Scale affects the Cartesian coordinates and makes measurements unreliable. Its use is not recommended. The default and recommended value is 1.0

StatusInt DgnGCS::SetPaperScale ( double paperScale, Bentley::DgnModelRefP modelRef);

DgnModel

Get the update sequence for this models references, this is a list of reference attachment element ids

Set the update sequence for this models references, this is a list of reference attachment element ids

Set the update sequence for this models references

GuiTreeNode

Returns the ancestor GuiTreeNode at a certain level up from a specified child GuiTreeNode

mdlTreeNode_getAncestorAtLevel ( Bentley::GuiTreeNodeCP pNode, int level )

BeFileName

Move an existing file or an existing directory to Recycle Bin

BeFileName::MoveToRecycleBin ( WCharCP path )

Strip all separators at the end of a string

BeFileName::StripSeparatorAtEnd ( WStringR dir )

Strip all separators at the end of a string

BeFileName::StripSeparatorAtEnd ( )