OCC.Core.ShapeConstruct module¶
ShapeConstruct module, see official documentation at https://www.opencascade.com/doc/occt-7.4.0/refman/html/package_shapeconstruct.html
-
class
ShapeConstruct_Curve
¶ Bases:
object
-
AdjustCurve
()¶ - Modifies a curve in order to make its bounds confused with given points. Works only on lines and B-Splines, returns True in this case, else returns False. For line considers both bounding points, for B-Splines only specified. //! WarningDoes not check if curve should be reversed
- param C3D
- type C3D
Geom_Curve
- param P1
- type P1
gp_Pnt
- param P2
- type P2
gp_Pnt
- param take1
default value is Standard_True
- type take1
bool
- param take2
default value is Standard_True
- type take2
bool
- rtype
bool
-
AdjustCurve2d
()¶ - Modifies a curve in order to make its bounds confused with given points. Works only on lines and B-Splines, returns True in this case, else returns False. //! For line considers both bounding points, for B-Splines only specified. //! WarningDoes not check if curve should be reversed
- param C2D
- type C2D
Geom2d_Curve
- param P1
- type P1
gp_Pnt2d
- param P2
- type P2
gp_Pnt2d
- param take1
default value is Standard_True
- type take1
bool
- param take2
default value is Standard_True
- type take2
bool
- rtype
bool
-
AdjustCurveSegment
()¶ - Modifies a curve in order to make its bounds confused with given points. Works only on lines and B-Splines. //! For lines works as previous method, B-Splines are segmented at the given values and then are adjusted to the points.
- param C3D
- type C3D
Geom_Curve
- param P1
- type P1
gp_Pnt
- param P2
- type P2
gp_Pnt
- param U1
- type U1
float
- param U2
- type U2
float
- rtype
bool
-
ConvertToBSpline
()¶ - Converts a curve of any type (only part from first to last) to bspline. The method of conversion depends on the type of original curve: BSpline -> C.Segment(first,last) Bezier and Line -> GeomConvert::CurveToBSplineCurve(C).Segment(first,last) Conic and Other -> Approx_Curve3d(C[first,last],prec,C1,9,1000)
- param C
- type C
Geom_Curve
- param first
- type first
float
- param last
- type last
float
- param prec
- type prec
float
- rtype
opencascade::handle<Geom_BSplineCurve>* Converts a curve of any type (only part from first to last) to bspline. The method of conversion depends on the type of original curve: BSpline -> C.Segment(first,last) Bezier and Line -> GeomConvert::CurveToBSplineCurve(C).Segment(first,last) Conic and Other -> Approx_Curve2d(C[first,last],prec,C1,9,1000)
- param C
- type C
Geom2d_Curve
- param first
- type first
float
- param last
- type last
float
- param prec
- type prec
float
- rtype
opencascade::handle<Geom2d_BSplineCurve>
-
static
FixKnots
()¶ - Parameters
knots –
- type knots
TColStd_HArray1OfReal
- rtype
bool* Fix bspline knots to ensure that there is enough gap between neighbouring values Returns True if something fixed (by shifting knot)
- param knots
- type knots
TColStd_Array1OfReal
- rtype
bool
-
property
thisown
¶ The membership flag
-
-
class
ShapeConstruct_MakeTriangulation
(*args)¶ Bases:
OCC.Core.BRepBuilderAPI.BRepBuilderAPI_MakeShape
- Parameters
pnts –
- type pnts
TColgp_Array1OfPnt
- param prec
default value is 0.0
- type prec
float
- rtype
None:param wire:
- type wire
TopoDS_Wire
- param prec
default value is 0.0
- type prec
float
- rtype
None
-
property
thisown
¶ The membership flag
-
class
ShapeConstruct_ProjectCurveOnSurface
(*args)¶ Bases:
OCC.Core.Standard.Standard_Transient
- Empty constructor.
- rtype
None
-
static
DownCast
(t)¶
-
GetAdjustOverDegenMode
(ShapeConstruct_ProjectCurveOnSurface self) → Standard_Integer¶
-
GetBuildCurveMode
(ShapeConstruct_ProjectCurveOnSurface self) → Standard_Boolean¶
-
Init
()¶ - Initializes the object with all necessary parameters, i.e. surface and precision
- param surf
- type surf
Geom_Surface
- param preci
- type preci
float
- rtype
void* Initializes the object with all necessary parameters, i.e. surface and precision
- param surf
- type surf
ShapeAnalysis_Surface
- param preci
- type preci
float
- rtype
void
-
Perform
()¶ - Computes the projection of 3d curve onto a surface using the specialized algorithm. Returns False if projector fails, otherwise, if pcurve computed successfully, returns True. The output curve 2D is guaranteed to be same-parameter with input curve 3D on the interval [First, Last]. If the output curve lies on a direct line the infinite line is returned, in the case same-parameter condition is satisfied. TolFirst and TolLast are the tolerances at the ends of input curve 3D.
- param c3d
- type c3d
Geom_Curve
- param First
- type First
float
- param Last
- type Last
float
- param c2d
- type c2d
Geom2d_Curve
- param TolFirst
default value is -1
- type TolFirst
float
- param TolLast
default value is -1
- type TolLast
float
- rtype
bool
-
PerformByProjLib
()¶ - Computes the projection of 3d curve onto a surface using the standard algorithm from ProjLib. Returns False if standard projector fails or raises an exception or cuts the curve by parametrical bounds of the surface. Else, if pcurve computed successfully, returns True. The continuity, maxdeg and nbinterval are parameters of call to Approx_CurveOnSurface. If nbinterval is equal to -1 (default), this value is computed depending on source 3d curve and surface.
- param c3d
- type c3d
Geom_Curve
- param First
- type First
float
- param Last
- type Last
float
- param c2d
- type c2d
Geom2d_Curve
- param continuity
default value is GeomAbs_C1
- type continuity
GeomAbs_Shape
- param maxdeg
default value is 12
- type maxdeg
int
- param nbinterval
default value is -1
- type nbinterval
int
- rtype
bool
-
SetAdjustOverDegenMode
(ShapeConstruct_ProjectCurveOnSurface self, Standard_Integer value)¶
-
SetBuildCurveMode
(ShapeConstruct_ProjectCurveOnSurface self, Standard_Boolean value)¶
-
SetPrecision
()¶ - Sets value for current precision
- param preci
- type preci
float
- rtype
None
-
SetSurface
()¶ - Loads a surface (in the form of Geom_Surface) to project on
- param surf
- type surf
Geom_Surface
- rtype
None* Loads a surface (in the form of ShapeAnalysis_Surface) to project on
- param surf
- type surf
ShapeAnalysis_Surface
- rtype
None
-
Status
()¶ - Returns the status of last Peform
- param theStatus
- type theStatus
ShapeExtend_Status
- rtype
bool
-
property
thisown
¶ The membership flag
-
class
SwigPyIterator
(*args, **kwargs)¶ Bases:
object
-
advance
()¶
-
copy
()¶
-
decr
()¶
-
distance
()¶
-
equal
()¶
-
incr
()¶
-
next
()¶
-
previous
()¶
-
property
thisown
¶ The membership flag
-
value
()¶
-
-
class
shapeconstruct
¶ Bases:
object
-
static
ConvertCurveToBSpline
()¶ - Tool for wire triangulation
- param C3D
- type C3D
Geom_Curve
- param First
- type First
float
- param Last
- type Last
float
- param Tol3d
- type Tol3d
float
- param Continuity
- type Continuity
GeomAbs_Shape
- param MaxSegments
- type MaxSegments
int
- param MaxDegree
- type MaxDegree
int
- rtype
opencascade::handle<Geom_BSplineCurve>:param C2D:
- type C2D
Geom2d_Curve
- param First
- type First
float
- param Last
- type Last
float
- param Tol2d
- type Tol2d
float
- param Continuity
- type Continuity
GeomAbs_Shape
- param MaxSegments
- type MaxSegments
int
- param MaxDegree
- type MaxDegree
int
- rtype
opencascade::handle<Geom2d_BSplineCurve>
-
static
ConvertSurfaceToBSpline
()¶ - Parameters
surf –
- type surf
Geom_Surface
- param UF
- type UF
float
- param UL
- type UL
float
- param VF
- type VF
float
- param VL
- type VL
float
- param Tol3d
- type Tol3d
float
- param Continuity
- type Continuity
GeomAbs_Shape
- param MaxSegments
- type MaxSegments
int
- param MaxDegree
- type MaxDegree
int
- rtype
opencascade::handle<Geom_BSplineSurface>
-
static
JoinCurves
()¶ - Method for joininig curves 3D. Parametersc3d1,ac3d2 - initial curves Orient1, Orient2 - initial edges orientations. first1,last1,first2,last2 - parameters for trimming curves (re-calculate with account of orientation edges) c3dOut - result curve isRev1,isRev2 - out parameters indicative on possible errors. Return valueTrue - if curves were joined successfully, else - False.
- param c3d1
- type c3d1
Geom_Curve
- param ac3d2
- type ac3d2
Geom_Curve
- param Orient1
- type Orient1
TopAbs_Orientation
- param Orient2
- type Orient2
TopAbs_Orientation
- param first1
- type first1
float
- param last1
- type last1
float
- param first2
- type first2
float
- param last2
- type last2
float
- param c3dOut
- type c3dOut
Geom_Curve
- param isRev1
- type isRev1
bool
- param isRev2
- type isRev2
bool
- rtype
bool* Method for joininig curves 3D. Parameters : c3d1,ac3d2 - initial curves Orient1, Orient2 - initial edges orientations. first1,last1,first2,last2 - parameters for trimming curves (re-calculate with account of orientation edges) c3dOut - result curve isRev1,isRev2 - out parameters indicative on possible errors. isError - input parameter indicative possible errors due to that one from edges have one vertex Return value : True - if curves were joined successfully, else - False.
- param c2d1
- type c2d1
Geom2d_Curve
- param ac2d2
- type ac2d2
Geom2d_Curve
- param Orient1
- type Orient1
TopAbs_Orientation
- param Orient2
- type Orient2
TopAbs_Orientation
- param first1
- type first1
float
- param last1
- type last1
float
- param first2
- type first2
float
- param last2
- type last2
float
- param c2dOut
- type c2dOut
Geom2d_Curve
- param isRev1
- type isRev1
bool
- param isRev2
- type isRev2
bool
- param isError
default value is Standard_False
- type isError
bool
- rtype
bool
-
static
JoinPCurves
()¶ - join pcurves of the <theEdge> on the <theFace> try to use pcurves from originas edges <theEdges> Returns false if cannot join pcurves
- param theEdges
- type theEdges
TopTools_HSequenceOfShape
- param theFace
- type theFace
TopoDS_Face
- param theEdge
- type theEdge
TopoDS_Edge
- rtype
bool
-
property
thisown
¶ The membership flag
-
static