Package org.robwork.sdurw_geometry
Class BREPCPtr
- java.lang.Object
-
- org.robwork.sdurw_geometry.BREPCPtr
-
public class BREPCPtr extends java.lang.Object
Ptr stores a pointer and optionally takes ownership of the value.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description BREP
__ref__()
Dereferencing operator.BREPPtr
clone()
Make a deep copy of the BREP.void
delete()
BREP
deref()
The pointer stored in the object.long
edgeCount()
The number of edges.OBB
edgeOBR(long edge)
Create Oriented Bounding Rectangle for an edge.boolean
equals(BREP p)
long
faceCount()
The number of faces.
The number of faces is the number of loops, where a surface has been attached.
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.
SWIGTYPE_p_rw__core__PtrT_rw__geometry__BREP__CommonCurveSet_const_t
getCommonCurves(SWIGTYPE_p_std__setT_unsigned_long_t faces)
Get a set of common curves between a set of faces.static long
getCPtr(BREPCPtr obj)
Curve
getCurve(long curveIndex)
Get curve.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.
BREP
getDeref()
Member access operator.Surface
getSurface(long surfaceIndex)
Get surface.GeometryData.GeometryType
getType()
Vector3D
getVertex(long vertexIndex)
Get vertex.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.
boolean
isNull()
checks if the pointer is nullboolean
isShared()
check if this Ptr has shared ownership or none
ownershiplong
loopCount()
The number of loops.ShellCPtr
shellProxy()
Get a Shell representation as a proxy to the BREP.long
verticeCount()
The number of vertices.
-
-
-
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
-
getType
public GeometryData.GeometryType getType()
-
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.
-
getCommonCurves
public SWIGTYPE_p_rw__core__PtrT_rw__geometry__BREP__CommonCurveSet_const_t getCommonCurves(SWIGTYPE_p_std__setT_unsigned_long_t faces)
Get a set of common curves between a set of faces.- Parameters:
faces
- [in] loop indexes for the faces to consider.- Returns:
- set of common curves as a CommonCurveSet.
-
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.
-
-