/// <summary> /// Constructs a mesh from a Brep. /// </summary> /// <param name="inBrep">The Brep.</param> /// <param name="bSmooth"> /// If true, a smooth mesh is returned. /// If false, then a coarse mesh is returned. /// </param> /// <returns>The mesh if successful.</returns> public RockfishGeometry CreateMeshFromBrep(RockfishGeometry inBrep, bool bSmooth) { if (null == inBrep?.Brep) { return(null); } if (IsValid) { try { var header = new RockfishHeader(ClientId); var result = m_channel.CreateMeshFromBrep(header, inBrep, bSmooth); return(result); } catch (Exception ex) { HandleException(ex); Dispose(); } } return(null); }
/// <summary> /// Intersects two Brep objects and returns the intersection curves /// </summary> /// <param name="inBrep0">The first Brep.</param> /// <param name="inBrep1">The second Brep.</param> /// <param name="tolerance">The intersection tolerance.</param> /// <returns>The intersection curves if successful.</returns> public RockfishGeometry[] IntersectBreps(RockfishGeometry inBrep0, RockfishGeometry inBrep1, double tolerance) { if (null == inBrep0?.Brep || null == inBrep1?.Brep) { return(null); } if (IsValid) { try { var header = new RockfishHeader(ClientId); var result = m_channel.IntersectBreps(header, inBrep0, inBrep1, tolerance); return(result); } catch (Exception ex) { HandleException(ex); Dispose(); } } return(new RockfishGeometry[0]); }