OCC.Core.IntRes2d module¶
IntRes2d module, see official documentation at https://www.opencascade.com/doc/occt-7.4.0/refman/html/package_intres2d.html
-
class
IntRes2d_Domain
(*args)¶ Bases:
object
- Creates an infinite Domain (HasFirstPoint = False and HasLastPoint = False).
- rtype
None* Creates a bounded Domain.
- param Pnt1
- type Pnt1
gp_Pnt2d
- param Par1
- type Par1
float
- param Tol1
- type Tol1
float
- param Pnt2
- type Pnt2
gp_Pnt2d
- param Par2
- type Par2
float
- param Tol2
- type Tol2
float
- rtype
None* Creates a semi-infinite Domain. If First is set to True, the given point is the first point of the domain, otherwise it is the last point.
- param Pnt
- type Pnt
gp_Pnt2d
- param Par
- type Par
float
- param Tol
- type Tol
float
- param First
- type First
bool
- rtype
None
-
EquivalentParameters
()¶ - Returns Equivalent parameters if the domain is closed. Otherwise, the exception DomainError is raised.
- param zero
- type zero
float
- param zeroplusperiod
- type zeroplusperiod
float
- rtype
None
-
FirstParameter
()¶ - Returns the parameter of the first point of the domain The exception DomainError is raised if HasFirstPoint returns False.
- rtype
float
-
FirstPoint
()¶ - Returns the first point of the domain. The exception DomainError is raised if HasFirstPoint returns False.
- rtype
gp_Pnt2d
-
FirstTolerance
()¶ - Returns the tolerance of the first (left) bound. The exception DomainError is raised if HasFirstPoint returns False.
- rtype
float
-
HasFirstPoint
()¶ - Returns True if the domain has a first point, i-e a point defining the lowest admitted parameter on the curve.
- rtype
bool
-
HasLastPoint
()¶ - Returns True if the domain has a last point, i-e a point defining the highest admitted parameter on the curve.
- rtype
bool
-
IsClosed
()¶ - Returns True if the domain is closed.
- rtype
bool
-
LastParameter
()¶ - Returns the parameter of the last point of the domain. The exception DomainError is raised if HasLastPoint returns False.
- rtype
float
-
LastPoint
()¶ - Returns the last point of the domain. The exception DomainError is raised if HasLastPoint returns False.
- rtype
gp_Pnt2d
-
LastTolerance
()¶ - Returns the tolerance of the last (right) bound. The exception DomainError is raised if HasLastPoint returns False.
- rtype
float
-
SetEquivalentParameters
()¶ - Defines a closed domain.
- param zero
- type zero
float
- param period
- type period
float
- rtype
None
-
SetValues
()¶ - Sets the values for a bounded domain.
- param Pnt1
- type Pnt1
gp_Pnt2d
- param Par1
- type Par1
float
- param Tol1
- type Tol1
float
- param Pnt2
- type Pnt2
gp_Pnt2d
- param Par2
- type Par2
float
- param Tol2
- type Tol2
float
- rtype
None* Sets the values for an infinite domain.
- rtype
None* Sets the values for a semi-infinite domain.
- param Pnt
- type Pnt
gp_Pnt2d
- param Par
- type Par
float
- param Tol
- type Tol
float
- param First
- type First
bool
- rtype
None
-
property
thisown
¶ The membership flag
-
class
IntRes2d_Intersection
(*args, **kwargs)¶ Bases:
object
-
IsDone
()¶ - returns True when the computation was successful.
- rtype
bool
-
IsEmpty
()¶ - Returns True if there is no intersection between the given arguments. The exception NotDone is raised if IsDone returns False.
- rtype
bool
-
NbPoints
()¶ - This function returns the number of intersection points between the 2 curves. The exception NotDone is raised if IsDone returns False.
- rtype
int
-
NbSegments
()¶ - This function returns the number of intersection segments between the two curves. The exception NotDone is raised if IsDone returns False.
- rtype
int
-
Point
()¶ - This function returns the intersection point of range N; The exception NotDone is raised if IsDone returns False. The exception OutOfRange is raised if (N <= 0) or (N > NbPoints).
- param N
- type N
int
- rtype
IntRes2d_IntersectionPoint
-
Segment
()¶ - This function returns the intersection segment of range N; The exception NotDone is raised if IsDone returns False. The exception OutOfRange is raised if (N <= 0) or (N > NbPoints).
- param N
- type N
int
- rtype
IntRes2d_IntersectionSegment
-
SetReversedParameters
()¶ - Parameters
Reverseflag –
- type Reverseflag
bool
- rtype
None
-
property
thisown
¶ The membership flag
-
-
class
IntRes2d_IntersectionPoint
(*args)¶ Bases:
object
- Empty constructor.
- rtype
None* Creates an IntersectionPoint. if ReversedFlag is False, the parameter Uc1(resp. Uc2) and the Transition Trans1 (resp. Trans2) refer to the first curve (resp. second curve) otherwise Uc1 and Trans1 (resp. Uc2 and Trans2) refer to the second curve (resp. the first curve).
- param P
- type P
gp_Pnt2d
- param Uc1
- type Uc1
float
- param Uc2
- type Uc2
float
- param Trans1
- type Trans1
IntRes2d_Transition
- param Trans2
- type Trans2
IntRes2d_Transition
- param ReversedFlag
- type ReversedFlag
bool
- rtype
None
-
ParamOnFirst
()¶ - Returns the parameter on the first curve.
- rtype
float
-
ParamOnSecond
()¶ - Returns the parameter on the second curve.
- rtype
float
-
SetValues
()¶ - Sets the values for an existing intersection point. The meaning of the parameters are the same as for the Create.
- param P
- type P
gp_Pnt2d
- param Uc1
- type Uc1
float
- param Uc2
- type Uc2
float
- param Trans1
- type Trans1
IntRes2d_Transition
- param Trans2
- type Trans2
IntRes2d_Transition
- param ReversedFlag
- type ReversedFlag
bool
- rtype
None
-
TransitionOfFirst
()¶ - Returns the transition of the 1st curve compared to the 2nd one.
- rtype
IntRes2d_Transition
-
TransitionOfSecond
()¶ - returns the transition of the 2nd curve compared to the 1st one.
- rtype
IntRes2d_Transition
-
Value
()¶ - Returns the value of the coordinates of the intersection point in the 2D space.
- rtype
gp_Pnt2d
-
property
thisown
¶ The membership flag
-
class
IntRes2d_IntersectionSegment
(*args)¶ Bases:
object
- Empty constructor.
- rtype
None:param P1:
- type P1
IntRes2d_IntersectionPoint
- param P2
- type P2
IntRes2d_IntersectionPoint
- param Oppos
- type Oppos
bool
- param ReverseFlag
- type ReverseFlag
bool
- rtype
None:param P:
- type P
IntRes2d_IntersectionPoint
- param First
- type First
bool
- param Oppos
- type Oppos
bool
- param ReverseFlag
- type ReverseFlag
bool
- rtype
None* Creates an infinite segment of intersection.
- param Oppos
- type Oppos
bool
- rtype
None
-
FirstPoint
()¶ - Returns the first point of the segment as an IntersectionPoint (with a transition). The exception DomainError is raised if HasFirstPoint returns False.
- rtype
IntRes2d_IntersectionPoint
-
HasFirstPoint
()¶ - Returns True if the segment is limited by a first point. This point defines the lowest parameter admitted on the first curve for the segment. If IsOpposite returns False, it defines the lowest parameter on the second curve, otherwise, it is the highest parameter on the second curve.
- rtype
bool
-
HasLastPoint
()¶ - Returns True if the segment is limited by a last point. This point defines the highest parameter admitted on the first curve for the segment. If IsOpposite returns False, it defines the highest parameter on the second curve, otherwise, it is the lowest parameter on the second curve.
- rtype
bool
-
IsOpposite
()¶ - Returns False if the intersection segment has got the same orientation on both curves.
- rtype
bool
-
LastPoint
()¶ - Returns the last point of the segment as an IntersectionPoint (with a transition). The exception DomainError is raised if HasLastExtremity returns False.
- rtype
IntRes2d_IntersectionPoint
-
property
thisown
¶ The membership flag
-
class
IntRes2d_SequenceOfIntersectionPoint
(*args)¶ Bases:
object
-
Append
()¶
-
Assign
()¶
-
ChangeFirst
()¶
-
ChangeLast
()¶
-
ChangeValue
()¶
-
Clear
()¶
-
Exchange
()¶
-
First
()¶
-
InsertAfter
()¶
-
InsertBefore
()¶
-
IsEmpty
()¶
-
Last
()¶
-
Length
()¶
-
Lower
()¶
-
Prepend
()¶
-
Remove
()¶
-
Reverse
()¶
-
Set
()¶
-
SetValue
()¶
-
Size
()¶
-
Split
()¶
-
Upper
()¶
-
Value
()¶
-
begin
()¶
-
cbegin
()¶
-
cend
()¶
-
static
delNode
()¶
-
end
()¶
-
property
thisown
¶ The membership flag
-
-
class
IntRes2d_SequenceOfIntersectionSegment
(*args)¶ Bases:
object
-
Append
()¶
-
Assign
()¶
-
ChangeFirst
()¶
-
ChangeLast
()¶
-
ChangeValue
()¶
-
Clear
()¶
-
Exchange
()¶
-
First
()¶
-
InsertAfter
()¶
-
InsertBefore
()¶
-
IsEmpty
()¶
-
Last
()¶
-
Length
()¶
-
Lower
()¶
-
Prepend
()¶
-
Remove
()¶
-
Reverse
()¶
-
Set
()¶
-
SetValue
()¶
-
Size
()¶
-
Split
()¶
-
Upper
()¶
-
Value
()¶
-
begin
()¶
-
cbegin
()¶
-
cend
()¶
-
static
delNode
()¶
-
end
()¶
-
property
thisown
¶ The membership flag
-
-
class
IntRes2d_Transition
(*args)¶ Bases:
object
- Empty constructor.
- rtype
None* Creates an IN or OUT transition.
- param Tangent
- type Tangent
bool
- param Pos
- type Pos
IntRes2d_Position
- param Type
- type Type
IntRes2d_TypeTrans
- rtype
None* Creates a TOUCH transition.
- param Tangent
- type Tangent
bool
- param Pos
- type Pos
IntRes2d_Position
- param Situ
- type Situ
IntRes2d_Situation
- param Oppos
- type Oppos
bool
- rtype
None* Creates an UNDECIDED transition.
- param Pos
- type Pos
IntRes2d_Position
- rtype
None
-
IsOpposite
()¶ - returns a significant value if TransitionType returns TOUCH. In this case, the function returns true when the 2 curves locally define two different parts of the space. If TransitionType returns IN or OUT or UNDECIDED, the exception DomainError is raised.
- rtype
bool
-
IsTangent
()¶ - Returns True when the 2 curves are tangent at the intersection point. Theexception DomainError is raised if the type of transition is UNDECIDED.
- rtype
bool
-
PositionOnCurve
()¶ - Indicates if the intersection is at the beginning (IntRes2d_Head), at the end (IntRes2d_End), or in the middle (IntRes2d_Middle) of the curve.
- rtype
IntRes2d_Position
-
SetPosition
()¶ - Sets the value of the position.
- param Pos
- type Pos
IntRes2d_Position
- rtype
None
-
SetValue
()¶ - Sets the values of an IN or OUT transition.
- param Tangent
- type Tangent
bool
- param Pos
- type Pos
IntRes2d_Position
- param Type
- type Type
IntRes2d_TypeTrans
- rtype
None* Sets the values of a TOUCH transition.
- param Tangent
- type Tangent
bool
- param Pos
- type Pos
IntRes2d_Position
- param Situ
- type Situ
IntRes2d_Situation
- param Oppos
- type Oppos
bool
- rtype
None* Sets the values of an UNDECIDED transition.
- param Pos
- type Pos
IntRes2d_Position
- rtype
None
-
Situation
()¶ - returns a significant value if TransitionType returns TOUCH. In this case, the function returnsINSIDE when the curve remains inside the other one, OUTSIDE when it remains outside the other one, UNKNOWN when the calculus, based on the second derivatives cannot give the result. If TransitionType returns IN or OUT or UNDECIDED, the exception DomainError is raised.
- rtype
IntRes2d_Situation
-
TransitionType
()¶ - Returns the type of transition at the intersection. It may be IN or OUT or TOUCH, or UNDECIDED if the two first derivatives are not enough to give the tangent to one of the two curves.
- rtype
IntRes2d_TypeTrans
-
property
thisown
¶ The membership flag