Class BREPCPtr


  • public class BREPCPtr
    extends java.lang.Object
    Ptr stores a pointer and optionally takes ownership of the value.
    • Constructor Detail

      • BREPCPtr

        public BREPCPtr​(long cPtr,
                        boolean cMemoryOwn)
      • BREPCPtr

        public BREPCPtr()
        Default constructor yielding a NULL-pointer.
      • BREPCPtr

        public BREPCPtr​(BREP ptr)
        Do not take ownership of ptr.

        ptr can be null.

        The constructor is implicit on purpose.
    • Method Detail

      • getCPtr

        public static long getCPtr​(BREPCPtr obj)
      • delete

        public void delete()
      • deref

        public BREP deref()
        The pointer stored in the object.
      • __ref__

        public BREP __ref__()
        Dereferencing operator.
      • getDeref

        public BREP getDeref()
        Member access operator.
      • equals

        public boolean equals​(BREP p)
      • isShared

        public boolean isShared()
        check if this Ptr has shared ownership or none
        ownership
        Returns:
        true if Ptr has shared ownership, false if it has no ownership.
      • isNull

        public boolean isNull()
        checks if the pointer is null
        Returns:
        Returns true if the pointer is null
      • getSurface

        public Surface getSurface​(long surfaceIndex)
        Get surface.
        Parameters:
        surfaceIndex - [in] the index of the surface. Should be less than the number
        returned by size().
        Returns:
        a reference to the surface.
      • getCurve

        public Curve getCurve​(long curveIndex)
        Get curve.
        Parameters:
        curveIndex - [in] index of the curve. Should be less than the number returned by
        edgeCount().
        Returns:
        a reference to the curve.
      • clone

        public BREPPtr clone()
        Make a deep copy of the BREP.
        Returns:
        a copy of the BREP.
      • shellProxy

        public ShellCPtr shellProxy()
        Get a Shell representation as a proxy to the BREP.
        Returns:
        smart pointer to a Shell proxy object.
      • getCurves

        public SWIGTYPE_p_std__vectorT_rw__core__PtrT_rw__geometry__Curve_t_t getCurves​(long loopIdx)
        Get the curves in a given loop.

        The curves will be traversed in an ordered way, and curves will have a direction that
        leads to the next curve.

        Parameters:
        loopIdx - [in] the loop index.
        Returns:
        an ordered vector of curves.
      • faceCount

        public long faceCount()
        The number of faces.

        The number of faces is the number of loops, where a surface has been attached.

        Returns:
        the number of faces.
      • loopCount

        public long loopCount()
        The number of loops.
        Returns:
        the number of loops.
      • edgeCount

        public long edgeCount()
        The number of edges.
        Returns:
        the number of edges.
      • verticeCount

        public long verticeCount()
        The number of vertices.
        Returns:
        the number of vertices.
      • getVertex

        public Vector3D getVertex​(long vertexIndex)
        Get vertex.
        Parameters:
        vertexIndex - [in] index of the vertex. Should be less than the number returned by
        vertices().
        Returns:
        reference to the vertex.
      • getVertices

        public SWIGTYPE_p_std__vectorT_rw__math__Vector3DT_double_t_t getVertices​(long loopIdx)
        Get the vertices in a given loop.

        The curves will be traversed in an ordered way around the loop.

        Parameters:
        loopIdx - [in] the loop index.
        Returns:
        a collection of vertices.
      • edgeOBR

        public OBB edgeOBR​(long edge)
        Create Oriented Bounding Rectangle for an edge.
        Parameters:
        edge - [in] the edge index, which should be less than edgeCount().
        Returns:
        OBB for the given edge (with third half-length set to zero).
      • faceExtremums

        public pair_d_d faceExtremums​(long faceIndex,
                                      Vector3D dir)
        Find the extent of the surface along a specific direction.

        If the surface has no lower bound, the value -%std::numeric_limits<double>::%max() can
        be returned to indicate that the surface has unbounded minimum value in the given
        direction.

        If the surface has no upper bound, the value %std::numeric_limits<double>::%max() can
        be returned to indicate that the surface has unbounded maximum value in the given
        direction.

        Parameters:
        faceIndex - [in] the face index, which should be less than loopCount().
        dir - [in] a normalized direction vector.
        Returns:
        the minimum and maximum values along the given direction.