mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-19 13:40:49 +03:00
0024002: Overall code and build procedure refactoring -- automatic
Automatic upgrade of OCCT code by command "occt_upgrade . -nocdl": - WOK-generated header files from inc and sources from drv are moved to src - CDL files removed - All packages are converted to nocdlpack
This commit is contained in:
76
src/ShapeUpgrade/FILES
Normal file
76
src/ShapeUpgrade/FILES
Normal file
@@ -0,0 +1,76 @@
|
||||
ShapeUpgrade.cxx
|
||||
ShapeUpgrade.hxx
|
||||
ShapeUpgrade_ClosedEdgeDivide.cxx
|
||||
ShapeUpgrade_ClosedEdgeDivide.hxx
|
||||
ShapeUpgrade_ClosedFaceDivide.cxx
|
||||
ShapeUpgrade_ClosedFaceDivide.hxx
|
||||
ShapeUpgrade_ConvertCurve2dToBezier.cxx
|
||||
ShapeUpgrade_ConvertCurve2dToBezier.hxx
|
||||
ShapeUpgrade_ConvertCurve3dToBezier.cxx
|
||||
ShapeUpgrade_ConvertCurve3dToBezier.hxx
|
||||
ShapeUpgrade_ConvertCurve3dToBezier.lxx
|
||||
ShapeUpgrade_ConvertSurfaceToBezierBasis.cxx
|
||||
ShapeUpgrade_ConvertSurfaceToBezierBasis.hxx
|
||||
ShapeUpgrade_ConvertSurfaceToBezierBasis.lxx
|
||||
ShapeUpgrade_EdgeDivide.cxx
|
||||
ShapeUpgrade_EdgeDivide.hxx
|
||||
ShapeUpgrade_EdgeDivide.lxx
|
||||
ShapeUpgrade_FaceDivide.cxx
|
||||
ShapeUpgrade_FaceDivide.hxx
|
||||
ShapeUpgrade_FaceDivideArea.cxx
|
||||
ShapeUpgrade_FaceDivideArea.hxx
|
||||
ShapeUpgrade_FaceDivideArea.lxx
|
||||
ShapeUpgrade_FixSmallBezierCurves.cxx
|
||||
ShapeUpgrade_FixSmallBezierCurves.hxx
|
||||
ShapeUpgrade_FixSmallCurves.cxx
|
||||
ShapeUpgrade_FixSmallCurves.hxx
|
||||
ShapeUpgrade_RemoveInternalWires.cxx
|
||||
ShapeUpgrade_RemoveInternalWires.hxx
|
||||
ShapeUpgrade_RemoveInternalWires.lxx
|
||||
ShapeUpgrade_RemoveLocations.cxx
|
||||
ShapeUpgrade_RemoveLocations.hxx
|
||||
ShapeUpgrade_RemoveLocations.lxx
|
||||
ShapeUpgrade_ShapeConvertToBezier.cxx
|
||||
ShapeUpgrade_ShapeConvertToBezier.hxx
|
||||
ShapeUpgrade_ShapeConvertToBezier.lxx
|
||||
ShapeUpgrade_ShapeDivide.cxx
|
||||
ShapeUpgrade_ShapeDivide.hxx
|
||||
ShapeUpgrade_ShapeDivideAngle.cxx
|
||||
ShapeUpgrade_ShapeDivideAngle.hxx
|
||||
ShapeUpgrade_ShapeDivideArea.cxx
|
||||
ShapeUpgrade_ShapeDivideArea.hxx
|
||||
ShapeUpgrade_ShapeDivideArea.lxx
|
||||
ShapeUpgrade_ShapeDivideClosed.cxx
|
||||
ShapeUpgrade_ShapeDivideClosed.hxx
|
||||
ShapeUpgrade_ShapeDivideClosedEdges.cxx
|
||||
ShapeUpgrade_ShapeDivideClosedEdges.hxx
|
||||
ShapeUpgrade_ShapeDivideContinuity.cxx
|
||||
ShapeUpgrade_ShapeDivideContinuity.hxx
|
||||
ShapeUpgrade_ShellSewing.cxx
|
||||
ShapeUpgrade_ShellSewing.hxx
|
||||
ShapeUpgrade_SplitCurve.cxx
|
||||
ShapeUpgrade_SplitCurve.hxx
|
||||
ShapeUpgrade_SplitCurve2d.cxx
|
||||
ShapeUpgrade_SplitCurve2d.hxx
|
||||
ShapeUpgrade_SplitCurve2dContinuity.cxx
|
||||
ShapeUpgrade_SplitCurve2dContinuity.hxx
|
||||
ShapeUpgrade_SplitCurve3d.cxx
|
||||
ShapeUpgrade_SplitCurve3d.hxx
|
||||
ShapeUpgrade_SplitCurve3dContinuity.cxx
|
||||
ShapeUpgrade_SplitCurve3dContinuity.hxx
|
||||
ShapeUpgrade_SplitSurface.cxx
|
||||
ShapeUpgrade_SplitSurface.hxx
|
||||
ShapeUpgrade_SplitSurfaceAngle.cxx
|
||||
ShapeUpgrade_SplitSurfaceAngle.hxx
|
||||
ShapeUpgrade_SplitSurfaceArea.cxx
|
||||
ShapeUpgrade_SplitSurfaceArea.hxx
|
||||
ShapeUpgrade_SplitSurfaceArea.lxx
|
||||
ShapeUpgrade_SplitSurfaceContinuity.cxx
|
||||
ShapeUpgrade_SplitSurfaceContinuity.hxx
|
||||
ShapeUpgrade_Tool.cxx
|
||||
ShapeUpgrade_Tool.hxx
|
||||
ShapeUpgrade_Tool.lxx
|
||||
ShapeUpgrade_UnifySameDomain.cxx
|
||||
ShapeUpgrade_UnifySameDomain.hxx
|
||||
ShapeUpgrade_WireDivide.cxx
|
||||
ShapeUpgrade_WireDivide.hxx
|
@@ -1,127 +0,0 @@
|
||||
-- Created on: 1998-06-03
|
||||
-- Created by: data exchange team
|
||||
-- Copyright (c) 1998-1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
package ShapeUpgrade
|
||||
|
||||
---Purpose: This package provides tools
|
||||
-- for splitting and converting shapes by some criteria. It
|
||||
-- provides modifications of the kind when one topological
|
||||
-- object can be converted or splitted to several ones. In
|
||||
-- particular this package contains high level API classes which perform:
|
||||
-- converting geometry of shapes up to given continuity,
|
||||
-- splitting revolutions by U to segments less than given value,
|
||||
-- converting to beziers,
|
||||
-- splitting closed faces.
|
||||
|
||||
uses
|
||||
gp,
|
||||
Geom,
|
||||
Geom2d,
|
||||
GeomAbs,
|
||||
Adaptor3d,
|
||||
GeomAdaptor,
|
||||
Geom2dAPI,
|
||||
Message,
|
||||
TopLoc,
|
||||
TColStd,
|
||||
TColGeom,
|
||||
TColGeom2d,
|
||||
TCollection,
|
||||
TopoDS,
|
||||
TopTools,
|
||||
TopAbs,
|
||||
ShapeExtend,
|
||||
ShapeBuild,
|
||||
ShapeAnalysis,
|
||||
BRepBuilderAPI
|
||||
|
||||
is
|
||||
|
||||
--- Instanciation of generic classes (tools)
|
||||
|
||||
private class Tool;
|
||||
|
||||
class EdgeDivide;
|
||||
|
||||
class ClosedEdgeDivide;
|
||||
|
||||
class WireDivide;
|
||||
|
||||
class FaceDivide;
|
||||
|
||||
class ClosedFaceDivide;
|
||||
class FaceDivideArea;
|
||||
|
||||
class ShapeDivide;
|
||||
class ShapeDivideArea;
|
||||
|
||||
class ShapeDivideContinuity;
|
||||
|
||||
class ShapeDivideAngle;
|
||||
|
||||
class ShapeConvertToBezier;
|
||||
|
||||
class ShapeDivideClosed;
|
||||
---Purpose:
|
||||
|
||||
class ShapeDivideClosedEdges;
|
||||
---Purpose:
|
||||
|
||||
class SplitCurve;
|
||||
class SplitCurve2d;
|
||||
class SplitCurve2dContinuity;
|
||||
class ConvertCurve2dToBezier;
|
||||
class SplitCurve3d;
|
||||
class SplitCurve3dContinuity;
|
||||
class ConvertCurve3dToBezier;
|
||||
|
||||
class SplitSurface;
|
||||
class SplitSurfaceContinuity;
|
||||
class SplitSurfaceAngle;
|
||||
class ConvertSurfaceToBezierBasis;
|
||||
class SplitSurfaceArea;
|
||||
|
||||
class ShellSewing;
|
||||
|
||||
class FixSmallCurves;
|
||||
---Purpose:
|
||||
class FixSmallBezierCurves;
|
||||
---Purpose:
|
||||
|
||||
class RemoveLocations;
|
||||
|
||||
class RemoveInternalWires;
|
||||
|
||||
class UnifySameDomain;
|
||||
---Purpose: Unifies same domain faces and edges of specified shape
|
||||
|
||||
C0BSplineToSequenceOfC1BSplineCurve (BS : BSplineCurve from Geom;
|
||||
seqBS: out HSequenceOfBoundedCurve from TColGeom)
|
||||
returns Boolean;
|
||||
|
||||
C0BSplineToSequenceOfC1BSplineCurve (BS : BSplineCurve from Geom2d;
|
||||
seqBS: out HSequenceOfBoundedCurve from TColGeom2d)
|
||||
returns Boolean;
|
||||
--- Purpose: Converts C0 B-Spline curve into sequence of C1 B-Spline curves.
|
||||
-- This method splits B-Spline at the knots with multiplicities
|
||||
-- equal to degree, i.e. unlike method
|
||||
-- GeomConvert::C0BSplineToArrayOfC1BSplineCurve this one does not
|
||||
-- use any tolerance and therefore does not change the geometry of
|
||||
-- B-Spline.
|
||||
-- Returns True if C0 B-Spline was successfully splitted, else
|
||||
-- returns False (if BS is C1 B-Spline).
|
||||
|
||||
end ShapeUpgrade;
|
@@ -16,33 +16,30 @@
|
||||
|
||||
// abv 24.05.99 S4174: methods Debug() commented
|
||||
|
||||
#include <ShapeUpgrade.ixx>
|
||||
#include <TColgp_Array1OfPnt.hxx>
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
#include <BSplCLib.hxx>
|
||||
#include <TColStd_Array1OfInteger.hxx>
|
||||
#include <Geom2d_BSplineCurve.hxx>
|
||||
#include <Geom_BSplineCurve.hxx>
|
||||
#include <ShapeUpgrade.hxx>
|
||||
#include <TColgp_Array1OfPnt.hxx>
|
||||
#include <TColStd_Array1OfInteger.hxx>
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
|
||||
/*
|
||||
// Debug state= True / False.
|
||||
static Standard_Boolean Dbg=Standard_False;
|
||||
|
||||
void ShapeUpgrade::SetDebug(const Standard_Boolean State)
|
||||
{
|
||||
Dbg=State;
|
||||
}
|
||||
|
||||
Standard_Boolean ShapeUpgrade::Debug()
|
||||
{
|
||||
return Dbg;
|
||||
}
|
||||
*/
|
||||
|
||||
//=======================================================================
|
||||
//function : C0BSplineToSequenceOfC1BSplineCurve
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Standard_Boolean ShapeUpgrade::C0BSplineToSequenceOfC1BSplineCurve(const Handle(Geom_BSplineCurve)& BS,
|
||||
Handle(TColGeom_HSequenceOfBoundedCurve)& seqBS)
|
||||
{
|
||||
|
147
src/ShapeUpgrade/ShapeUpgrade.hxx
Normal file
147
src/ShapeUpgrade/ShapeUpgrade.hxx
Normal file
@@ -0,0 +1,147 @@
|
||||
// Created on: 1998-06-03
|
||||
// Created by: data exchange team
|
||||
// Copyright (c) 1998-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _ShapeUpgrade_HeaderFile
|
||||
#define _ShapeUpgrade_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <TColGeom_HSequenceOfBoundedCurve.hxx>
|
||||
#include <TColGeom2d_HSequenceOfBoundedCurve.hxx>
|
||||
class Geom_BSplineCurve;
|
||||
class Geom2d_BSplineCurve;
|
||||
class ShapeUpgrade_Tool;
|
||||
class ShapeUpgrade_EdgeDivide;
|
||||
class ShapeUpgrade_ClosedEdgeDivide;
|
||||
class ShapeUpgrade_WireDivide;
|
||||
class ShapeUpgrade_FaceDivide;
|
||||
class ShapeUpgrade_ClosedFaceDivide;
|
||||
class ShapeUpgrade_FaceDivideArea;
|
||||
class ShapeUpgrade_ShapeDivide;
|
||||
class ShapeUpgrade_ShapeDivideArea;
|
||||
class ShapeUpgrade_ShapeDivideContinuity;
|
||||
class ShapeUpgrade_ShapeDivideAngle;
|
||||
class ShapeUpgrade_ShapeConvertToBezier;
|
||||
class ShapeUpgrade_ShapeDivideClosed;
|
||||
class ShapeUpgrade_ShapeDivideClosedEdges;
|
||||
class ShapeUpgrade_SplitCurve;
|
||||
class ShapeUpgrade_SplitCurve2d;
|
||||
class ShapeUpgrade_SplitCurve2dContinuity;
|
||||
class ShapeUpgrade_ConvertCurve2dToBezier;
|
||||
class ShapeUpgrade_SplitCurve3d;
|
||||
class ShapeUpgrade_SplitCurve3dContinuity;
|
||||
class ShapeUpgrade_ConvertCurve3dToBezier;
|
||||
class ShapeUpgrade_SplitSurface;
|
||||
class ShapeUpgrade_SplitSurfaceContinuity;
|
||||
class ShapeUpgrade_SplitSurfaceAngle;
|
||||
class ShapeUpgrade_ConvertSurfaceToBezierBasis;
|
||||
class ShapeUpgrade_SplitSurfaceArea;
|
||||
class ShapeUpgrade_ShellSewing;
|
||||
class ShapeUpgrade_FixSmallCurves;
|
||||
class ShapeUpgrade_FixSmallBezierCurves;
|
||||
class ShapeUpgrade_RemoveLocations;
|
||||
class ShapeUpgrade_RemoveInternalWires;
|
||||
class ShapeUpgrade_UnifySameDomain;
|
||||
|
||||
|
||||
//! This package provides tools
|
||||
//! for splitting and converting shapes by some criteria. It
|
||||
//! provides modifications of the kind when one topological
|
||||
//! object can be converted or splitted to several ones. In
|
||||
//! particular this package contains high level API classes which perform:
|
||||
//! converting geometry of shapes up to given continuity,
|
||||
//! splitting revolutions by U to segments less than given value,
|
||||
//! converting to beziers,
|
||||
//! splitting closed faces.
|
||||
class ShapeUpgrade
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Unifies same domain faces and edges of specified shape
|
||||
Standard_EXPORT static Standard_Boolean C0BSplineToSequenceOfC1BSplineCurve (const Handle(Geom_BSplineCurve)& BS, Handle(TColGeom_HSequenceOfBoundedCurve)& seqBS);
|
||||
|
||||
//! Converts C0 B-Spline curve into sequence of C1 B-Spline curves.
|
||||
//! This method splits B-Spline at the knots with multiplicities
|
||||
//! equal to degree, i.e. unlike method
|
||||
//! GeomConvert::C0BSplineToArrayOfC1BSplineCurve this one does not
|
||||
//! use any tolerance and therefore does not change the geometry of
|
||||
//! B-Spline.
|
||||
//! Returns True if C0 B-Spline was successfully splitted, else
|
||||
//! returns False (if BS is C1 B-Spline).
|
||||
Standard_EXPORT static Standard_Boolean C0BSplineToSequenceOfC1BSplineCurve (const Handle(Geom2d_BSplineCurve)& BS, Handle(TColGeom2d_HSequenceOfBoundedCurve)& seqBS);
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
friend class ShapeUpgrade_Tool;
|
||||
friend class ShapeUpgrade_EdgeDivide;
|
||||
friend class ShapeUpgrade_ClosedEdgeDivide;
|
||||
friend class ShapeUpgrade_WireDivide;
|
||||
friend class ShapeUpgrade_FaceDivide;
|
||||
friend class ShapeUpgrade_ClosedFaceDivide;
|
||||
friend class ShapeUpgrade_FaceDivideArea;
|
||||
friend class ShapeUpgrade_ShapeDivide;
|
||||
friend class ShapeUpgrade_ShapeDivideArea;
|
||||
friend class ShapeUpgrade_ShapeDivideContinuity;
|
||||
friend class ShapeUpgrade_ShapeDivideAngle;
|
||||
friend class ShapeUpgrade_ShapeConvertToBezier;
|
||||
friend class ShapeUpgrade_ShapeDivideClosed;
|
||||
friend class ShapeUpgrade_ShapeDivideClosedEdges;
|
||||
friend class ShapeUpgrade_SplitCurve;
|
||||
friend class ShapeUpgrade_SplitCurve2d;
|
||||
friend class ShapeUpgrade_SplitCurve2dContinuity;
|
||||
friend class ShapeUpgrade_ConvertCurve2dToBezier;
|
||||
friend class ShapeUpgrade_SplitCurve3d;
|
||||
friend class ShapeUpgrade_SplitCurve3dContinuity;
|
||||
friend class ShapeUpgrade_ConvertCurve3dToBezier;
|
||||
friend class ShapeUpgrade_SplitSurface;
|
||||
friend class ShapeUpgrade_SplitSurfaceContinuity;
|
||||
friend class ShapeUpgrade_SplitSurfaceAngle;
|
||||
friend class ShapeUpgrade_ConvertSurfaceToBezierBasis;
|
||||
friend class ShapeUpgrade_SplitSurfaceArea;
|
||||
friend class ShapeUpgrade_ShellSewing;
|
||||
friend class ShapeUpgrade_FixSmallCurves;
|
||||
friend class ShapeUpgrade_FixSmallBezierCurves;
|
||||
friend class ShapeUpgrade_RemoveLocations;
|
||||
friend class ShapeUpgrade_RemoveInternalWires;
|
||||
friend class ShapeUpgrade_UnifySameDomain;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _ShapeUpgrade_HeaderFile
|
@@ -1,32 +0,0 @@
|
||||
-- Created on: 2000-05-25
|
||||
-- Created by: data exchange team
|
||||
-- Copyright (c) 2000-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class ClosedEdgeDivide from ShapeUpgrade inherits EdgeDivide from ShapeUpgrade
|
||||
|
||||
---Purpose:
|
||||
|
||||
uses
|
||||
|
||||
Edge from TopoDS
|
||||
|
||||
is
|
||||
|
||||
Create returns ClosedEdgeDivide from ShapeUpgrade;
|
||||
---Purpose: Empty constructor.
|
||||
|
||||
Compute(me: mutable; anEdge: Edge from TopoDS)
|
||||
returns Boolean is redefined;
|
||||
|
||||
end ClosedEdgeDivide;
|
@@ -13,24 +13,26 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <ShapeUpgrade_ClosedEdgeDivide.ixx>
|
||||
#include <ShapeAnalysis_Edge.hxx>
|
||||
#include <TopoDS_Vertex.hxx>
|
||||
#include <Geom_Curve.hxx>
|
||||
#include <Geom2d_Curve.hxx>
|
||||
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <TColStd_HSequenceOfReal.hxx>
|
||||
#include <ShapeUpgrade_SplitCurve3d.hxx>
|
||||
#include <ShapeUpgrade_SplitCurve2d.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <Geom2d_Curve.hxx>
|
||||
#include <Geom_Curve.hxx>
|
||||
#include <Geom_Surface.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <ShapeAnalysis_Edge.hxx>
|
||||
#include <ShapeUpgrade_ClosedEdgeDivide.hxx>
|
||||
#include <ShapeUpgrade_SplitCurve2d.hxx>
|
||||
#include <ShapeUpgrade_SplitCurve3d.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TColStd_HSequenceOfReal.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <TopoDS_Vertex.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : ShapeUpgrade_ClosedEdgeDivide
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
ShapeUpgrade_ClosedEdgeDivide::ShapeUpgrade_ClosedEdgeDivide():
|
||||
ShapeUpgrade_EdgeDivide()
|
||||
{
|
||||
|
65
src/ShapeUpgrade/ShapeUpgrade_ClosedEdgeDivide.hxx
Normal file
65
src/ShapeUpgrade/ShapeUpgrade_ClosedEdgeDivide.hxx
Normal file
@@ -0,0 +1,65 @@
|
||||
// Created on: 2000-05-25
|
||||
// Created by: data exchange team
|
||||
// Copyright (c) 2000-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _ShapeUpgrade_ClosedEdgeDivide_HeaderFile
|
||||
#define _ShapeUpgrade_ClosedEdgeDivide_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <ShapeUpgrade_EdgeDivide.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class TopoDS_Edge;
|
||||
|
||||
|
||||
class ShapeUpgrade_ClosedEdgeDivide;
|
||||
DEFINE_STANDARD_HANDLE(ShapeUpgrade_ClosedEdgeDivide, ShapeUpgrade_EdgeDivide)
|
||||
|
||||
|
||||
class ShapeUpgrade_ClosedEdgeDivide : public ShapeUpgrade_EdgeDivide
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Empty constructor.
|
||||
Standard_EXPORT ShapeUpgrade_ClosedEdgeDivide();
|
||||
|
||||
Standard_EXPORT virtual Standard_Boolean Compute (const TopoDS_Edge& anEdge) Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(ShapeUpgrade_ClosedEdgeDivide,ShapeUpgrade_EdgeDivide)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _ShapeUpgrade_ClosedEdgeDivide_HeaderFile
|
@@ -1,52 +0,0 @@
|
||||
-- Created on: 1999-07-22
|
||||
-- Created by: data exchange team
|
||||
-- Copyright (c) 1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class ClosedFaceDivide from ShapeUpgrade inherits FaceDivide from ShapeUpgrade
|
||||
|
||||
---Purpose: Divides a Face with one or more seam edge to avoid closed faces.
|
||||
-- Splitting is performed by U and V direction. The number of
|
||||
-- resulting faces can be defined by user.
|
||||
|
||||
uses
|
||||
|
||||
Face from TopoDS
|
||||
|
||||
is
|
||||
|
||||
Create returns ClosedFaceDivide from ShapeUpgrade;
|
||||
---Purpose: Creates empty constructor.
|
||||
|
||||
Create (F : Face from TopoDS)
|
||||
returns ClosedFaceDivide from ShapeUpgrade;
|
||||
--- Purpose : Initialize by a Face.
|
||||
|
||||
SplitSurface (me: mutable)
|
||||
returns Boolean is redefined;
|
||||
---Purpose: Performs splitting of surface and computes the shell
|
||||
-- from source face.
|
||||
|
||||
SetNbSplitPoints(me: mutable; num: Integer);
|
||||
---Purpose: Sets the number of cutting lines by which closed face
|
||||
-- will be splitted. The resulting faces will be num+1.
|
||||
|
||||
GetNbSplitPoints(me) returns Integer;
|
||||
---Purpose: Returns the number of splitting points
|
||||
|
||||
fields
|
||||
|
||||
myNbSplit: Integer;
|
||||
|
||||
end ClosedFaceDivide;
|
@@ -14,35 +14,36 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <ShapeUpgrade_ClosedFaceDivide.ixx>
|
||||
|
||||
#include <Bnd_Box2d.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <Geom2d_Curve.hxx>
|
||||
#include <Geom_RectangularTrimmedSurface.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <ShapeAnalysis.hxx>
|
||||
#include <ShapeAnalysis_Curve.hxx>
|
||||
#include <ShapeAnalysis_Edge.hxx>
|
||||
#include <ShapeAnalysis_Surface.hxx>
|
||||
#include <ShapeBuild_ReShape.hxx>
|
||||
#include <ShapeExtend.hxx>
|
||||
#include <ShapeExtend_CompositeSurface.hxx>
|
||||
#include <ShapeExtend_WireData.hxx>
|
||||
#include <ShapeFix_ComposeShell.hxx>
|
||||
#include <ShapeUpgrade_ClosedFaceDivide.hxx>
|
||||
#include <ShapeUpgrade_SplitSurface.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TColStd_HSequenceOfReal.hxx>
|
||||
#include <TopExp_Explorer.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <TopoDS_Face.hxx>
|
||||
#include <TopoDS_Iterator.hxx>
|
||||
#include <TopoDS_Wire.hxx>
|
||||
#include <ShapeExtend_WireData.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <ShapeAnalysis_Edge.hxx>
|
||||
#include <Geom2d_Curve.hxx>
|
||||
#include <ShapeAnalysis_Curve.hxx>
|
||||
#include <Bnd_Box2d.hxx>
|
||||
#include <TColStd_HSequenceOfReal.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <ShapeUpgrade_SplitSurface.hxx>
|
||||
#include <ShapeExtend_CompositeSurface.hxx>
|
||||
#include <ShapeFix_ComposeShell.hxx>
|
||||
#include <TopExp_Explorer.hxx>
|
||||
#include <ShapeAnalysis_Surface.hxx>
|
||||
#include <ShapeAnalysis.hxx>
|
||||
#include <Geom_RectangularTrimmedSurface.hxx>
|
||||
#include <ShapeBuild_ReShape.hxx>
|
||||
#include <ShapeAnalysis.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : ShapeUpgrade_ClosedFaceDivide
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
ShapeUpgrade_ClosedFaceDivide::ShapeUpgrade_ClosedFaceDivide():
|
||||
ShapeUpgrade_FaceDivide()
|
||||
{
|
||||
|
82
src/ShapeUpgrade/ShapeUpgrade_ClosedFaceDivide.hxx
Normal file
82
src/ShapeUpgrade/ShapeUpgrade_ClosedFaceDivide.hxx
Normal file
@@ -0,0 +1,82 @@
|
||||
// Created on: 1999-07-22
|
||||
// Created by: data exchange team
|
||||
// Copyright (c) 1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _ShapeUpgrade_ClosedFaceDivide_HeaderFile
|
||||
#define _ShapeUpgrade_ClosedFaceDivide_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <ShapeUpgrade_FaceDivide.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class TopoDS_Face;
|
||||
|
||||
|
||||
class ShapeUpgrade_ClosedFaceDivide;
|
||||
DEFINE_STANDARD_HANDLE(ShapeUpgrade_ClosedFaceDivide, ShapeUpgrade_FaceDivide)
|
||||
|
||||
//! Divides a Face with one or more seam edge to avoid closed faces.
|
||||
//! Splitting is performed by U and V direction. The number of
|
||||
//! resulting faces can be defined by user.
|
||||
class ShapeUpgrade_ClosedFaceDivide : public ShapeUpgrade_FaceDivide
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Creates empty constructor.
|
||||
Standard_EXPORT ShapeUpgrade_ClosedFaceDivide();
|
||||
|
||||
//! Initialize by a Face.
|
||||
Standard_EXPORT ShapeUpgrade_ClosedFaceDivide(const TopoDS_Face& F);
|
||||
|
||||
//! Performs splitting of surface and computes the shell
|
||||
//! from source face.
|
||||
Standard_EXPORT virtual Standard_Boolean SplitSurface() Standard_OVERRIDE;
|
||||
|
||||
//! Sets the number of cutting lines by which closed face
|
||||
//! will be splitted. The resulting faces will be num+1.
|
||||
Standard_EXPORT void SetNbSplitPoints (const Standard_Integer num);
|
||||
|
||||
//! Returns the number of splitting points
|
||||
Standard_EXPORT Standard_Integer GetNbSplitPoints() const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(ShapeUpgrade_ClosedFaceDivide,ShapeUpgrade_FaceDivide)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Standard_Integer myNbSplit;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _ShapeUpgrade_ClosedFaceDivide_HeaderFile
|
@@ -1,52 +0,0 @@
|
||||
-- Created on: 1999-05-13
|
||||
-- Created by: data exchange team
|
||||
-- Copyright (c) 1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class ConvertCurve2dToBezier from ShapeUpgrade inherits SplitCurve2d from ShapeUpgrade
|
||||
|
||||
---Purpose: converts/splits a 2d curve to a list of beziers
|
||||
|
||||
uses
|
||||
|
||||
HSequenceOfCurve from TColGeom2d,
|
||||
HSequenceOfReal from TColStd
|
||||
|
||||
is
|
||||
|
||||
Create returns ConvertCurve2dToBezier from ShapeUpgrade;
|
||||
---Purpose: Empty constructor.
|
||||
|
||||
Compute(me: mutable) is redefined;
|
||||
---Purpose: Converts curve into a list of beziers, and stores the
|
||||
-- splitting parameters on original curve.
|
||||
|
||||
Build (me: mutable; Segment: Boolean) is redefined;
|
||||
---Purpose: Splits a list of beziers computed by Compute method according
|
||||
-- the split values and splitting parameters.
|
||||
|
||||
Segments(me) returns HSequenceOfCurve from TColGeom2d is private;
|
||||
---Purpose: Returns the list of bezier curves correspondent to original
|
||||
-- curve.
|
||||
|
||||
SplitParams(me) returns HSequenceOfReal from TColStd;
|
||||
---Purpose: Returns the list of splitted parameters in original curve
|
||||
-- parametrisation.
|
||||
|
||||
fields
|
||||
|
||||
mySegments : HSequenceOfCurve from TColGeom2d;
|
||||
mySplitParams: HSequenceOfReal from TColStd;
|
||||
|
||||
end ConvertCurve2dToBezier;
|
@@ -14,23 +14,25 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <ShapeUpgrade_ConvertCurve2dToBezier.ixx>
|
||||
#include <Precision.hxx>
|
||||
#include <Geom2d_TrimmedCurve.hxx>
|
||||
|
||||
#include <Geom2d_BezierCurve.hxx>
|
||||
#include <ShapeExtend.hxx>
|
||||
#include <Geom2d_Line.hxx>
|
||||
#include <TColgp_Array1OfPnt2d.hxx>
|
||||
#include <Geom2d_BSplineCurve.hxx>
|
||||
#include <Geom2d_Conic.hxx>
|
||||
#include <Geom_Curve.hxx>
|
||||
#include <Geom2dConvert_ApproxCurve.hxx>
|
||||
#include <Geom2d_Line.hxx>
|
||||
#include <Geom2d_TrimmedCurve.hxx>
|
||||
#include <Geom2dConvert.hxx>
|
||||
#include <Geom2dConvert_ApproxCurve.hxx>
|
||||
#include <Geom2dConvert_BSplineCurveToBezierCurve.hxx>
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
#include <TColGeom2d_HArray1OfCurve.hxx>
|
||||
#include <Geom_Curve.hxx>
|
||||
#include <GeomTools.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <ShapeCustom_Curve2d.hxx>
|
||||
#include <ShapeExtend.hxx>
|
||||
#include <ShapeUpgrade_ConvertCurve2dToBezier.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TColGeom2d_HArray1OfCurve.hxx>
|
||||
#include <TColgp_Array1OfPnt2d.hxx>
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
|
||||
ShapeUpgrade_ConvertCurve2dToBezier::ShapeUpgrade_ConvertCurve2dToBezier()
|
||||
{
|
||||
|
83
src/ShapeUpgrade/ShapeUpgrade_ConvertCurve2dToBezier.hxx
Normal file
83
src/ShapeUpgrade/ShapeUpgrade_ConvertCurve2dToBezier.hxx
Normal file
@@ -0,0 +1,83 @@
|
||||
// Created on: 1999-05-13
|
||||
// Created by: data exchange team
|
||||
// Copyright (c) 1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _ShapeUpgrade_ConvertCurve2dToBezier_HeaderFile
|
||||
#define _ShapeUpgrade_ConvertCurve2dToBezier_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <TColGeom2d_HSequenceOfCurve.hxx>
|
||||
#include <TColStd_HSequenceOfReal.hxx>
|
||||
#include <ShapeUpgrade_SplitCurve2d.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
|
||||
|
||||
class ShapeUpgrade_ConvertCurve2dToBezier;
|
||||
DEFINE_STANDARD_HANDLE(ShapeUpgrade_ConvertCurve2dToBezier, ShapeUpgrade_SplitCurve2d)
|
||||
|
||||
//! converts/splits a 2d curve to a list of beziers
|
||||
class ShapeUpgrade_ConvertCurve2dToBezier : public ShapeUpgrade_SplitCurve2d
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Empty constructor.
|
||||
Standard_EXPORT ShapeUpgrade_ConvertCurve2dToBezier();
|
||||
|
||||
//! Converts curve into a list of beziers, and stores the
|
||||
//! splitting parameters on original curve.
|
||||
Standard_EXPORT virtual void Compute() Standard_OVERRIDE;
|
||||
|
||||
//! Splits a list of beziers computed by Compute method according
|
||||
//! the split values and splitting parameters.
|
||||
Standard_EXPORT virtual void Build (const Standard_Boolean Segment) Standard_OVERRIDE;
|
||||
|
||||
//! Returns the list of splitted parameters in original curve
|
||||
//! parametrisation.
|
||||
Standard_EXPORT Handle(TColStd_HSequenceOfReal) SplitParams() const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(ShapeUpgrade_ConvertCurve2dToBezier,ShapeUpgrade_SplitCurve2d)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
//! Returns the list of bezier curves correspondent to original
|
||||
//! curve.
|
||||
Standard_EXPORT Handle(TColGeom2d_HSequenceOfCurve) Segments() const;
|
||||
|
||||
Handle(TColGeom2d_HSequenceOfCurve) mySegments;
|
||||
Handle(TColStd_HSequenceOfReal) mySplitParams;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _ShapeUpgrade_ConvertCurve2dToBezier_HeaderFile
|
@@ -1,80 +0,0 @@
|
||||
-- Created on: 1999-05-13
|
||||
-- Created by: data exchange team
|
||||
-- Copyright (c) 1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class ConvertCurve3dToBezier from ShapeUpgrade inherits SplitCurve3d from ShapeUpgrade
|
||||
|
||||
---Purpose: converts/splits a 3d curve of any type to a list of beziers
|
||||
|
||||
uses
|
||||
|
||||
HSequenceOfCurve from TColGeom,
|
||||
HSequenceOfReal from TColStd
|
||||
|
||||
is
|
||||
|
||||
Create returns ConvertCurve3dToBezier from ShapeUpgrade;
|
||||
---Purpose: Empty constructor
|
||||
|
||||
SetLineMode(me:mutable; mode: Boolean);
|
||||
---Purpose: Sets mode for conversion Geom_Line to bezier.
|
||||
---C++: inline
|
||||
|
||||
GetLineMode(me) returns Boolean;
|
||||
---Purpose: Returns the Geom_Line conversion mode.
|
||||
---C++: inline
|
||||
|
||||
SetCircleMode(me:mutable; mode: Boolean);
|
||||
---Purpose: Sets mode for conversion Geom_Circle to bezier.
|
||||
---C++: inline
|
||||
|
||||
GetCircleMode(me) returns Boolean;
|
||||
---Purpose: Returns the Geom_Circle conversion mode.
|
||||
---C++: inline
|
||||
|
||||
SetConicMode(me:mutable; mode: Boolean);
|
||||
---Purpose: Returns the Geom_Conic conversion mode.
|
||||
---C++: inline
|
||||
|
||||
GetConicMode(me) returns Boolean;
|
||||
---Purpose: Performs converting and computes the resulting shape.
|
||||
---C++: inline
|
||||
|
||||
Compute(me: mutable) is redefined;
|
||||
---Purpose: Converts curve into a list of beziers, and stores the
|
||||
-- splitting parameters on original curve.
|
||||
|
||||
Build (me: mutable; Segment: Boolean) is redefined;
|
||||
---Purpose: Splits a list of beziers computed by Compute method according
|
||||
-- the split values and splitting parameters.
|
||||
|
||||
Segments(me) returns HSequenceOfCurve from TColGeom is private;
|
||||
---Purpose: Returns the list of bezier curves correspondent to original
|
||||
-- curve.
|
||||
|
||||
SplitParams(me) returns HSequenceOfReal from TColStd;
|
||||
---Purpose: Returns the list of splitted parameters in original curve
|
||||
-- parametrisation.
|
||||
|
||||
fields
|
||||
|
||||
mySegments : HSequenceOfCurve from TColGeom;
|
||||
mySplitParams: HSequenceOfReal from TColStd;
|
||||
myLineMode : Boolean;
|
||||
myCircleMode : Boolean;
|
||||
myConicMode : Boolean;
|
||||
|
||||
end ConvertCurve2dToBezier;
|
||||
|
@@ -14,22 +14,24 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <ShapeUpgrade_ConvertCurve3dToBezier.ixx>
|
||||
#include <Precision.hxx>
|
||||
#include <Geom_TrimmedCurve.hxx>
|
||||
|
||||
#include <Geom_BezierCurve.hxx>
|
||||
#include <ShapeExtend.hxx>
|
||||
#include <Geom_Line.hxx>
|
||||
#include <TColgp_Array1OfPnt.hxx>
|
||||
#include <Geom_BSplineCurve.hxx>
|
||||
#include <Geom_Conic.hxx>
|
||||
#include <GeomConvert_ApproxCurve.hxx>
|
||||
#include <GeomConvert.hxx>
|
||||
#include <GeomConvert_BSplineCurveToBezierCurve.hxx>
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
#include <TColGeom_HArray1OfCurve.hxx>
|
||||
#include <Geom_Circle.hxx>
|
||||
#include <Geom_Conic.hxx>
|
||||
#include <Geom_Curve.hxx>
|
||||
#include <Geom_Line.hxx>
|
||||
#include <Geom_TrimmedCurve.hxx>
|
||||
#include <GeomConvert.hxx>
|
||||
#include <GeomConvert_ApproxCurve.hxx>
|
||||
#include <GeomConvert_BSplineCurveToBezierCurve.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <ShapeExtend.hxx>
|
||||
#include <ShapeUpgrade_ConvertCurve3dToBezier.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TColGeom_HArray1OfCurve.hxx>
|
||||
#include <TColgp_Array1OfPnt.hxx>
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
|
||||
ShapeUpgrade_ConvertCurve3dToBezier::ShapeUpgrade_ConvertCurve3dToBezier()
|
||||
{
|
||||
|
105
src/ShapeUpgrade/ShapeUpgrade_ConvertCurve3dToBezier.hxx
Normal file
105
src/ShapeUpgrade/ShapeUpgrade_ConvertCurve3dToBezier.hxx
Normal file
@@ -0,0 +1,105 @@
|
||||
// Created on: 1999-05-13
|
||||
// Created by: data exchange team
|
||||
// Copyright (c) 1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _ShapeUpgrade_ConvertCurve3dToBezier_HeaderFile
|
||||
#define _ShapeUpgrade_ConvertCurve3dToBezier_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <TColGeom_HSequenceOfCurve.hxx>
|
||||
#include <TColStd_HSequenceOfReal.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <ShapeUpgrade_SplitCurve3d.hxx>
|
||||
|
||||
|
||||
class ShapeUpgrade_ConvertCurve3dToBezier;
|
||||
DEFINE_STANDARD_HANDLE(ShapeUpgrade_ConvertCurve3dToBezier, ShapeUpgrade_SplitCurve3d)
|
||||
|
||||
//! converts/splits a 3d curve of any type to a list of beziers
|
||||
class ShapeUpgrade_ConvertCurve3dToBezier : public ShapeUpgrade_SplitCurve3d
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Empty constructor
|
||||
Standard_EXPORT ShapeUpgrade_ConvertCurve3dToBezier();
|
||||
|
||||
//! Sets mode for conversion Geom_Line to bezier.
|
||||
void SetLineMode (const Standard_Boolean mode);
|
||||
|
||||
//! Returns the Geom_Line conversion mode.
|
||||
Standard_Boolean GetLineMode() const;
|
||||
|
||||
//! Sets mode for conversion Geom_Circle to bezier.
|
||||
void SetCircleMode (const Standard_Boolean mode);
|
||||
|
||||
//! Returns the Geom_Circle conversion mode.
|
||||
Standard_Boolean GetCircleMode() const;
|
||||
|
||||
//! Returns the Geom_Conic conversion mode.
|
||||
void SetConicMode (const Standard_Boolean mode);
|
||||
|
||||
//! Performs converting and computes the resulting shape.
|
||||
Standard_Boolean GetConicMode() const;
|
||||
|
||||
//! Converts curve into a list of beziers, and stores the
|
||||
//! splitting parameters on original curve.
|
||||
Standard_EXPORT virtual void Compute() Standard_OVERRIDE;
|
||||
|
||||
//! Splits a list of beziers computed by Compute method according
|
||||
//! the split values and splitting parameters.
|
||||
Standard_EXPORT virtual void Build (const Standard_Boolean Segment) Standard_OVERRIDE;
|
||||
|
||||
//! Returns the list of splitted parameters in original curve
|
||||
//! parametrisation.
|
||||
Standard_EXPORT Handle(TColStd_HSequenceOfReal) SplitParams() const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(ShapeUpgrade_ConvertCurve3dToBezier,ShapeUpgrade_SplitCurve3d)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
//! Returns the list of bezier curves correspondent to original
|
||||
//! curve.
|
||||
Standard_EXPORT Handle(TColGeom_HSequenceOfCurve) Segments() const;
|
||||
|
||||
Handle(TColGeom_HSequenceOfCurve) mySegments;
|
||||
Handle(TColStd_HSequenceOfReal) mySplitParams;
|
||||
Standard_Boolean myLineMode;
|
||||
Standard_Boolean myCircleMode;
|
||||
Standard_Boolean myConicMode;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#include <ShapeUpgrade_ConvertCurve3dToBezier.lxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _ShapeUpgrade_ConvertCurve3dToBezier_HeaderFile
|
@@ -1,88 +0,0 @@
|
||||
-- Created on: 1999-05-21
|
||||
-- Created by: Pavel DURANDIN
|
||||
-- Copyright (c) 1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class ConvertSurfaceToBezierBasis from ShapeUpgrade inherits SplitSurface from ShapeUpgrade
|
||||
|
||||
---Purpose: Converts a plane, bspline surface, surface of revolution, surface
|
||||
-- of extrusion, offset surface to grid of bezier basis surface (
|
||||
-- bezier surface,
|
||||
-- surface of revolution based on bezier curve,
|
||||
-- offset surface based on any previous type).
|
||||
|
||||
uses
|
||||
|
||||
CompositeSurface from ShapeExtend
|
||||
|
||||
is
|
||||
|
||||
Create returns ConvertSurfaceToBezierBasis from ShapeUpgrade;
|
||||
---Purpose: Empty constructor.
|
||||
|
||||
Build (me: mutable; Segment: Boolean) is redefined;
|
||||
---Purpose: Splits a list of beziers computed by Compute method according
|
||||
-- the split values and splitting parameters.
|
||||
|
||||
Compute(me: mutable; Segment: Boolean) is redefined;
|
||||
---Purpose: Converts surface into a grid of bezier based surfaces, and
|
||||
-- stores this grid.
|
||||
|
||||
Segments(me) returns CompositeSurface from ShapeExtend;
|
||||
---Purpose: Returns the grid of bezier based surfaces correspondent to
|
||||
-- original surface.
|
||||
|
||||
--Methods for handling surface modes
|
||||
|
||||
SetPlaneMode(me: mutable; mode: Boolean);
|
||||
---Purpose: Sets mode for conversion Geom_Plane to Bezier
|
||||
---C++: inline
|
||||
|
||||
GetPlaneMode(me) returns Boolean;
|
||||
---Purpose: Returns the Geom_Pline conversion mode.
|
||||
---C++: inline
|
||||
|
||||
SetRevolutionMode(me: mutable; mode: Boolean);
|
||||
---Purpose: Sets mode for conversion Geom_SurfaceOfRevolution to Bezier
|
||||
---C++: inline
|
||||
|
||||
GetRevolutionMode(me) returns Boolean;
|
||||
---Purpose: Returns the Geom_SurfaceOfRevolution conversion mode.
|
||||
---C++: inline
|
||||
|
||||
SetExtrusionMode(me: mutable; mode: Boolean);
|
||||
---Purpose: Sets mode for conversion Geom_SurfaceOfLinearExtrusion to Bezier
|
||||
---C++: inline
|
||||
|
||||
GetExtrusionMode(me) returns Boolean;
|
||||
---Purpose: Returns the Geom_SurfaceOfLinearExtrusion conversion mode.
|
||||
---C++: inline
|
||||
|
||||
SetBSplineMode(me: mutable; mode: Boolean);
|
||||
---Purpose: Sets mode for conversion Geom_BSplineSurface to Bezier
|
||||
---C++: inline
|
||||
|
||||
GetBSplineMode(me) returns Boolean;
|
||||
---Purpose: Returns the Geom_BSplineSurface conversion mode.
|
||||
---C++: inline
|
||||
|
||||
fields
|
||||
|
||||
mySegments : CompositeSurface from ShapeExtend;
|
||||
myPlaneMode : Boolean;
|
||||
myRevolutionMode: Boolean;
|
||||
myExtrusionMode : Boolean;
|
||||
myBSplineMode : Boolean;
|
||||
|
||||
end ConvertSurfaceToBezierBasis;
|
@@ -16,32 +16,33 @@
|
||||
|
||||
// svv 10.01.00 porting on DEC
|
||||
|
||||
#include <ShapeUpgrade_ConvertSurfaceToBezierBasis.ixx>
|
||||
#include <TColStd_HSequenceOfReal.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <Geom_RectangularTrimmedSurface.hxx>
|
||||
#include <Geom_BezierCurve.hxx>
|
||||
#include <Geom_BezierSurface.hxx>
|
||||
#include <Geom_BSplineSurface.hxx>
|
||||
#include <Geom_Curve.hxx>
|
||||
#include <Geom_OffsetCurve.hxx>
|
||||
#include <Geom_OffsetSurface.hxx>
|
||||
#include <Geom_Plane.hxx>
|
||||
#include <TColgp_Array2OfPnt.hxx>
|
||||
#include <Geom_BezierSurface.hxx>
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
#include <TColGeom_HArray2OfSurface.hxx>
|
||||
#include <ShapeExtend.hxx>
|
||||
#include <Geom_BSplineSurface.hxx>
|
||||
#include <GeomConvert_BSplineSurfaceToBezierSurface.hxx>
|
||||
#include <TColGeom_Array2OfBezierSurface.hxx>
|
||||
#include <Geom_SurfaceOfRevolution.hxx>
|
||||
#include <Geom_Curve.hxx>
|
||||
#include <Geom_TrimmedCurve.hxx>
|
||||
#include <TColGeom_HArray1OfCurve.hxx>
|
||||
#include <Geom_OffsetCurve.hxx>
|
||||
#include <ShapeUpgrade_ConvertCurve3dToBezier.hxx>
|
||||
#include <Geom_RectangularTrimmedSurface.hxx>
|
||||
#include <Geom_SurfaceOfLinearExtrusion.hxx>
|
||||
#include <Geom_BezierCurve.hxx>
|
||||
#include <Geom_SurfaceOfRevolution.hxx>
|
||||
#include <Geom_TrimmedCurve.hxx>
|
||||
#include <GeomConvert_BSplineSurfaceToBezierSurface.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <ShapeExtend.hxx>
|
||||
#include <ShapeExtend_CompositeSurface.hxx>
|
||||
#include <ShapeUpgrade_ConvertCurve3dToBezier.hxx>
|
||||
#include <ShapeUpgrade_ConvertSurfaceToBezierBasis.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TColGeom_Array2OfBezierSurface.hxx>
|
||||
#include <TColGeom_HArray1OfCurve.hxx>
|
||||
#include <TColGeom_HArray2OfSurface.hxx>
|
||||
#include <TColgp_Array1OfPnt.hxx>
|
||||
#include <TColStd_HArray1OfReal.hxx>
|
||||
#include <TColgp_Array2OfPnt.hxx>
|
||||
#include <TColStd_Array1OfBoolean.hxx>
|
||||
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
#include <TColStd_HArray1OfReal.hxx>
|
||||
#include <TColStd_HSequenceOfReal.hxx>
|
||||
|
||||
ShapeUpgrade_ConvertSurfaceToBezierBasis::ShapeUpgrade_ConvertSurfaceToBezierBasis()
|
||||
{
|
||||
|
110
src/ShapeUpgrade/ShapeUpgrade_ConvertSurfaceToBezierBasis.hxx
Normal file
110
src/ShapeUpgrade/ShapeUpgrade_ConvertSurfaceToBezierBasis.hxx
Normal file
@@ -0,0 +1,110 @@
|
||||
// Created on: 1999-05-21
|
||||
// Created by: Pavel DURANDIN
|
||||
// Copyright (c) 1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _ShapeUpgrade_ConvertSurfaceToBezierBasis_HeaderFile
|
||||
#define _ShapeUpgrade_ConvertSurfaceToBezierBasis_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <ShapeUpgrade_SplitSurface.hxx>
|
||||
class ShapeExtend_CompositeSurface;
|
||||
|
||||
|
||||
class ShapeUpgrade_ConvertSurfaceToBezierBasis;
|
||||
DEFINE_STANDARD_HANDLE(ShapeUpgrade_ConvertSurfaceToBezierBasis, ShapeUpgrade_SplitSurface)
|
||||
|
||||
//! Converts a plane, bspline surface, surface of revolution, surface
|
||||
//! of extrusion, offset surface to grid of bezier basis surface (
|
||||
//! bezier surface,
|
||||
//! surface of revolution based on bezier curve,
|
||||
//! offset surface based on any previous type).
|
||||
class ShapeUpgrade_ConvertSurfaceToBezierBasis : public ShapeUpgrade_SplitSurface
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Empty constructor.
|
||||
Standard_EXPORT ShapeUpgrade_ConvertSurfaceToBezierBasis();
|
||||
|
||||
//! Splits a list of beziers computed by Compute method according
|
||||
//! the split values and splitting parameters.
|
||||
Standard_EXPORT virtual void Build (const Standard_Boolean Segment) Standard_OVERRIDE;
|
||||
|
||||
//! Converts surface into a grid of bezier based surfaces, and
|
||||
//! stores this grid.
|
||||
Standard_EXPORT virtual void Compute (const Standard_Boolean Segment) Standard_OVERRIDE;
|
||||
|
||||
//! Returns the grid of bezier based surfaces correspondent to
|
||||
//! original surface.
|
||||
Standard_EXPORT Handle(ShapeExtend_CompositeSurface) Segments() const;
|
||||
|
||||
//! Sets mode for conversion Geom_Plane to Bezier
|
||||
void SetPlaneMode (const Standard_Boolean mode);
|
||||
|
||||
//! Returns the Geom_Pline conversion mode.
|
||||
Standard_Boolean GetPlaneMode() const;
|
||||
|
||||
//! Sets mode for conversion Geom_SurfaceOfRevolution to Bezier
|
||||
void SetRevolutionMode (const Standard_Boolean mode);
|
||||
|
||||
//! Returns the Geom_SurfaceOfRevolution conversion mode.
|
||||
Standard_Boolean GetRevolutionMode() const;
|
||||
|
||||
//! Sets mode for conversion Geom_SurfaceOfLinearExtrusion to Bezier
|
||||
void SetExtrusionMode (const Standard_Boolean mode);
|
||||
|
||||
//! Returns the Geom_SurfaceOfLinearExtrusion conversion mode.
|
||||
Standard_Boolean GetExtrusionMode() const;
|
||||
|
||||
//! Sets mode for conversion Geom_BSplineSurface to Bezier
|
||||
void SetBSplineMode (const Standard_Boolean mode);
|
||||
|
||||
//! Returns the Geom_BSplineSurface conversion mode.
|
||||
Standard_Boolean GetBSplineMode() const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(ShapeUpgrade_ConvertSurfaceToBezierBasis,ShapeUpgrade_SplitSurface)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Handle(ShapeExtend_CompositeSurface) mySegments;
|
||||
Standard_Boolean myPlaneMode;
|
||||
Standard_Boolean myRevolutionMode;
|
||||
Standard_Boolean myExtrusionMode;
|
||||
Standard_Boolean myBSplineMode;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#include <ShapeUpgrade_ConvertSurfaceToBezierBasis.lxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _ShapeUpgrade_ConvertSurfaceToBezierBasis_HeaderFile
|
@@ -1,80 +0,0 @@
|
||||
-- Created on: 2000-05-24
|
||||
-- Created by: data exchange team
|
||||
-- Copyright (c) 2000-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class EdgeDivide from ShapeUpgrade inherits Tool from ShapeUpgrade
|
||||
|
||||
---Purpose:
|
||||
|
||||
uses
|
||||
|
||||
Edge from TopoDS,
|
||||
Face from TopoDS,
|
||||
HSequenceOfReal from TColStd,
|
||||
SplitCurve3d from ShapeUpgrade,
|
||||
SplitCurve2d from ShapeUpgrade
|
||||
|
||||
is
|
||||
|
||||
Create returns EdgeDivide from ShapeUpgrade;
|
||||
---Purpose: Empty constructor
|
||||
|
||||
Clear (me: mutable);
|
||||
|
||||
SetFace(me: mutable; F: Face from TopoDS);
|
||||
---C++: inline
|
||||
---Purpose: Sets supporting surface by face
|
||||
|
||||
Compute(me: mutable; E: Edge from TopoDS)
|
||||
returns Boolean is virtual;
|
||||
|
||||
HasCurve2d(me) returns Boolean;
|
||||
---C++: inline
|
||||
|
||||
HasCurve3d(me) returns Boolean;
|
||||
---C++: inline
|
||||
|
||||
Knots2d(me) returns HSequenceOfReal from TColStd;
|
||||
---C++: inline
|
||||
|
||||
Knots3d(me) returns HSequenceOfReal from TColStd;
|
||||
---C++: inline
|
||||
|
||||
SetSplitCurve2dTool(me: mutable; splitCurve2dTool: SplitCurve2d from ShapeUpgrade);
|
||||
---Purpose: Sets the tool for splitting pcurves.
|
||||
|
||||
SetSplitCurve3dTool(me: mutable; splitCurve3dTool: SplitCurve3d from ShapeUpgrade);
|
||||
---Purpose: Sets the tool for splitting 3D curves.
|
||||
|
||||
GetSplitCurve2dTool(me) returns SplitCurve2d from ShapeUpgrade
|
||||
is virtual;
|
||||
---Purpose: Returns the tool for splitting pcurves.
|
||||
|
||||
GetSplitCurve3dTool(me) returns SplitCurve3d from ShapeUpgrade
|
||||
is virtual;
|
||||
---Purpose: Returns the tool for splitting 3D curves.
|
||||
---Remark: here TopoDS_Edge can be used to transfer some specific information (tolerance, etc)
|
||||
|
||||
fields
|
||||
|
||||
myFace : Face from TopoDS is protected;
|
||||
myHasCurve2d: Boolean is protected;
|
||||
myHasCurve3d: Boolean is protected;
|
||||
myKnots2d : HSequenceOfReal from TColStd is protected;
|
||||
myKnots3d : HSequenceOfReal from TColStd is protected;
|
||||
|
||||
mySplitCurve3dTool: SplitCurve3d from ShapeUpgrade;
|
||||
mySplitCurve2dTool: SplitCurve2d from ShapeUpgrade;
|
||||
|
||||
end EdgeDivide;
|
@@ -13,15 +13,20 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <ShapeUpgrade_EdgeDivide.ixx>
|
||||
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <ShapeAnalysis_Edge.hxx>
|
||||
#include <ShapeUpgrade_EdgeDivide.hxx>
|
||||
#include <ShapeUpgrade_SplitCurve2d.hxx>
|
||||
#include <ShapeUpgrade_SplitCurve3d.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <TopoDS_Face.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : ShapeUpgrade_EdgeDivide
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
ShapeUpgrade_EdgeDivide::ShapeUpgrade_EdgeDivide():
|
||||
ShapeUpgrade_Tool()
|
||||
{
|
||||
|
103
src/ShapeUpgrade/ShapeUpgrade_EdgeDivide.hxx
Normal file
103
src/ShapeUpgrade/ShapeUpgrade_EdgeDivide.hxx
Normal file
@@ -0,0 +1,103 @@
|
||||
// Created on: 2000-05-24
|
||||
// Created by: data exchange team
|
||||
// Copyright (c) 2000-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _ShapeUpgrade_EdgeDivide_HeaderFile
|
||||
#define _ShapeUpgrade_EdgeDivide_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <TopoDS_Face.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <TColStd_HSequenceOfReal.hxx>
|
||||
#include <ShapeUpgrade_Tool.hxx>
|
||||
class ShapeUpgrade_SplitCurve3d;
|
||||
class ShapeUpgrade_SplitCurve2d;
|
||||
class TopoDS_Face;
|
||||
class TopoDS_Edge;
|
||||
|
||||
|
||||
class ShapeUpgrade_EdgeDivide;
|
||||
DEFINE_STANDARD_HANDLE(ShapeUpgrade_EdgeDivide, ShapeUpgrade_Tool)
|
||||
|
||||
|
||||
class ShapeUpgrade_EdgeDivide : public ShapeUpgrade_Tool
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Empty constructor
|
||||
Standard_EXPORT ShapeUpgrade_EdgeDivide();
|
||||
|
||||
Standard_EXPORT void Clear();
|
||||
|
||||
//! Sets supporting surface by face
|
||||
void SetFace (const TopoDS_Face& F);
|
||||
|
||||
Standard_EXPORT virtual Standard_Boolean Compute (const TopoDS_Edge& E);
|
||||
|
||||
Standard_Boolean HasCurve2d() const;
|
||||
|
||||
Standard_Boolean HasCurve3d() const;
|
||||
|
||||
Handle(TColStd_HSequenceOfReal) Knots2d() const;
|
||||
|
||||
Handle(TColStd_HSequenceOfReal) Knots3d() const;
|
||||
|
||||
//! Sets the tool for splitting pcurves.
|
||||
Standard_EXPORT void SetSplitCurve2dTool (const Handle(ShapeUpgrade_SplitCurve2d)& splitCurve2dTool);
|
||||
|
||||
//! Sets the tool for splitting 3D curves.
|
||||
Standard_EXPORT void SetSplitCurve3dTool (const Handle(ShapeUpgrade_SplitCurve3d)& splitCurve3dTool);
|
||||
|
||||
//! Returns the tool for splitting pcurves.
|
||||
Standard_EXPORT virtual Handle(ShapeUpgrade_SplitCurve2d) GetSplitCurve2dTool() const;
|
||||
|
||||
//! Returns the tool for splitting 3D curves.
|
||||
Standard_EXPORT virtual Handle(ShapeUpgrade_SplitCurve3d) GetSplitCurve3dTool() const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(ShapeUpgrade_EdgeDivide,ShapeUpgrade_Tool)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
TopoDS_Face myFace;
|
||||
Standard_Boolean myHasCurve2d;
|
||||
Standard_Boolean myHasCurve3d;
|
||||
Handle(TColStd_HSequenceOfReal) myKnots2d;
|
||||
Handle(TColStd_HSequenceOfReal) myKnots3d;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Handle(ShapeUpgrade_SplitCurve3d) mySplitCurve3dTool;
|
||||
Handle(ShapeUpgrade_SplitCurve2d) mySplitCurve2dTool;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#include <ShapeUpgrade_EdgeDivide.lxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _ShapeUpgrade_EdgeDivide_HeaderFile
|
@@ -1,115 +0,0 @@
|
||||
-- Created on: 1998-02-18
|
||||
-- Created by: Pierre BARRAS
|
||||
-- Copyright (c) 1998-1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class FaceDivide from ShapeUpgrade
|
||||
|
||||
inherits Tool from ShapeUpgrade
|
||||
---Purpose: Divides a Face (both edges in the wires, by splitting
|
||||
-- curves and pcurves, and the face itself, by splitting
|
||||
-- supporting surface) according to splitting criteria.
|
||||
-- * The domain of the face to divide is defined by the PCurves
|
||||
-- of the wires on the Face.
|
||||
--
|
||||
-- * all the PCurves are supposed to be defined (in the parametric
|
||||
-- space of the supporting surface).
|
||||
--
|
||||
-- The result is available after the call to the Build method.
|
||||
-- It is a Shell containing all the resulting Faces.
|
||||
--
|
||||
-- All the modifications made during splitting are recorded in the
|
||||
-- external context (ShapeBuild_ReShape).
|
||||
|
||||
uses
|
||||
Face from TopoDS,
|
||||
Shape from TopoDS,
|
||||
Status from ShapeExtend,
|
||||
SplitSurface from ShapeUpgrade,
|
||||
WireDivide from ShapeUpgrade
|
||||
|
||||
|
||||
is
|
||||
|
||||
Create returns FaceDivide from ShapeUpgrade;
|
||||
---Purpose: Creates empty constructor.
|
||||
|
||||
Create (F : Face from TopoDS)
|
||||
returns FaceDivide from ShapeUpgrade;
|
||||
--- Purpose : Initialize by a Face.
|
||||
|
||||
Init (me: mutable; F : Face from TopoDS);
|
||||
---Purpose: Initialize by a Face.
|
||||
|
||||
SetSurfaceSegmentMode(me: mutable; Segment: Boolean);
|
||||
---Purpose: Purpose sets mode for trimming (segment) surface by
|
||||
-- wire UV bounds.
|
||||
|
||||
Perform (me: mutable)
|
||||
returns Boolean is virtual;
|
||||
---Purpose: Performs splitting and computes the resulting shell
|
||||
-- The context is used to keep track of former splittings
|
||||
-- in order to keep sharings. It is updated according to
|
||||
-- modifications made.
|
||||
SplitSurface (me: mutable)
|
||||
returns Boolean is virtual;
|
||||
---Purpose: Performs splitting of surface and computes the shell
|
||||
-- from source face.
|
||||
|
||||
SplitCurves (me: mutable)
|
||||
returns Boolean is virtual;
|
||||
---Purpose: Performs splitting of curves of all the edges in the
|
||||
-- shape and divides these edges.
|
||||
|
||||
Result (me) returns Shape from TopoDS;
|
||||
---Purpose: Gives the resulting Shell, or Face, or Null shape if not done.
|
||||
|
||||
Status (me; status: Status from ShapeExtend) returns Boolean;
|
||||
---Purpose: Queries the status of last call to Perform
|
||||
-- OK : no splitting was done (or no call to Perform)
|
||||
-- DONE1: some edges were splitted
|
||||
-- DONE2: surface was splitted
|
||||
-- DONE3: surface was modified without splitting
|
||||
-- FAIL1: some fails encountered during splitting wires
|
||||
-- FAIL2: face cannot be splitted
|
||||
|
||||
---Level: Internal
|
||||
|
||||
SetSplitSurfaceTool (me: mutable; splitSurfaceTool: SplitSurface from ShapeUpgrade);
|
||||
---Purpose: Sets the tool for splitting surfaces.
|
||||
|
||||
SetWireDivideTool (me: mutable; wireDivideTool: WireDivide from ShapeUpgrade);
|
||||
---Purpose: Sets the tool for dividing edges on Face.
|
||||
|
||||
GetSplitSurfaceTool (me) returns SplitSurface from ShapeUpgrade
|
||||
is virtual;
|
||||
---Purpose: Returns the tool for splitting surfaces.
|
||||
-- This tool must be already initialized.
|
||||
|
||||
GetWireDivideTool (me) returns WireDivide from ShapeUpgrade
|
||||
is virtual;
|
||||
---Purpose: Returns the tool for dividing edges on Face.
|
||||
-- This tool must be already initialized.
|
||||
|
||||
fields
|
||||
|
||||
mySplitSurfaceTool: SplitSurface from ShapeUpgrade;
|
||||
myWireDivideTool : WireDivide from ShapeUpgrade;
|
||||
myFace : Face from TopoDS is protected;
|
||||
myResult : Shape from TopoDS is protected;
|
||||
mySegmentMode: Boolean is protected;
|
||||
myStatus : Integer is protected;
|
||||
|
||||
end;
|
||||
|
@@ -16,30 +16,34 @@
|
||||
|
||||
// gka 01.06.99 S4205: changing order of splitting surface/curves for converting to bezier
|
||||
|
||||
#include <ShapeUpgrade_FaceDivide.ixx>
|
||||
#include <Precision.hxx>
|
||||
#include <ShapeExtend.hxx>
|
||||
#include <ShapeBuild_Edge.hxx>
|
||||
#include <Bnd_Box2d.hxx>
|
||||
#include <BRep_Builder.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <TopoDS_Vertex.hxx>
|
||||
#include <TopoDS_Iterator.hxx>
|
||||
#include <ShapeFix_ComposeShell.hxx>
|
||||
#include <BRepTools.hxx>
|
||||
#include <ShapeExtend_CompositeSurface.hxx>
|
||||
#include <TopExp_Explorer.hxx>
|
||||
#include <Bnd_Box2d.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <ShapeAnalysis.hxx>
|
||||
#include <ShapeAnalysis_Edge.hxx>
|
||||
#include <ShapeBuild_Edge.hxx>
|
||||
#include <ShapeBuild_ReShape.hxx>
|
||||
#include <ShapeExtend.hxx>
|
||||
#include <ShapeExtend_CompositeSurface.hxx>
|
||||
#include <ShapeFix_ComposeShell.hxx>
|
||||
#include <ShapeUpgrade_FaceDivide.hxx>
|
||||
#include <ShapeUpgrade_SplitSurface.hxx>
|
||||
#include <ShapeUpgrade_WireDivide.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TopExp_Explorer.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <TopoDS_Face.hxx>
|
||||
#include <TopoDS_Iterator.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <TopoDS_Vertex.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : ShapeUpgrade_FaceDivide
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
ShapeUpgrade_FaceDivide::ShapeUpgrade_FaceDivide():
|
||||
ShapeUpgrade_Tool(), myStatus(0)
|
||||
{
|
||||
|
140
src/ShapeUpgrade/ShapeUpgrade_FaceDivide.hxx
Normal file
140
src/ShapeUpgrade/ShapeUpgrade_FaceDivide.hxx
Normal file
@@ -0,0 +1,140 @@
|
||||
// Created on: 1998-02-18
|
||||
// Created by: Pierre BARRAS
|
||||
// Copyright (c) 1998-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _ShapeUpgrade_FaceDivide_HeaderFile
|
||||
#define _ShapeUpgrade_FaceDivide_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <TopoDS_Face.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <ShapeUpgrade_Tool.hxx>
|
||||
#include <ShapeExtend_Status.hxx>
|
||||
class ShapeUpgrade_SplitSurface;
|
||||
class ShapeUpgrade_WireDivide;
|
||||
class TopoDS_Face;
|
||||
class TopoDS_Shape;
|
||||
|
||||
|
||||
class ShapeUpgrade_FaceDivide;
|
||||
DEFINE_STANDARD_HANDLE(ShapeUpgrade_FaceDivide, ShapeUpgrade_Tool)
|
||||
|
||||
//! Divides a Face (both edges in the wires, by splitting
|
||||
//! curves and pcurves, and the face itself, by splitting
|
||||
//! supporting surface) according to splitting criteria.
|
||||
//! * The domain of the face to divide is defined by the PCurves
|
||||
//! of the wires on the Face.
|
||||
//!
|
||||
//! * all the PCurves are supposed to be defined (in the parametric
|
||||
//! space of the supporting surface).
|
||||
//!
|
||||
//! The result is available after the call to the Build method.
|
||||
//! It is a Shell containing all the resulting Faces.
|
||||
//!
|
||||
//! All the modifications made during splitting are recorded in the
|
||||
//! external context (ShapeBuild_ReShape).
|
||||
class ShapeUpgrade_FaceDivide : public ShapeUpgrade_Tool
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Creates empty constructor.
|
||||
Standard_EXPORT ShapeUpgrade_FaceDivide();
|
||||
|
||||
//! Initialize by a Face.
|
||||
Standard_EXPORT ShapeUpgrade_FaceDivide(const TopoDS_Face& F);
|
||||
|
||||
//! Initialize by a Face.
|
||||
Standard_EXPORT void Init (const TopoDS_Face& F);
|
||||
|
||||
//! Purpose sets mode for trimming (segment) surface by
|
||||
//! wire UV bounds.
|
||||
Standard_EXPORT void SetSurfaceSegmentMode (const Standard_Boolean Segment);
|
||||
|
||||
//! Performs splitting and computes the resulting shell
|
||||
//! The context is used to keep track of former splittings
|
||||
//! in order to keep sharings. It is updated according to
|
||||
//! modifications made.
|
||||
Standard_EXPORT virtual Standard_Boolean Perform();
|
||||
|
||||
//! Performs splitting of surface and computes the shell
|
||||
//! from source face.
|
||||
Standard_EXPORT virtual Standard_Boolean SplitSurface();
|
||||
|
||||
//! Performs splitting of curves of all the edges in the
|
||||
//! shape and divides these edges.
|
||||
Standard_EXPORT virtual Standard_Boolean SplitCurves();
|
||||
|
||||
//! Gives the resulting Shell, or Face, or Null shape if not done.
|
||||
Standard_EXPORT TopoDS_Shape Result() const;
|
||||
|
||||
//! Queries the status of last call to Perform
|
||||
//! OK : no splitting was done (or no call to Perform)
|
||||
//! DONE1: some edges were splitted
|
||||
//! DONE2: surface was splitted
|
||||
//! DONE3: surface was modified without splitting
|
||||
//! FAIL1: some fails encountered during splitting wires
|
||||
//! FAIL2: face cannot be splitted
|
||||
Standard_EXPORT Standard_Boolean Status (const ShapeExtend_Status status) const;
|
||||
|
||||
//! Sets the tool for splitting surfaces.
|
||||
Standard_EXPORT void SetSplitSurfaceTool (const Handle(ShapeUpgrade_SplitSurface)& splitSurfaceTool);
|
||||
|
||||
//! Sets the tool for dividing edges on Face.
|
||||
Standard_EXPORT void SetWireDivideTool (const Handle(ShapeUpgrade_WireDivide)& wireDivideTool);
|
||||
|
||||
//! Returns the tool for splitting surfaces.
|
||||
//! This tool must be already initialized.
|
||||
Standard_EXPORT virtual Handle(ShapeUpgrade_SplitSurface) GetSplitSurfaceTool() const;
|
||||
|
||||
//! Returns the tool for dividing edges on Face.
|
||||
//! This tool must be already initialized.
|
||||
Standard_EXPORT virtual Handle(ShapeUpgrade_WireDivide) GetWireDivideTool() const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(ShapeUpgrade_FaceDivide,ShapeUpgrade_Tool)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
TopoDS_Face myFace;
|
||||
TopoDS_Shape myResult;
|
||||
Standard_Boolean mySegmentMode;
|
||||
Standard_Integer myStatus;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Handle(ShapeUpgrade_SplitSurface) mySplitSurfaceTool;
|
||||
Handle(ShapeUpgrade_WireDivide) myWireDivideTool;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _ShapeUpgrade_FaceDivide_HeaderFile
|
@@ -1,43 +0,0 @@
|
||||
-- Created on: 2006-08-07
|
||||
-- Created by: Galina KULIKOVA
|
||||
-- Copyright (c) 2006-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class FaceDivideArea from ShapeUpgrade inherits FaceDivide from ShapeUpgrade
|
||||
|
||||
---Purpose: Divides face by max area criterium.
|
||||
|
||||
uses
|
||||
Face from TopoDS
|
||||
|
||||
is
|
||||
|
||||
Create returns FaceDivideArea from ShapeUpgrade;
|
||||
---Purpose: Creates empty constructor.
|
||||
|
||||
Create (F : Face from TopoDS) returns FaceDivideArea from ShapeUpgrade;
|
||||
|
||||
Perform (me: mutable) returns Boolean is redefined;
|
||||
---Purpose: Performs splitting and computes the resulting shell
|
||||
-- The context is used to keep track of former splittings
|
||||
|
||||
MaxArea(me: mutable) returns Real;
|
||||
---C++: inline
|
||||
---C++: return &
|
||||
---Purpose:Set max area allowed for faces
|
||||
|
||||
fields
|
||||
|
||||
myMaxArea : Real;
|
||||
|
||||
end FaceDivideArea;
|
@@ -11,23 +11,25 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <ShapeUpgrade_FaceDivideArea.ixx>
|
||||
#include <GProp_GProps.hxx>
|
||||
#include <BRepGProp.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <ShapeUpgrade_SplitSurfaceArea.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <TopExp_Explorer.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
#include <ShapeExtend.hxx>
|
||||
#include <ShapeBuild_ReShape.hxx>
|
||||
|
||||
#include <BRep_Builder.hxx>
|
||||
#include <BRepGProp.hxx>
|
||||
#include <GProp_GProps.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <ShapeBuild_ReShape.hxx>
|
||||
#include <ShapeExtend.hxx>
|
||||
#include <ShapeUpgrade_FaceDivideArea.hxx>
|
||||
#include <ShapeUpgrade_SplitSurfaceArea.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TopExp_Explorer.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopoDS_Face.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : ShapeUpgrade_FaceDivideArea
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
ShapeUpgrade_FaceDivideArea::ShapeUpgrade_FaceDivideArea()
|
||||
{
|
||||
myMaxArea = Precision::Infinite();
|
||||
|
75
src/ShapeUpgrade/ShapeUpgrade_FaceDivideArea.hxx
Normal file
75
src/ShapeUpgrade/ShapeUpgrade_FaceDivideArea.hxx
Normal file
@@ -0,0 +1,75 @@
|
||||
// Created on: 2006-08-07
|
||||
// Created by: Galina KULIKOVA
|
||||
// Copyright (c) 2006-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _ShapeUpgrade_FaceDivideArea_HeaderFile
|
||||
#define _ShapeUpgrade_FaceDivideArea_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Standard_Real.hxx>
|
||||
#include <ShapeUpgrade_FaceDivide.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class TopoDS_Face;
|
||||
|
||||
|
||||
class ShapeUpgrade_FaceDivideArea;
|
||||
DEFINE_STANDARD_HANDLE(ShapeUpgrade_FaceDivideArea, ShapeUpgrade_FaceDivide)
|
||||
|
||||
//! Divides face by max area criterium.
|
||||
class ShapeUpgrade_FaceDivideArea : public ShapeUpgrade_FaceDivide
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Creates empty constructor.
|
||||
Standard_EXPORT ShapeUpgrade_FaceDivideArea();
|
||||
|
||||
Standard_EXPORT ShapeUpgrade_FaceDivideArea(const TopoDS_Face& F);
|
||||
|
||||
//! Performs splitting and computes the resulting shell
|
||||
//! The context is used to keep track of former splittings
|
||||
Standard_EXPORT virtual Standard_Boolean Perform() Standard_OVERRIDE;
|
||||
|
||||
//! Set max area allowed for faces
|
||||
Standard_Real& MaxArea();
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(ShapeUpgrade_FaceDivideArea,ShapeUpgrade_FaceDivide)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Standard_Real myMaxArea;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#include <ShapeUpgrade_FaceDivideArea.lxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _ShapeUpgrade_FaceDivideArea_HeaderFile
|
@@ -1,47 +0,0 @@
|
||||
-- Created on: 2000-06-07
|
||||
-- Created by: Galina KULIKOVA
|
||||
-- Copyright (c) 2000-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class FixSmallBezierCurves from ShapeUpgrade inherits FixSmallCurves from ShapeUpgrade
|
||||
|
||||
---Purpose:
|
||||
|
||||
uses
|
||||
|
||||
--HArray1OfCurve from TColGeom,
|
||||
--HArray1OfCurve from TColGeom2d,
|
||||
--HSequenceOfReal from TColStd,
|
||||
Edge from TopoDS,
|
||||
Face from TopoDS,
|
||||
Curve from Geom,
|
||||
Curve from Geom2d,
|
||||
Status from ShapeExtend
|
||||
is
|
||||
|
||||
Create returns FixSmallBezierCurves from ShapeUpgrade;
|
||||
---Purpose :
|
||||
|
||||
Approx(me : mutable; Curve3d : out Curve from Geom;
|
||||
Curve2d : out Curve from Geom2d;
|
||||
Curve2dR : out Curve from Geom2d;
|
||||
First, Last : in out Real) returns Boolean is redefined;
|
||||
--Perform(me : mutable; theSegments3d :in out HArray1OfCurve from TColGeom;
|
||||
-- theKnots3d : in out HSequenceOfReal from TColStd;
|
||||
-- theSegments2d :in out HArray1OfCurve from TColGeom2d;
|
||||
-- theKnots2d : in out HSequenceOfReal from TColStd) returns Boolean is redefined;
|
||||
---Purpose :
|
||||
|
||||
|
||||
|
||||
end FixSmallBezierCurves;
|
@@ -13,35 +13,37 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <ShapeUpgrade_FixSmallBezierCurves.ixx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <Geom_BSplineCurve.hxx>
|
||||
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <Geom2d_BSplineCurve.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <ShapeAnalysis_Edge.hxx>
|
||||
#include <TopExp.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <Geom2dConvert_ApproxCurve.hxx>
|
||||
#include <TColGeom_HArray1OfCurve.hxx>
|
||||
#include <ShapeExtend.hxx>
|
||||
#include <TColGeom2d_HArray1OfCurve.hxx>
|
||||
#include <GeomAdaptor_Surface.hxx>
|
||||
#include <Geom_Surface.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <Geom2d_Curve.hxx>
|
||||
#include <Geom2d_TrimmedCurve.hxx>
|
||||
#include <GeomAbs_Shape.hxx>
|
||||
#include <TopLoc_Location.hxx>
|
||||
#include <GeomConvert_ApproxCurve.hxx>
|
||||
#include <Geom2dConvert_ApproxCurve.hxx>
|
||||
#include <Geom_BSplineCurve.hxx>
|
||||
#include <Geom_Curve.hxx>
|
||||
#include <Geom_Surface.hxx>
|
||||
#include <Geom_TrimmedCurve.hxx>
|
||||
#include <GeomConvert_ApproxCurve.hxx>
|
||||
#include <ShapeUpgrade_SplitCurve3d.hxx>
|
||||
#include <ShapeUpgrade_SplitCurve2d.hxx>
|
||||
#include <GeomAbs_Shape.hxx>
|
||||
#include <GeomAdaptor_Surface.hxx>
|
||||
#include <GeomConvert_ApproxCurve.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <ShapeAnalysis_Edge.hxx>
|
||||
#include <ShapeExtend.hxx>
|
||||
#include <ShapeUpgrade_FixSmallBezierCurves.hxx>
|
||||
#include <ShapeUpgrade_SplitCurve2d.hxx>
|
||||
#include <ShapeUpgrade_SplitCurve3d.hxx>
|
||||
#include <Standard_ErrorHandler.hxx>
|
||||
#include <Standard_Failure.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TColGeom2d_HArray1OfCurve.hxx>
|
||||
#include <TColGeom_HArray1OfCurve.hxx>
|
||||
#include <TopExp.hxx>
|
||||
#include <TopLoc_Location.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
|
||||
ShapeUpgrade_FixSmallBezierCurves::ShapeUpgrade_FixSmallBezierCurves()
|
||||
{
|
||||
}
|
||||
|
66
src/ShapeUpgrade/ShapeUpgrade_FixSmallBezierCurves.hxx
Normal file
66
src/ShapeUpgrade/ShapeUpgrade_FixSmallBezierCurves.hxx
Normal file
@@ -0,0 +1,66 @@
|
||||
// Created on: 2000-06-07
|
||||
// Created by: Galina KULIKOVA
|
||||
// Copyright (c) 2000-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _ShapeUpgrade_FixSmallBezierCurves_HeaderFile
|
||||
#define _ShapeUpgrade_FixSmallBezierCurves_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <ShapeUpgrade_FixSmallCurves.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
class Geom_Curve;
|
||||
class Geom2d_Curve;
|
||||
|
||||
|
||||
class ShapeUpgrade_FixSmallBezierCurves;
|
||||
DEFINE_STANDARD_HANDLE(ShapeUpgrade_FixSmallBezierCurves, ShapeUpgrade_FixSmallCurves)
|
||||
|
||||
|
||||
class ShapeUpgrade_FixSmallBezierCurves : public ShapeUpgrade_FixSmallCurves
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Standard_EXPORT ShapeUpgrade_FixSmallBezierCurves();
|
||||
|
||||
Standard_EXPORT virtual Standard_Boolean Approx (Handle(Geom_Curve)& Curve3d, Handle(Geom2d_Curve)& Curve2d, Handle(Geom2d_Curve)& Curve2dR, Standard_Real& First, Standard_Real& Last) Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(ShapeUpgrade_FixSmallBezierCurves,ShapeUpgrade_FixSmallCurves)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _ShapeUpgrade_FixSmallBezierCurves_HeaderFile
|
@@ -1,77 +0,0 @@
|
||||
-- Created on: 2000-06-07
|
||||
-- Created by: Galina KULIKOVA
|
||||
-- Copyright (c) 2000-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class FixSmallCurves from ShapeUpgrade inherits Tool from ShapeUpgrade
|
||||
|
||||
---Purpose:
|
||||
|
||||
uses
|
||||
SplitCurve3d from ShapeUpgrade,
|
||||
SplitCurve2d from ShapeUpgrade,
|
||||
--HArray1OfCurve from TColGeom,
|
||||
--HArray1OfCurve from TColGeom2d,
|
||||
--HSequenceOfReal from TColStd,
|
||||
Edge from TopoDS,
|
||||
Face from TopoDS,
|
||||
Curve from Geom,
|
||||
Curve from Geom2d,
|
||||
Status from ShapeExtend
|
||||
is
|
||||
|
||||
Create returns FixSmallCurves from ShapeUpgrade;
|
||||
---Purpose :
|
||||
--Init(me : mutable; theCurve3d : Curve from Geom; theCurve2d : Curve from Geom2d);
|
||||
Init(me : mutable; theEdge : Edge from TopoDS; theFace : Face from TopoDS);
|
||||
---Purpose :
|
||||
Approx(me : mutable; Curve3d : out Curve from Geom;
|
||||
Curve2d : out Curve from Geom2d;
|
||||
Curve2dR : out Curve from Geom2d;
|
||||
First, Last : in out Real) returns Boolean is virtual;
|
||||
-- theKnots3d : in out HSequenceOfReal from TColStd;
|
||||
-- theSegments2d :in out HArray1OfCurve from TColGeom2d;
|
||||
-- theKnots2d : in out HSequenceOfReal from TColStd) returns Boolean is virtual;
|
||||
---Purpose :
|
||||
SetSplitCurve3dTool(me: mutable; splitCurve3dTool: SplitCurve3d from ShapeUpgrade);
|
||||
---Purpose: Sets the tool for splitting 3D curves.
|
||||
|
||||
SetSplitCurve2dTool(me: mutable; splitCurve2dTool: SplitCurve2d from ShapeUpgrade);
|
||||
---Purpose: Sets the tool for splitting pcurves.
|
||||
|
||||
|
||||
GetSplitCurve3dTool(me) returns SplitCurve3d from ShapeUpgrade
|
||||
is virtual protected;
|
||||
|
||||
GetSplitCurve2dTool(me) returns SplitCurve2d from ShapeUpgrade
|
||||
is virtual protected;
|
||||
|
||||
---Purpose: Returns the tool for splitting pcurves.
|
||||
Status (me; status: Status from ShapeExtend) returns Boolean;
|
||||
---Purpose: Queries the status of last call to Perform
|
||||
-- OK :
|
||||
-- DONE1:
|
||||
-- DONE2:
|
||||
-- FAIL1:
|
||||
|
||||
fields
|
||||
|
||||
myStatus : Integer is protected;
|
||||
mySplitCurve3dTool: SplitCurve3d from ShapeUpgrade is protected;
|
||||
mySplitCurve2dTool: SplitCurve2d from ShapeUpgrade is protected;
|
||||
myEdge : Edge from TopoDS is protected;
|
||||
myFace : Face from TopoDS is protected;
|
||||
--myCurve3d : Curve from Geom;
|
||||
--myCurve2d : Curve from Geom;
|
||||
|
||||
end FixSmallCurves;
|
@@ -13,7 +13,16 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <ShapeUpgrade_FixSmallCurves.ixx>
|
||||
|
||||
#include <Geom2d_Curve.hxx>
|
||||
#include <Geom_Curve.hxx>
|
||||
#include <ShapeUpgrade_FixSmallCurves.hxx>
|
||||
#include <ShapeUpgrade_SplitCurve2d.hxx>
|
||||
#include <ShapeUpgrade_SplitCurve3d.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <TopoDS_Face.hxx>
|
||||
|
||||
//#include <TColGeom_HArray1OfCurve.hxx>
|
||||
//#include <TColStd_HSequenceOfReal.hxx>
|
||||
#//include <TColGeom2d_HArray1OfCurve.hxx>
|
||||
|
99
src/ShapeUpgrade/ShapeUpgrade_FixSmallCurves.hxx
Normal file
99
src/ShapeUpgrade/ShapeUpgrade_FixSmallCurves.hxx
Normal file
@@ -0,0 +1,99 @@
|
||||
// Created on: 2000-06-07
|
||||
// Created by: Galina KULIKOVA
|
||||
// Copyright (c) 2000-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _ShapeUpgrade_FixSmallCurves_HeaderFile
|
||||
#define _ShapeUpgrade_FixSmallCurves_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <TopoDS_Face.hxx>
|
||||
#include <ShapeUpgrade_Tool.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <ShapeExtend_Status.hxx>
|
||||
class ShapeUpgrade_SplitCurve3d;
|
||||
class ShapeUpgrade_SplitCurve2d;
|
||||
class TopoDS_Edge;
|
||||
class TopoDS_Face;
|
||||
class Geom_Curve;
|
||||
class Geom2d_Curve;
|
||||
|
||||
|
||||
class ShapeUpgrade_FixSmallCurves;
|
||||
DEFINE_STANDARD_HANDLE(ShapeUpgrade_FixSmallCurves, ShapeUpgrade_Tool)
|
||||
|
||||
|
||||
class ShapeUpgrade_FixSmallCurves : public ShapeUpgrade_Tool
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Standard_EXPORT ShapeUpgrade_FixSmallCurves();
|
||||
|
||||
Standard_EXPORT void Init (const TopoDS_Edge& theEdge, const TopoDS_Face& theFace);
|
||||
|
||||
Standard_EXPORT virtual Standard_Boolean Approx (Handle(Geom_Curve)& Curve3d, Handle(Geom2d_Curve)& Curve2d, Handle(Geom2d_Curve)& Curve2dR, Standard_Real& First, Standard_Real& Last);
|
||||
|
||||
//! Sets the tool for splitting 3D curves.
|
||||
Standard_EXPORT void SetSplitCurve3dTool (const Handle(ShapeUpgrade_SplitCurve3d)& splitCurve3dTool);
|
||||
|
||||
//! Sets the tool for splitting pcurves.
|
||||
Standard_EXPORT void SetSplitCurve2dTool (const Handle(ShapeUpgrade_SplitCurve2d)& splitCurve2dTool);
|
||||
|
||||
//! Queries the status of last call to Perform
|
||||
//! OK :
|
||||
//! DONE1:
|
||||
//! DONE2:
|
||||
//! FAIL1:
|
||||
Standard_EXPORT Standard_Boolean Status (const ShapeExtend_Status status) const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(ShapeUpgrade_FixSmallCurves,ShapeUpgrade_Tool)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
Standard_EXPORT virtual Handle(ShapeUpgrade_SplitCurve3d) GetSplitCurve3dTool() const;
|
||||
|
||||
//! Returns the tool for splitting pcurves.
|
||||
Standard_EXPORT virtual Handle(ShapeUpgrade_SplitCurve2d) GetSplitCurve2dTool() const;
|
||||
|
||||
Standard_Integer myStatus;
|
||||
Handle(ShapeUpgrade_SplitCurve3d) mySplitCurve3dTool;
|
||||
Handle(ShapeUpgrade_SplitCurve2d) mySplitCurve2dTool;
|
||||
TopoDS_Edge myEdge;
|
||||
TopoDS_Face myFace;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _ShapeUpgrade_FixSmallCurves_HeaderFile
|
@@ -1,101 +0,0 @@
|
||||
-- Created on: 2006-08-10
|
||||
-- Created by: Galina KULIKOVA
|
||||
-- Copyright (c) 2006-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class RemoveInternalWires from ShapeUpgrade inherits Tool from ShapeUpgrade
|
||||
|
||||
---Purpose: Removes all internal wires having area less than specified min area
|
||||
|
||||
uses
|
||||
Shape from TopoDS,
|
||||
SequenceOfShape from TopTools,
|
||||
DataMapOfShapeListOfShape from TopTools,
|
||||
IndexedDataMapOfShapeListOfShape from TopTools,
|
||||
Status from ShapeExtend
|
||||
is
|
||||
Create returns RemoveInternalWires from ShapeUpgrade;
|
||||
---Purpose: Creates empty constructor.
|
||||
|
||||
Create (theShape : Shape from TopoDS) returns RemoveInternalWires from ShapeUpgrade;
|
||||
|
||||
Init (me: mutable; theShape : Shape from TopoDS);
|
||||
---Purpose: Initialize by a Shape.
|
||||
|
||||
Perform (me: mutable) returns Boolean;
|
||||
---Purpose:Removes all internal wires having area less than area specified as minimal allowed area
|
||||
|
||||
Perform (me: mutable; theSeqShapes : SequenceOfShape from TopTools) returns Boolean;
|
||||
---Purpose:If specified sequence of shape contains -
|
||||
-- 1.wires then these wires will be removed if they have area less than allowed min area.
|
||||
-- 2.faces than internal wires from these faces will be removed if they have area less than allowed min area.
|
||||
|
||||
GetResult(me) returns Shape from TopoDS;
|
||||
---C++: inline
|
||||
---Purpose:Get result shape
|
||||
|
||||
MinArea(me: mutable) returns Real;
|
||||
---C++: inline
|
||||
---C++: return &
|
||||
---Purpose:Set min area allowed for holes( all holes having area less than mi area will be removed)
|
||||
|
||||
RemoveFaceMode(me: mutable) returns Boolean;
|
||||
---C++: inline
|
||||
---C++: return &
|
||||
---Purpose:Set mode which manage removing faces which have outer wires consisting only from edges
|
||||
-- belonginig to removed internal wires.
|
||||
---- By default it is equal to true.
|
||||
|
||||
RemovedFaces(me) returns SequenceOfShape from TopTools;
|
||||
---C++: inline
|
||||
---C++: return const &
|
||||
---Purpose:Returns sequence of removed faces.
|
||||
|
||||
RemovedWires(me) returns SequenceOfShape from TopTools;
|
||||
---C++: inline
|
||||
---C++: return const &
|
||||
---Purpose:Returns sequence of removed faces.
|
||||
|
||||
Status(me; theStatus : Status from ShapeExtend) returns Boolean;
|
||||
---C++: inline
|
||||
---Purpose:Queries status of last call to Perform()
|
||||
-- : OK - nothing was done
|
||||
-- :DONE1 - internal wires were removed
|
||||
-- :DONE2 - small faces were removed.
|
||||
-- :FAIL1 - initial shape is not specified
|
||||
-- :FAIL2 - specified sub-shape is not belonged to inotial shape.
|
||||
|
||||
removeSmallWire (me:mutable;theFace: Shape from TopoDS; theWire : Shape from TopoDS) is private;
|
||||
---Purpose:Removes internal wires having area of contour less than specified MinArea
|
||||
|
||||
removeSmallFaces(me:mutable) is private;
|
||||
---Purpose:Removes faces having outer wire consisting
|
||||
-- from removed edges(belonging small internal wires)
|
||||
|
||||
Clear(me:mutable)is protected;
|
||||
---Purpose:Clear all sequences and temporary map;
|
||||
|
||||
|
||||
fields
|
||||
|
||||
myShape : Shape from TopoDS;
|
||||
myResult : Shape from TopoDS;
|
||||
myMinArea : Real;
|
||||
myRemoveFacesMode : Boolean;
|
||||
myEdgeFaces : IndexedDataMapOfShapeListOfShape from TopTools;--map of containing all edges and corresponding them edges
|
||||
myRemoveEdges : DataMapOfShapeListOfShape from TopTools;
|
||||
myRemovedFaces : SequenceOfShape from TopTools;
|
||||
myStatus: Integer is protected;
|
||||
myRemoveWires : SequenceOfShape from TopTools;
|
||||
|
||||
end RemoveInternalWires;
|
@@ -11,30 +11,32 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <ShapeUpgrade_RemoveInternalWires.ixx>
|
||||
#include <TopExp_Explorer.hxx>
|
||||
#include <TopExp.hxx>
|
||||
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
|
||||
#include <TopTools_ListOfShape.hxx>
|
||||
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
||||
#include <TopoDS_Face.hxx>
|
||||
#include <TopoDS_Wire.hxx>
|
||||
#include <TopoDS_Iterator.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
#include <ShapeAnalysis.hxx>
|
||||
#include <ShapeExtend.hxx>
|
||||
#include <TopTools_SequenceOfShape.hxx>
|
||||
#include <ShapeExtend_WireData.hxx>
|
||||
#include <ShapeBuild_ReShape.hxx>
|
||||
|
||||
#include <Precision.hxx>
|
||||
#include <ShapeAnalysis.hxx>
|
||||
#include <ShapeBuild_ReShape.hxx>
|
||||
#include <ShapeExtend.hxx>
|
||||
#include <ShapeExtend_WireData.hxx>
|
||||
#include <ShapeUpgrade_RemoveInternalWires.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TopExp.hxx>
|
||||
#include <TopExp_Explorer.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <TopoDS_Face.hxx>
|
||||
#include <TopoDS_Iterator.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <TopoDS_Wire.hxx>
|
||||
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
|
||||
#include <TopTools_IndexedMapOfShape.hxx>
|
||||
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
||||
#include <TopTools_ListOfShape.hxx>
|
||||
#include <TopTools_SequenceOfShape.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : ShapeUpgrade_RemoveInternalWires
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
ShapeUpgrade_RemoveInternalWires::ShapeUpgrade_RemoveInternalWires()
|
||||
{
|
||||
myMinArea =0.;
|
||||
|
128
src/ShapeUpgrade/ShapeUpgrade_RemoveInternalWires.hxx
Normal file
128
src/ShapeUpgrade/ShapeUpgrade_RemoveInternalWires.hxx
Normal file
@@ -0,0 +1,128 @@
|
||||
// Created on: 2006-08-10
|
||||
// Created by: Galina KULIKOVA
|
||||
// Copyright (c) 2006-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _ShapeUpgrade_RemoveInternalWires_HeaderFile
|
||||
#define _ShapeUpgrade_RemoveInternalWires_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
|
||||
#include <TopTools_DataMapOfShapeListOfShape.hxx>
|
||||
#include <TopTools_SequenceOfShape.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <ShapeUpgrade_Tool.hxx>
|
||||
#include <ShapeExtend_Status.hxx>
|
||||
class TopoDS_Shape;
|
||||
|
||||
|
||||
class ShapeUpgrade_RemoveInternalWires;
|
||||
DEFINE_STANDARD_HANDLE(ShapeUpgrade_RemoveInternalWires, ShapeUpgrade_Tool)
|
||||
|
||||
//! Removes all internal wires having area less than specified min area
|
||||
class ShapeUpgrade_RemoveInternalWires : public ShapeUpgrade_Tool
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Creates empty constructor.
|
||||
Standard_EXPORT ShapeUpgrade_RemoveInternalWires();
|
||||
|
||||
Standard_EXPORT ShapeUpgrade_RemoveInternalWires(const TopoDS_Shape& theShape);
|
||||
|
||||
//! Initialize by a Shape.
|
||||
Standard_EXPORT void Init (const TopoDS_Shape& theShape);
|
||||
|
||||
//! Removes all internal wires having area less than area specified as minimal allowed area
|
||||
Standard_EXPORT Standard_Boolean Perform();
|
||||
|
||||
//! If specified sequence of shape contains -
|
||||
//! 1.wires then these wires will be removed if they have area less than allowed min area.
|
||||
//! 2.faces than internal wires from these faces will be removed if they have area less than allowed min area.
|
||||
Standard_EXPORT Standard_Boolean Perform (const TopTools_SequenceOfShape& theSeqShapes);
|
||||
|
||||
//! Get result shape
|
||||
TopoDS_Shape GetResult() const;
|
||||
|
||||
//! Set min area allowed for holes( all holes having area less than mi area will be removed)
|
||||
Standard_Real& MinArea();
|
||||
|
||||
//! Set mode which manage removing faces which have outer wires consisting only from edges
|
||||
//! belonginig to removed internal wires.
|
||||
//! By default it is equal to true.
|
||||
Standard_Boolean& RemoveFaceMode();
|
||||
|
||||
//! Returns sequence of removed faces.
|
||||
const TopTools_SequenceOfShape& RemovedFaces() const;
|
||||
|
||||
//! Returns sequence of removed faces.
|
||||
const TopTools_SequenceOfShape& RemovedWires() const;
|
||||
|
||||
//! Queries status of last call to Perform()
|
||||
//! : OK - nothing was done
|
||||
//! :DONE1 - internal wires were removed
|
||||
//! :DONE2 - small faces were removed.
|
||||
//! :FAIL1 - initial shape is not specified
|
||||
//! :FAIL2 - specified sub-shape is not belonged to inotial shape.
|
||||
Standard_Boolean Status (const ShapeExtend_Status theStatus) const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(ShapeUpgrade_RemoveInternalWires,ShapeUpgrade_Tool)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
//! Clear all sequences and temporary map;
|
||||
Standard_EXPORT void Clear();
|
||||
|
||||
Standard_Integer myStatus;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
//! Removes internal wires having area of contour less than specified MinArea
|
||||
Standard_EXPORT void removeSmallWire (const TopoDS_Shape& theFace, const TopoDS_Shape& theWire);
|
||||
|
||||
//! Removes faces having outer wire consisting
|
||||
//! from removed edges(belonging small internal wires)
|
||||
Standard_EXPORT void removeSmallFaces();
|
||||
|
||||
TopoDS_Shape myShape;
|
||||
TopoDS_Shape myResult;
|
||||
Standard_Real myMinArea;
|
||||
Standard_Boolean myRemoveFacesMode;
|
||||
TopTools_IndexedDataMapOfShapeListOfShape myEdgeFaces;
|
||||
TopTools_DataMapOfShapeListOfShape myRemoveEdges;
|
||||
TopTools_SequenceOfShape myRemovedFaces;
|
||||
TopTools_SequenceOfShape myRemoveWires;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#include <ShapeUpgrade_RemoveInternalWires.lxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _ShapeUpgrade_RemoveInternalWires_HeaderFile
|
@@ -1,62 +0,0 @@
|
||||
-- Created on: 2002-11-13
|
||||
-- Created by: Galina KULIKOVA
|
||||
-- Copyright (c) 2002-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class RemoveLocations from ShapeUpgrade inherits TShared from MMgt
|
||||
|
||||
---Purpose: Removes all locations sub-shapes of specified shape
|
||||
|
||||
uses
|
||||
ShapeEnum from TopAbs,
|
||||
Shape from TopoDS,
|
||||
MapOfShape from TopTools,
|
||||
DataMapOfShapeShape from TopTools
|
||||
is
|
||||
Create returns RemoveLocations from ShapeUpgrade;
|
||||
---Purpose:Empy constructor
|
||||
|
||||
Remove(me : mutable;theShape : Shape from TopoDS) returns Boolean;
|
||||
---Purpose:Removes all location correspodingly to RemoveLevel.
|
||||
|
||||
MakeNewShape(me : mutable;theShape , theAncShape: Shape from TopoDS;
|
||||
theNewShape:in out Shape from TopoDS;theRemoveLoc : Boolean)
|
||||
returns Boolean is private;
|
||||
|
||||
GetResult(me) returns Shape from TopoDS;
|
||||
---Purpose:Returns shape with removed locatins.
|
||||
---C++: inline
|
||||
|
||||
SetRemoveLevel(me: mutable; theLevel : ShapeEnum from TopAbs);
|
||||
---Purpose:sets level starting with that location will be removed,
|
||||
-- by default TopAbs_SHAPE. In this case locations will be kept for specified shape
|
||||
-- and if specified shape is TopAbs_COMPOUND for sub-shapes of first level.
|
||||
---C++: inline
|
||||
|
||||
RemoveLevel(me) returns ShapeEnum from TopAbs;
|
||||
---Purpose:sets level starting with that location will be removed.Value of level can be set to
|
||||
-- TopAbs_SHAPE,TopAbs_COMPOUND,TopAbs_SOLID,TopAbs_SHELL,TopAbs_FACE.By default TopAbs_SHAPE.
|
||||
-- In this case location will be removed for all shape types for exception of compound.
|
||||
---C++: inline
|
||||
|
||||
|
||||
ModifiedShape (me; theInitShape : Shape from TopoDS) returns Shape from TopoDS;
|
||||
---Purpose: Returns modified shape obtained from initial shape.
|
||||
---C++: inline
|
||||
|
||||
fields
|
||||
myLevelRemoving : ShapeEnum from TopAbs;
|
||||
myShape : Shape from TopoDS;
|
||||
myMapNewShapes : DataMapOfShapeShape from TopTools;
|
||||
|
||||
end RemoveLocations;
|
@@ -11,42 +11,42 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <ShapeUpgrade_RemoveLocations.ixx>
|
||||
#include <TopAbs_ShapeEnum.hxx>
|
||||
#include <TopLoc_Location.hxx>
|
||||
#include <TopoDS_Face.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
#include <Geom_Surface.hxx>
|
||||
#include <BRep_Builder.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <TopoDS_Vertex.hxx>
|
||||
#include <TopExp.hxx>
|
||||
#include <Geom_Curve.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <TopoDS_Iterator.hxx>
|
||||
#include <TopTools_DataMapOfShapeShape.hxx>
|
||||
#include <Geom2d_Curve.hxx>
|
||||
#include <Geom_Geometry.hxx>
|
||||
#include <gp_Trsf.hxx>
|
||||
|
||||
#include <BRep_Builder.hxx>
|
||||
#include <BRep_CurveRepresentation.hxx>
|
||||
#include <BRep_GCurve.hxx>
|
||||
#include <BRep_ListIteratorOfListOfCurveRepresentation.hxx>
|
||||
#include <BRep_TEdge.hxx>
|
||||
#include <BRep_GCurve.hxx>
|
||||
#include <BRep_CurveRepresentation.hxx>
|
||||
#include <TColStd_ListIteratorOfListOfTransient.hxx>
|
||||
#include <TopExp_Explorer.hxx>
|
||||
#include <TColStd_ListOfTransient.hxx>
|
||||
//#include <ShapeUpgrade_DataMapOfShapeListOfTransient.hxx>
|
||||
#include <ShapeBuild_Edge.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <Geom2d_Curve.hxx>
|
||||
#include <Geom_Curve.hxx>
|
||||
#include <Geom_Geometry.hxx>
|
||||
#include <Geom_Plane.hxx>
|
||||
#include <Geom_Surface.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <gp_Trsf.hxx>
|
||||
#include <ShapeBuild_Edge.hxx>
|
||||
#include <ShapeUpgrade_RemoveLocations.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TColStd_ListIteratorOfListOfTransient.hxx>
|
||||
#include <TColStd_ListOfTransient.hxx>
|
||||
#include <TopAbs_ShapeEnum.hxx>
|
||||
#include <TopExp.hxx>
|
||||
#include <TopExp_Explorer.hxx>
|
||||
#include <TopLoc_Location.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <TopoDS_Face.hxx>
|
||||
#include <TopoDS_Iterator.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <TopoDS_Vertex.hxx>
|
||||
#include <TopTools_DataMapOfShapeShape.hxx>
|
||||
|
||||
//#include <ShapeUpgrade_DataMapOfShapeListOfTransient.hxx>
|
||||
//=======================================================================
|
||||
//function : ShapeUpgrade_RemoveLocations
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
ShapeUpgrade_RemoveLocations::ShapeUpgrade_RemoveLocations()
|
||||
{
|
||||
myLevelRemoving = TopAbs_SHAPE;
|
||||
|
91
src/ShapeUpgrade/ShapeUpgrade_RemoveLocations.hxx
Normal file
91
src/ShapeUpgrade/ShapeUpgrade_RemoveLocations.hxx
Normal file
@@ -0,0 +1,91 @@
|
||||
// Created on: 2002-11-13
|
||||
// Created by: Galina KULIKOVA
|
||||
// Copyright (c) 2002-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _ShapeUpgrade_RemoveLocations_HeaderFile
|
||||
#define _ShapeUpgrade_RemoveLocations_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <TopAbs_ShapeEnum.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <TopTools_DataMapOfShapeShape.hxx>
|
||||
#include <MMgt_TShared.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class TopoDS_Shape;
|
||||
|
||||
|
||||
class ShapeUpgrade_RemoveLocations;
|
||||
DEFINE_STANDARD_HANDLE(ShapeUpgrade_RemoveLocations, MMgt_TShared)
|
||||
|
||||
//! Removes all locations sub-shapes of specified shape
|
||||
class ShapeUpgrade_RemoveLocations : public MMgt_TShared
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Empy constructor
|
||||
Standard_EXPORT ShapeUpgrade_RemoveLocations();
|
||||
|
||||
//! Removes all location correspodingly to RemoveLevel.
|
||||
Standard_EXPORT Standard_Boolean Remove (const TopoDS_Shape& theShape);
|
||||
|
||||
//! Returns shape with removed locatins.
|
||||
TopoDS_Shape GetResult() const;
|
||||
|
||||
//! sets level starting with that location will be removed,
|
||||
//! by default TopAbs_SHAPE. In this case locations will be kept for specified shape
|
||||
//! and if specified shape is TopAbs_COMPOUND for sub-shapes of first level.
|
||||
void SetRemoveLevel (const TopAbs_ShapeEnum theLevel);
|
||||
|
||||
//! sets level starting with that location will be removed.Value of level can be set to
|
||||
//! TopAbs_SHAPE,TopAbs_COMPOUND,TopAbs_SOLID,TopAbs_SHELL,TopAbs_FACE.By default TopAbs_SHAPE.
|
||||
//! In this case location will be removed for all shape types for exception of compound.
|
||||
TopAbs_ShapeEnum RemoveLevel() const;
|
||||
|
||||
//! Returns modified shape obtained from initial shape.
|
||||
TopoDS_Shape ModifiedShape (const TopoDS_Shape& theInitShape) const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(ShapeUpgrade_RemoveLocations,MMgt_TShared)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Standard_EXPORT Standard_Boolean MakeNewShape (const TopoDS_Shape& theShape, const TopoDS_Shape& theAncShape, TopoDS_Shape& theNewShape, const Standard_Boolean theRemoveLoc);
|
||||
|
||||
TopAbs_ShapeEnum myLevelRemoving;
|
||||
TopoDS_Shape myShape;
|
||||
TopTools_DataMapOfShapeShape myMapNewShapes;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#include <ShapeUpgrade_RemoveLocations.lxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _ShapeUpgrade_RemoveLocations_HeaderFile
|
@@ -1,153 +0,0 @@
|
||||
-- Created on: 1999-05-14
|
||||
-- Created by: Pavel DURANDIN
|
||||
-- Copyright (c) 1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class ShapeConvertToBezier from ShapeUpgrade inherits ShapeDivide from ShapeUpgrade
|
||||
|
||||
---Purpose: API class for performing conversion of 3D, 2D curves to bezier curves
|
||||
-- and surfaces to bezier based surfaces (
|
||||
-- bezier surface,
|
||||
-- surface of revolution based on bezier curve,
|
||||
-- offset surface based on any previous type).
|
||||
|
||||
uses
|
||||
|
||||
Shape from TopoDS,
|
||||
FaceDivide from ShapeUpgrade,
|
||||
Msg from Message
|
||||
|
||||
is
|
||||
|
||||
Create returns ShapeConvertToBezier from ShapeUpgrade;
|
||||
---Purpose: Empty constructor.
|
||||
|
||||
Create (S: Shape from TopoDS)
|
||||
returns ShapeConvertToBezier from ShapeUpgrade;
|
||||
---Purpose: Initialize by a Shape.
|
||||
|
||||
Set2dConversion(me:in out; mode: Boolean);
|
||||
---Purpose: Sets mode for conversion 2D curves to bezier.
|
||||
---C++:inline
|
||||
|
||||
Get2dConversion(me) returns Boolean;
|
||||
---Purpose: Returns the 2D conversion mode.
|
||||
---C++:inline
|
||||
|
||||
Set3dConversion(me: in out; mode: Boolean);
|
||||
---Purpose: Sets mode for conversion 3d curves to bezier.
|
||||
---C++:inline
|
||||
|
||||
Get3dConversion(me) returns Boolean;
|
||||
---Purpose: Returns the 3D conversion mode.
|
||||
---C++:inline
|
||||
|
||||
SetSurfaceConversion(me:in out; mode: Boolean);
|
||||
---Purpose: Sets mode for conversion surfaces curves to
|
||||
-- bezier basis.
|
||||
---C++:inline
|
||||
|
||||
GetSurfaceConversion(me) returns Boolean;
|
||||
---Purpose: Returns the surface conversion mode.
|
||||
---C++:inline
|
||||
|
||||
--Remark: The following "Set.." functions affects only if 3D
|
||||
-- conversion mode is True.
|
||||
|
||||
Set3dLineConversion(me:in out; mode: Boolean);
|
||||
---Purpose: Sets mode for conversion Geom_Line to bezier.
|
||||
---C++:inline
|
||||
|
||||
Get3dLineConversion(me) returns Boolean;
|
||||
---Purpose: Returns the Geom_Line conversion mode.
|
||||
---C++:inline
|
||||
|
||||
Set3dCircleConversion(me:in out; mode: Boolean);
|
||||
---Purpose: Sets mode for conversion Geom_Circle to bezier.
|
||||
---C++:inline
|
||||
|
||||
Get3dCircleConversion(me) returns Boolean;
|
||||
---Purpose: Returns the Geom_Circle conversion mode.
|
||||
---C++:inline
|
||||
|
||||
Set3dConicConversion(me:in out; mode: Boolean);
|
||||
---Purpose: Sets mode for conversion Geom_Conic to bezier.
|
||||
---C++:inline
|
||||
|
||||
Get3dConicConversion(me) returns Boolean;
|
||||
---Purpose: Returns the Geom_Conic conversion mode.
|
||||
---C++:inline
|
||||
|
||||
--Remark: The following "Set.." functions affects only if Surface
|
||||
-- conversion mode is True.
|
||||
|
||||
SetPlaneMode(me: in out; mode: Boolean);
|
||||
---Purpose: Sets mode for conversion Geom_Plane to Bezier
|
||||
---C++: inline
|
||||
|
||||
GetPlaneMode(me) returns Boolean;
|
||||
---Purpose: Returns the Geom_Pline conversion mode.
|
||||
---C++: inline
|
||||
|
||||
SetRevolutionMode(me: in out; mode: Boolean);
|
||||
---Purpose: Sets mode for conversion Geom_SurfaceOfRevolution to Bezier
|
||||
---C++: inline
|
||||
|
||||
GetRevolutionMode(me) returns Boolean;
|
||||
---Purpose: Returns the Geom_SurfaceOfRevolution conversion mode.
|
||||
---C++: inline
|
||||
|
||||
SetExtrusionMode(me: in out; mode: Boolean);
|
||||
---Purpose: Sets mode for conversion Geom_SurfaceOfLinearExtrusion to Bezier
|
||||
---C++: inline
|
||||
|
||||
GetExtrusionMode(me) returns Boolean;
|
||||
---Purpose: Returns the Geom_SurfaceOfLinearExtrusion conversion mode.
|
||||
---C++: inline
|
||||
|
||||
SetBSplineMode(me: in out; mode: Boolean);
|
||||
---Purpose: Sets mode for conversion Geom_BSplineSurface to Bezier
|
||||
---C++: inline
|
||||
|
||||
GetBSplineMode(me) returns Boolean;
|
||||
---Purpose: Returns the Geom_BSplineSurface conversion mode.
|
||||
---C++: inline
|
||||
|
||||
Perform(me: in out; newContext: Boolean = Standard_True)
|
||||
returns Boolean is redefined;
|
||||
---Purpose: Performs converting and computes the resulting shape
|
||||
|
||||
GetSplitFaceTool(me) returns FaceDivide from ShapeUpgrade
|
||||
is redefined protected;
|
||||
---Purpose: Returns the tool for dividing faces.
|
||||
|
||||
GetFaceMsg (me) returns Msg from Message is redefined protected;
|
||||
GetWireMsg (me) returns Msg from Message is redefined protected;
|
||||
GetEdgeMsg (me) returns Msg from Message is redefined protected;
|
||||
---Purpose: Returns a message decsribing modification of a shape.
|
||||
fields
|
||||
|
||||
my2dMode : Boolean;
|
||||
my3dMode : Boolean;
|
||||
mySurfaceMode : Boolean;
|
||||
my3dLineMode : Boolean;
|
||||
my3dCircleMode : Boolean;
|
||||
my3dConicMode : Boolean;
|
||||
myPlaneMode : Boolean;
|
||||
myRevolutionMode: Boolean;
|
||||
myExtrusionMode : Boolean;
|
||||
myBSplineMode : Boolean;
|
||||
myLevel : Integer;
|
||||
|
||||
end ShapeConvertToBezier;
|
@@ -16,43 +16,41 @@
|
||||
|
||||
// 15.06 2000 gka fix against small edges ; merging ends pcurves and 3d curves
|
||||
|
||||
|
||||
#include <ShapeUpgrade_ShapeConvertToBezier.ixx>
|
||||
#include <ShapeUpgrade_WireDivide.hxx>
|
||||
#include <ShapeUpgrade_ConvertCurve3dToBezier.hxx>
|
||||
#include <ShapeUpgrade_ConvertCurve2dToBezier.hxx>
|
||||
#include <TopExp_Explorer.hxx>
|
||||
#include <TopoDS_Face.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
#include <BRep_Builder.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <BRepTools.hxx>
|
||||
#include <Geom2d_BezierCurve.hxx>
|
||||
#include <Geom2d_Curve.hxx>
|
||||
#include <Geom_BezierCurve.hxx>
|
||||
#include <Geom_Curve.hxx>
|
||||
#include <GeomLib.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <Message_Msg.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <ShapeAnalysis_Edge.hxx>
|
||||
#include <ShapeBuild_Edge.hxx>
|
||||
#include <Geom_Curve.hxx>
|
||||
#include <Geom_BezierCurve.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <Geom2d_Curve.hxx>
|
||||
#include <Geom2d_BezierCurve.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <GeomLib.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <ShapeUpgrade_ConvertSurfaceToBezierBasis.hxx>
|
||||
#include <TopExp.hxx>
|
||||
#include <TopExp.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <ShapeFix_Wire.hxx>
|
||||
#include <ShapeExtend_WireData.hxx>
|
||||
#include <ShapeFix_Wire.hxx>
|
||||
#include <ShapeUpgrade_ConvertCurve2dToBezier.hxx>
|
||||
#include <ShapeUpgrade_ConvertCurve3dToBezier.hxx>
|
||||
#include <ShapeUpgrade_ConvertSurfaceToBezierBasis.hxx>
|
||||
#include <ShapeUpgrade_FaceDivide.hxx>
|
||||
#include <ShapeUpgrade_FixSmallBezierCurves.hxx>
|
||||
#include <ShapeUpgrade_ShapeConvertToBezier.hxx>
|
||||
#include <ShapeUpgrade_WireDivide.hxx>
|
||||
#include <TopExp.hxx>
|
||||
#include <TopExp_Explorer.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <TopoDS_Face.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <TopoDS_Vertex.hxx>
|
||||
#include <ShapeUpgrade_FixSmallBezierCurves.hxx>
|
||||
#include <ShapeUpgrade_FixSmallBezierCurves.hxx>
|
||||
#include <ShapeUpgrade_FixSmallBezierCurves.hxx>
|
||||
#include <BRepTools.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : ShapeUpgrade_ShapeConvertToBezier
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
ShapeUpgrade_ShapeConvertToBezier::ShapeUpgrade_ShapeConvertToBezier()
|
||||
{
|
||||
myLevel = 0;
|
||||
|
159
src/ShapeUpgrade/ShapeUpgrade_ShapeConvertToBezier.hxx
Normal file
159
src/ShapeUpgrade/ShapeUpgrade_ShapeConvertToBezier.hxx
Normal file
@@ -0,0 +1,159 @@
|
||||
// Created on: 1999-05-14
|
||||
// Created by: Pavel DURANDIN
|
||||
// Copyright (c) 1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _ShapeUpgrade_ShapeConvertToBezier_HeaderFile
|
||||
#define _ShapeUpgrade_ShapeConvertToBezier_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <ShapeUpgrade_ShapeDivide.hxx>
|
||||
class TopoDS_Shape;
|
||||
class ShapeUpgrade_FaceDivide;
|
||||
class Message_Msg;
|
||||
|
||||
|
||||
//! API class for performing conversion of 3D, 2D curves to bezier curves
|
||||
//! and surfaces to bezier based surfaces (
|
||||
//! bezier surface,
|
||||
//! surface of revolution based on bezier curve,
|
||||
//! offset surface based on any previous type).
|
||||
class ShapeUpgrade_ShapeConvertToBezier : public ShapeUpgrade_ShapeDivide
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Empty constructor.
|
||||
Standard_EXPORT ShapeUpgrade_ShapeConvertToBezier();
|
||||
|
||||
//! Initialize by a Shape.
|
||||
Standard_EXPORT ShapeUpgrade_ShapeConvertToBezier(const TopoDS_Shape& S);
|
||||
|
||||
//! Sets mode for conversion 2D curves to bezier.
|
||||
void Set2dConversion (const Standard_Boolean mode);
|
||||
|
||||
//! Returns the 2D conversion mode.
|
||||
Standard_Boolean Get2dConversion() const;
|
||||
|
||||
//! Sets mode for conversion 3d curves to bezier.
|
||||
void Set3dConversion (const Standard_Boolean mode);
|
||||
|
||||
//! Returns the 3D conversion mode.
|
||||
Standard_Boolean Get3dConversion() const;
|
||||
|
||||
//! Sets mode for conversion surfaces curves to
|
||||
//! bezier basis.
|
||||
void SetSurfaceConversion (const Standard_Boolean mode);
|
||||
|
||||
//! Returns the surface conversion mode.
|
||||
Standard_Boolean GetSurfaceConversion() const;
|
||||
|
||||
//! Sets mode for conversion Geom_Line to bezier.
|
||||
void Set3dLineConversion (const Standard_Boolean mode);
|
||||
|
||||
//! Returns the Geom_Line conversion mode.
|
||||
Standard_Boolean Get3dLineConversion() const;
|
||||
|
||||
//! Sets mode for conversion Geom_Circle to bezier.
|
||||
void Set3dCircleConversion (const Standard_Boolean mode);
|
||||
|
||||
//! Returns the Geom_Circle conversion mode.
|
||||
Standard_Boolean Get3dCircleConversion() const;
|
||||
|
||||
//! Sets mode for conversion Geom_Conic to bezier.
|
||||
void Set3dConicConversion (const Standard_Boolean mode);
|
||||
|
||||
//! Returns the Geom_Conic conversion mode.
|
||||
Standard_Boolean Get3dConicConversion() const;
|
||||
|
||||
//! Sets mode for conversion Geom_Plane to Bezier
|
||||
void SetPlaneMode (const Standard_Boolean mode);
|
||||
|
||||
//! Returns the Geom_Pline conversion mode.
|
||||
Standard_Boolean GetPlaneMode() const;
|
||||
|
||||
//! Sets mode for conversion Geom_SurfaceOfRevolution to Bezier
|
||||
void SetRevolutionMode (const Standard_Boolean mode);
|
||||
|
||||
//! Returns the Geom_SurfaceOfRevolution conversion mode.
|
||||
Standard_Boolean GetRevolutionMode() const;
|
||||
|
||||
//! Sets mode for conversion Geom_SurfaceOfLinearExtrusion to Bezier
|
||||
void SetExtrusionMode (const Standard_Boolean mode);
|
||||
|
||||
//! Returns the Geom_SurfaceOfLinearExtrusion conversion mode.
|
||||
Standard_Boolean GetExtrusionMode() const;
|
||||
|
||||
//! Sets mode for conversion Geom_BSplineSurface to Bezier
|
||||
void SetBSplineMode (const Standard_Boolean mode);
|
||||
|
||||
//! Returns the Geom_BSplineSurface conversion mode.
|
||||
Standard_Boolean GetBSplineMode() const;
|
||||
|
||||
//! Performs converting and computes the resulting shape
|
||||
Standard_EXPORT virtual Standard_Boolean Perform (const Standard_Boolean newContext = Standard_True) Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
//! Returns the tool for dividing faces.
|
||||
Standard_EXPORT virtual Handle(ShapeUpgrade_FaceDivide) GetSplitFaceTool() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT virtual Message_Msg GetFaceMsg() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT virtual Message_Msg GetWireMsg() const Standard_OVERRIDE;
|
||||
|
||||
//! Returns a message decsribing modification of a shape.
|
||||
Standard_EXPORT virtual Message_Msg GetEdgeMsg() const Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Standard_Boolean my2dMode;
|
||||
Standard_Boolean my3dMode;
|
||||
Standard_Boolean mySurfaceMode;
|
||||
Standard_Boolean my3dLineMode;
|
||||
Standard_Boolean my3dCircleMode;
|
||||
Standard_Boolean my3dConicMode;
|
||||
Standard_Boolean myPlaneMode;
|
||||
Standard_Boolean myRevolutionMode;
|
||||
Standard_Boolean myExtrusionMode;
|
||||
Standard_Boolean myBSplineMode;
|
||||
Standard_Integer myLevel;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#include <ShapeUpgrade_ShapeConvertToBezier.lxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _ShapeUpgrade_ShapeConvertToBezier_HeaderFile
|
@@ -1,129 +0,0 @@
|
||||
-- Created on: 1999-04-26
|
||||
-- Created by: Pavel DURANDIN
|
||||
-- Copyright (c) 1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class ShapeDivide from ShapeUpgrade
|
||||
|
||||
---Purpose: Divides a all faces in shell with given criteria Shell.
|
||||
|
||||
uses
|
||||
Shape from TopoDS,
|
||||
Status from ShapeExtend,
|
||||
ReShape from ShapeBuild,
|
||||
FaceDivide from ShapeUpgrade,
|
||||
Msg from Message,
|
||||
Gravity from Message,
|
||||
BasicMsgRegistrator from ShapeExtend
|
||||
|
||||
is
|
||||
Create returns ShapeDivide from ShapeUpgrade;
|
||||
---Purpose:
|
||||
|
||||
Create (S: Shape from TopoDS)
|
||||
returns ShapeDivide from ShapeUpgrade;
|
||||
---Purpose: Initialize by a Shape.
|
||||
|
||||
Init (me: in out; S: Shape from TopoDS);
|
||||
---Purpose: Initialize by a Shape.
|
||||
|
||||
Delete(me:out) is virtual;
|
||||
---C++: alias "Standard_EXPORT virtual ~ShapeUpgrade_ShapeDivide(){Delete();}"
|
||||
|
||||
SetPrecision (me: in out; Prec: Real);
|
||||
---Purpose: Defines the spatial precision used for splitting
|
||||
|
||||
SetMaxTolerance(me: in out; maxtol: Real);
|
||||
---Purpose: Sets maximal allowed tolerance
|
||||
|
||||
SetMinTolerance (me: in out; mintol: Real);
|
||||
---Purpose: Sets minimal allowed tolerance
|
||||
|
||||
SetSurfaceSegmentMode(me: in out; Segment: Boolean);
|
||||
---Purpose: Purpose sets mode for trimming (segment) surface by
|
||||
-- wire UV bounds.
|
||||
|
||||
Perform (me: in out; newContext: Boolean = Standard_True)
|
||||
returns Boolean is virtual;
|
||||
---Purpose: Performs splitting and computes the resulting shape
|
||||
-- If newContext is True (default), the internal context
|
||||
-- will be cleared at start, else previous substitutions
|
||||
-- will be acting.
|
||||
|
||||
Result (me) returns Shape from TopoDS;
|
||||
---Purpose: Gives the resulting Shape, or Null shape if not done.
|
||||
|
||||
GetContext (me) returns ReShape from ShapeBuild;
|
||||
---Purpose: Returns context with all the modifications made during
|
||||
-- last call(s) to Perform() recorded
|
||||
|
||||
SetContext (me: in out; context: ReShape from ShapeBuild);
|
||||
---Purpose: Sets context with recorded modifications to be applied
|
||||
-- during next call(s) to Perform(shape,Standard_False)
|
||||
|
||||
SetMsgRegistrator (me: in out; msgreg: BasicMsgRegistrator from ShapeExtend) is virtual;
|
||||
---Purpose: Sets message registrator
|
||||
|
||||
MsgRegistrator (me) returns BasicMsgRegistrator from ShapeExtend;
|
||||
---Purpose: Returns message registrator
|
||||
|
||||
SendMsg (me; shape : Shape from TopoDS;
|
||||
message: Msg from Message;
|
||||
gravity: Gravity from Message = Message_Info);
|
||||
---Purpose: Sends a message to be attached to the shape.
|
||||
-- Calls corresponding message of message registrator.
|
||||
|
||||
Status (me; status: Status from ShapeExtend) returns Boolean;
|
||||
---Purpose: Queries the status of last call to Perform
|
||||
-- OK : no splitting was done (or no call to Perform)
|
||||
-- DONE1: some edges were splitted
|
||||
-- DONE2: surface was splitted
|
||||
-- FAIL1: some errors occured
|
||||
|
||||
---Level: Internal
|
||||
|
||||
SetSplitFaceTool (me: in out; splitFaceTool: FaceDivide from ShapeUpgrade);
|
||||
---Purpose: Sets the tool for splitting faces.
|
||||
|
||||
GetSplitFaceTool (me) returns FaceDivide from ShapeUpgrade
|
||||
is virtual protected;
|
||||
---Purpose: Returns the tool for splitting faces.
|
||||
|
||||
SetEdgeMode(me: in out; aEdgeMode : Integer);
|
||||
---Purpose:Sets mode for splitting 3d curves from edges.
|
||||
-- 0 - only curve 3d from free edges.
|
||||
-- 1 - only curve 3d from shared edges.
|
||||
-- 2 - all curve 3d.
|
||||
|
||||
GetFaceMsg (me) returns Msg from Message is virtual protected;
|
||||
GetWireMsg (me) returns Msg from Message is virtual protected;
|
||||
GetEdgeMsg (me) returns Msg from Message is virtual protected;
|
||||
---Purpose: Returns a message decsribing modification of a shape.
|
||||
|
||||
fields
|
||||
|
||||
mySplitFaceTool: FaceDivide from ShapeUpgrade;
|
||||
myContext : ReShape from ShapeBuild is protected;
|
||||
myMsgReg : BasicMsgRegistrator from ShapeExtend is protected;
|
||||
myShape : Shape from TopoDS is protected;
|
||||
myResult : Shape from TopoDS is protected;
|
||||
myPrecision : Real is protected;
|
||||
myMinTol : Real is protected;
|
||||
myMaxTol : Real is protected;
|
||||
mySegmentMode: Boolean is protected;
|
||||
myStatus : Integer is protected;
|
||||
myEdgeMode: Integer is protected;
|
||||
|
||||
end ShapeDivide;
|
||||
|
@@ -17,29 +17,31 @@
|
||||
// abv 16.06.99 returning ReShape context; processing shared subshapes in compounds
|
||||
// sln 29.11.01 Bug21: in method Perform(..) nullify location of compound's faces only if mode myConsiderLocation is on
|
||||
|
||||
#include <ShapeUpgrade_ShapeDivide.ixx>
|
||||
#include <Precision.hxx>
|
||||
#include <ShapeExtend.hxx>
|
||||
#include <ShapeBuild_ReShape.hxx>
|
||||
#include <TopExp_Explorer.hxx>
|
||||
#include <TopExp.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <TopoDS_Wire.hxx>
|
||||
#include <TopoDS_Compound.hxx>
|
||||
#include <TopoDS_Iterator.hxx>
|
||||
#include <TopoDS_Vertex.hxx>
|
||||
#include <BRep_Builder.hxx>
|
||||
#include <Message_Msg.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <ShapeBuild_ReShape.hxx>
|
||||
#include <ShapeExtend.hxx>
|
||||
#include <ShapeExtend_BasicMsgRegistrator.hxx>
|
||||
#include <ShapeUpgrade_FaceDivide.hxx>
|
||||
#include <ShapeUpgrade_ShapeDivide.hxx>
|
||||
#include <ShapeUpgrade_WireDivide.hxx>
|
||||
#include <Standard_ErrorHandler.hxx>
|
||||
#include <Standard_Failure.hxx>
|
||||
#include <Message_Msg.hxx>
|
||||
#include <TopExp.hxx>
|
||||
#include <TopExp_Explorer.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopoDS_Compound.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <TopoDS_Iterator.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <TopoDS_Vertex.hxx>
|
||||
#include <TopoDS_Wire.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : ShapeUpgrade_ShapeDivide
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
ShapeUpgrade_ShapeDivide::ShapeUpgrade_ShapeDivide() : myStatus(0)
|
||||
{
|
||||
myPrecision = myMinTol = Precision::Confusion();
|
||||
|
156
src/ShapeUpgrade/ShapeUpgrade_ShapeDivide.hxx
Normal file
156
src/ShapeUpgrade/ShapeUpgrade_ShapeDivide.hxx
Normal file
@@ -0,0 +1,156 @@
|
||||
// Created on: 1999-04-26
|
||||
// Created by: Pavel DURANDIN
|
||||
// Copyright (c) 1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _ShapeUpgrade_ShapeDivide_HeaderFile
|
||||
#define _ShapeUpgrade_ShapeDivide_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Message_Gravity.hxx>
|
||||
#include <ShapeExtend_Status.hxx>
|
||||
class ShapeUpgrade_FaceDivide;
|
||||
class ShapeBuild_ReShape;
|
||||
class ShapeExtend_BasicMsgRegistrator;
|
||||
class TopoDS_Shape;
|
||||
class Message_Msg;
|
||||
|
||||
|
||||
//! Divides a all faces in shell with given criteria Shell.
|
||||
class ShapeUpgrade_ShapeDivide
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
Standard_EXPORT ShapeUpgrade_ShapeDivide();
|
||||
|
||||
//! Initialize by a Shape.
|
||||
Standard_EXPORT ShapeUpgrade_ShapeDivide(const TopoDS_Shape& S);
|
||||
|
||||
//! Initialize by a Shape.
|
||||
Standard_EXPORT void Init (const TopoDS_Shape& S);
|
||||
|
||||
Standard_EXPORT virtual void Delete();
|
||||
Standard_EXPORT virtual ~ShapeUpgrade_ShapeDivide(){Delete();}
|
||||
|
||||
//! Defines the spatial precision used for splitting
|
||||
Standard_EXPORT void SetPrecision (const Standard_Real Prec);
|
||||
|
||||
//! Sets maximal allowed tolerance
|
||||
Standard_EXPORT void SetMaxTolerance (const Standard_Real maxtol);
|
||||
|
||||
//! Sets minimal allowed tolerance
|
||||
Standard_EXPORT void SetMinTolerance (const Standard_Real mintol);
|
||||
|
||||
//! Purpose sets mode for trimming (segment) surface by
|
||||
//! wire UV bounds.
|
||||
Standard_EXPORT void SetSurfaceSegmentMode (const Standard_Boolean Segment);
|
||||
|
||||
//! Performs splitting and computes the resulting shape
|
||||
//! If newContext is True (default), the internal context
|
||||
//! will be cleared at start, else previous substitutions
|
||||
//! will be acting.
|
||||
Standard_EXPORT virtual Standard_Boolean Perform (const Standard_Boolean newContext = Standard_True);
|
||||
|
||||
//! Gives the resulting Shape, or Null shape if not done.
|
||||
Standard_EXPORT TopoDS_Shape Result() const;
|
||||
|
||||
//! Returns context with all the modifications made during
|
||||
//! last call(s) to Perform() recorded
|
||||
Standard_EXPORT Handle(ShapeBuild_ReShape) GetContext() const;
|
||||
|
||||
//! Sets context with recorded modifications to be applied
|
||||
//! during next call(s) to Perform(shape,Standard_False)
|
||||
Standard_EXPORT void SetContext (const Handle(ShapeBuild_ReShape)& context);
|
||||
|
||||
//! Sets message registrator
|
||||
Standard_EXPORT virtual void SetMsgRegistrator (const Handle(ShapeExtend_BasicMsgRegistrator)& msgreg);
|
||||
|
||||
//! Returns message registrator
|
||||
Standard_EXPORT Handle(ShapeExtend_BasicMsgRegistrator) MsgRegistrator() const;
|
||||
|
||||
//! Sends a message to be attached to the shape.
|
||||
//! Calls corresponding message of message registrator.
|
||||
Standard_EXPORT void SendMsg (const TopoDS_Shape& shape, const Message_Msg& message, const Message_Gravity gravity = Message_Info) const;
|
||||
|
||||
//! Queries the status of last call to Perform
|
||||
//! OK : no splitting was done (or no call to Perform)
|
||||
//! DONE1: some edges were splitted
|
||||
//! DONE2: surface was splitted
|
||||
//! FAIL1: some errors occured
|
||||
Standard_EXPORT Standard_Boolean Status (const ShapeExtend_Status status) const;
|
||||
|
||||
//! Sets the tool for splitting faces.
|
||||
Standard_EXPORT void SetSplitFaceTool (const Handle(ShapeUpgrade_FaceDivide)& splitFaceTool);
|
||||
|
||||
//! Sets mode for splitting 3d curves from edges.
|
||||
//! 0 - only curve 3d from free edges.
|
||||
//! 1 - only curve 3d from shared edges.
|
||||
//! 2 - all curve 3d.
|
||||
Standard_EXPORT void SetEdgeMode (const Standard_Integer aEdgeMode);
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
//! Returns the tool for splitting faces.
|
||||
Standard_EXPORT virtual Handle(ShapeUpgrade_FaceDivide) GetSplitFaceTool() const;
|
||||
|
||||
Standard_EXPORT virtual Message_Msg GetFaceMsg() const;
|
||||
|
||||
Standard_EXPORT virtual Message_Msg GetWireMsg() const;
|
||||
|
||||
//! Returns a message decsribing modification of a shape.
|
||||
Standard_EXPORT virtual Message_Msg GetEdgeMsg() const;
|
||||
|
||||
|
||||
Handle(ShapeBuild_ReShape) myContext;
|
||||
Handle(ShapeExtend_BasicMsgRegistrator) myMsgReg;
|
||||
TopoDS_Shape myShape;
|
||||
TopoDS_Shape myResult;
|
||||
Standard_Real myPrecision;
|
||||
Standard_Real myMinTol;
|
||||
Standard_Real myMaxTol;
|
||||
Standard_Boolean mySegmentMode;
|
||||
Standard_Integer myStatus;
|
||||
Standard_Integer myEdgeMode;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Handle(ShapeUpgrade_FaceDivide) mySplitFaceTool;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _ShapeUpgrade_ShapeDivide_HeaderFile
|
@@ -1,45 +0,0 @@
|
||||
-- Created on: 1999-05-06
|
||||
-- Created by: Pavel DURANDIN
|
||||
-- Copyright (c) 1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class ShapeDivideAngle from ShapeUpgrade inherits ShapeDivide from ShapeUpgrade
|
||||
|
||||
---Purpose: Splits all surfaces of revolution, cylindrical, toroidal,
|
||||
-- conical, spherical surfaces in the given shape so that
|
||||
-- each resulting segment covers not more than defined number
|
||||
-- of degrees (to segments less than 90).
|
||||
|
||||
uses
|
||||
|
||||
Shape from TopoDS
|
||||
|
||||
is
|
||||
Create (MaxAngle: Real) returns ShapeDivideAngle from ShapeUpgrade;
|
||||
---Purpose: Empty constructor.
|
||||
|
||||
Create (MaxAngle: Real; S: Shape from TopoDS)
|
||||
returns ShapeDivideAngle from ShapeUpgrade;
|
||||
---Purpose: Initialize by a Shape.
|
||||
|
||||
InitTool (me: in out; MaxAngle: Real);
|
||||
---Purpose: Resets tool for splitting face with given angle
|
||||
|
||||
SetMaxAngle (me: in out; MaxAngle: Real);
|
||||
---Purpose: Set maximal angle (calls InitTool)
|
||||
|
||||
MaxAngle (me) returns Real;
|
||||
---Purpose: Returns maximal angle
|
||||
|
||||
end ShapeDivideAngle;
|
@@ -14,16 +14,17 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <ShapeUpgrade_ShapeDivideAngle.ixx>
|
||||
#include <ShapeUpgrade_SplitSurfaceAngle.hxx>
|
||||
|
||||
#include <ShapeUpgrade_FaceDivide.hxx>
|
||||
#include <ShapeUpgrade_ShapeDivideAngle.hxx>
|
||||
#include <ShapeUpgrade_SplitSurfaceAngle.hxx>
|
||||
#include <ShapeUpgrade_WireDivide.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : ShapeUpgrade_ShapeDivideAngle
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
ShapeUpgrade_ShapeDivideAngle::ShapeUpgrade_ShapeDivideAngle (const Standard_Real MaxAngle)
|
||||
{
|
||||
InitTool ( MaxAngle );
|
||||
|
78
src/ShapeUpgrade/ShapeUpgrade_ShapeDivideAngle.hxx
Normal file
78
src/ShapeUpgrade/ShapeUpgrade_ShapeDivideAngle.hxx
Normal file
@@ -0,0 +1,78 @@
|
||||
// Created on: 1999-05-06
|
||||
// Created by: Pavel DURANDIN
|
||||
// Copyright (c) 1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _ShapeUpgrade_ShapeDivideAngle_HeaderFile
|
||||
#define _ShapeUpgrade_ShapeDivideAngle_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <ShapeUpgrade_ShapeDivide.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
class TopoDS_Shape;
|
||||
|
||||
|
||||
//! Splits all surfaces of revolution, cylindrical, toroidal,
|
||||
//! conical, spherical surfaces in the given shape so that
|
||||
//! each resulting segment covers not more than defined number
|
||||
//! of degrees (to segments less than 90).
|
||||
class ShapeUpgrade_ShapeDivideAngle : public ShapeUpgrade_ShapeDivide
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Empty constructor.
|
||||
Standard_EXPORT ShapeUpgrade_ShapeDivideAngle(const Standard_Real MaxAngle);
|
||||
|
||||
//! Initialize by a Shape.
|
||||
Standard_EXPORT ShapeUpgrade_ShapeDivideAngle(const Standard_Real MaxAngle, const TopoDS_Shape& S);
|
||||
|
||||
//! Resets tool for splitting face with given angle
|
||||
Standard_EXPORT void InitTool (const Standard_Real MaxAngle);
|
||||
|
||||
//! Set maximal angle (calls InitTool)
|
||||
Standard_EXPORT void SetMaxAngle (const Standard_Real MaxAngle);
|
||||
|
||||
//! Returns maximal angle
|
||||
Standard_EXPORT Standard_Real MaxAngle() const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _ShapeUpgrade_ShapeDivideAngle_HeaderFile
|
@@ -1,48 +0,0 @@
|
||||
-- Created on: 2006-08-08
|
||||
-- Created by: Galina KULIKOVA
|
||||
-- Copyright (c) 2006-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class ShapeDivideArea from ShapeUpgrade inherits ShapeDivide from ShapeUpgrade
|
||||
|
||||
---Purpose: Divides faces from sprcified shape by max area criterium.
|
||||
|
||||
uses
|
||||
|
||||
Shape from TopoDS,
|
||||
FaceDivide from ShapeUpgrade
|
||||
|
||||
is
|
||||
Create returns ShapeDivideArea from ShapeUpgrade;
|
||||
---Purpose:
|
||||
|
||||
Create (S: Shape from TopoDS)
|
||||
returns ShapeDivideArea from ShapeUpgrade;
|
||||
---Purpose: Initialize by a Shape.
|
||||
|
||||
GetSplitFaceTool (me) returns FaceDivide from ShapeUpgrade
|
||||
is redefined protected;
|
||||
---Purpose: Returns the tool for splitting faces.
|
||||
|
||||
|
||||
MaxArea(me: in out) returns Real;
|
||||
---C++: inline
|
||||
---C++: return &
|
||||
---Purpose:Set max area allowed for faces
|
||||
|
||||
|
||||
fields
|
||||
|
||||
myMaxArea : Real;
|
||||
|
||||
end ShapeDivideArea;
|
@@ -11,15 +11,17 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <ShapeUpgrade_ShapeDivideArea.ixx>
|
||||
#include <ShapeUpgrade_FaceDivideArea.hxx>
|
||||
|
||||
#include <Precision.hxx>
|
||||
#include <ShapeUpgrade_FaceDivide.hxx>
|
||||
#include <ShapeUpgrade_FaceDivideArea.hxx>
|
||||
#include <ShapeUpgrade_ShapeDivideArea.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : ShapeUpgrade_ShapeDivideArea
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
ShapeUpgrade_ShapeDivideArea::ShapeUpgrade_ShapeDivideArea():
|
||||
ShapeUpgrade_ShapeDivide()
|
||||
{
|
||||
|
73
src/ShapeUpgrade/ShapeUpgrade_ShapeDivideArea.hxx
Normal file
73
src/ShapeUpgrade/ShapeUpgrade_ShapeDivideArea.hxx
Normal file
@@ -0,0 +1,73 @@
|
||||
// Created on: 2006-08-08
|
||||
// Created by: Galina KULIKOVA
|
||||
// Copyright (c) 2006-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _ShapeUpgrade_ShapeDivideArea_HeaderFile
|
||||
#define _ShapeUpgrade_ShapeDivideArea_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Real.hxx>
|
||||
#include <ShapeUpgrade_ShapeDivide.hxx>
|
||||
class TopoDS_Shape;
|
||||
class ShapeUpgrade_FaceDivide;
|
||||
|
||||
|
||||
//! Divides faces from sprcified shape by max area criterium.
|
||||
class ShapeUpgrade_ShapeDivideArea : public ShapeUpgrade_ShapeDivide
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
Standard_EXPORT ShapeUpgrade_ShapeDivideArea();
|
||||
|
||||
//! Initialize by a Shape.
|
||||
Standard_EXPORT ShapeUpgrade_ShapeDivideArea(const TopoDS_Shape& S);
|
||||
|
||||
//! Set max area allowed for faces
|
||||
Standard_Real& MaxArea();
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
//! Returns the tool for splitting faces.
|
||||
Standard_EXPORT virtual Handle(ShapeUpgrade_FaceDivide) GetSplitFaceTool() const Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Standard_Real myMaxArea;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#include <ShapeUpgrade_ShapeDivideArea.lxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _ShapeUpgrade_ShapeDivideArea_HeaderFile
|
@@ -1,35 +0,0 @@
|
||||
-- Created on: 1999-07-22
|
||||
-- Created by: data exchange team
|
||||
-- Copyright (c) 1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class ShapeDivideClosed from ShapeUpgrade inherits ShapeDivide from ShapeUpgrade
|
||||
|
||||
---Purpose: Divides all closed faces in the shape. Class
|
||||
-- ShapeUpgrade_ClosedFaceDivide is used as divide tool.
|
||||
|
||||
uses
|
||||
|
||||
Shape from TopoDS
|
||||
|
||||
is
|
||||
Create (S: Shape from TopoDS) returns ShapeDivideClosed from ShapeUpgrade;
|
||||
---Purpose: Initialises tool with shape and default parameter.
|
||||
|
||||
SetNbSplitPoints (me: in out; num: Integer);
|
||||
---Purpose: Sets the number of cuts applied to divide closed faces.
|
||||
-- The number of resulting faces will be num+1.
|
||||
|
||||
|
||||
end ShapeDivideClosed;
|
@@ -14,15 +14,16 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <ShapeUpgrade_ShapeDivideClosed.ixx>
|
||||
|
||||
#include <ShapeUpgrade_ClosedFaceDivide.hxx>
|
||||
#include <ShapeUpgrade_ShapeDivideClosed.hxx>
|
||||
#include <ShapeUpgrade_WireDivide.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : ShapeUpgrade_ShapeDivideClosed
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
ShapeUpgrade_ShapeDivideClosed::ShapeUpgrade_ShapeDivideClosed(const TopoDS_Shape& S):
|
||||
ShapeUpgrade_ShapeDivide(S)
|
||||
{
|
||||
|
68
src/ShapeUpgrade/ShapeUpgrade_ShapeDivideClosed.hxx
Normal file
68
src/ShapeUpgrade/ShapeUpgrade_ShapeDivideClosed.hxx
Normal file
@@ -0,0 +1,68 @@
|
||||
// Created on: 1999-07-22
|
||||
// Created by: data exchange team
|
||||
// Copyright (c) 1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _ShapeUpgrade_ShapeDivideClosed_HeaderFile
|
||||
#define _ShapeUpgrade_ShapeDivideClosed_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <ShapeUpgrade_ShapeDivide.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
class TopoDS_Shape;
|
||||
|
||||
|
||||
//! Divides all closed faces in the shape. Class
|
||||
//! ShapeUpgrade_ClosedFaceDivide is used as divide tool.
|
||||
class ShapeUpgrade_ShapeDivideClosed : public ShapeUpgrade_ShapeDivide
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Initialises tool with shape and default parameter.
|
||||
Standard_EXPORT ShapeUpgrade_ShapeDivideClosed(const TopoDS_Shape& S);
|
||||
|
||||
//! Sets the number of cuts applied to divide closed faces.
|
||||
//! The number of resulting faces will be num+1.
|
||||
Standard_EXPORT void SetNbSplitPoints (const Standard_Integer num);
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _ShapeUpgrade_ShapeDivideClosed_HeaderFile
|
@@ -1,33 +0,0 @@
|
||||
-- Created on: 2000-05-25
|
||||
-- Created by: data exchange team
|
||||
-- Copyright (c) 2000-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class ShapeDivideClosedEdges from ShapeUpgrade inherits ShapeDivide from ShapeUpgrade
|
||||
|
||||
---Purpose:
|
||||
|
||||
uses
|
||||
|
||||
Shape from TopoDS
|
||||
|
||||
is
|
||||
|
||||
Create (S: Shape from TopoDS) returns ShapeDivideClosedEdges from ShapeUpgrade;
|
||||
---Purpose: Initialises tool with shape and default parameter.
|
||||
|
||||
SetNbSplitPoints (me: in out; num: Integer);
|
||||
---Purpose: Sets the number of cuts applied to divide closed edges.
|
||||
-- The number of resulting faces will be num+1.
|
||||
|
||||
end ShapeDivideClosedEdges;
|
@@ -13,17 +13,18 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <ShapeUpgrade_ShapeDivideClosedEdges.ixx>
|
||||
|
||||
#include <ShapeUpgrade_ClosedEdgeDivide.hxx>
|
||||
#include <ShapeUpgrade_WireDivide.hxx>
|
||||
#include <ShapeUpgrade_FaceDivide.hxx>
|
||||
#include <ShapeUpgrade_ShapeDivideClosedEdges.hxx>
|
||||
#include <ShapeUpgrade_SplitSurface.hxx>
|
||||
#include <ShapeUpgrade_WireDivide.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : ShapeUpgrade_ShapeDivideClosedEdges
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
ShapeUpgrade_ShapeDivideClosedEdges::ShapeUpgrade_ShapeDivideClosedEdges(const TopoDS_Shape& S):
|
||||
ShapeUpgrade_ShapeDivide(S)
|
||||
{
|
||||
|
66
src/ShapeUpgrade/ShapeUpgrade_ShapeDivideClosedEdges.hxx
Normal file
66
src/ShapeUpgrade/ShapeUpgrade_ShapeDivideClosedEdges.hxx
Normal file
@@ -0,0 +1,66 @@
|
||||
// Created on: 2000-05-25
|
||||
// Created by: data exchange team
|
||||
// Copyright (c) 2000-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _ShapeUpgrade_ShapeDivideClosedEdges_HeaderFile
|
||||
#define _ShapeUpgrade_ShapeDivideClosedEdges_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <ShapeUpgrade_ShapeDivide.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
class TopoDS_Shape;
|
||||
|
||||
|
||||
|
||||
class ShapeUpgrade_ShapeDivideClosedEdges : public ShapeUpgrade_ShapeDivide
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Initialises tool with shape and default parameter.
|
||||
Standard_EXPORT ShapeUpgrade_ShapeDivideClosedEdges(const TopoDS_Shape& S);
|
||||
|
||||
//! Sets the number of cuts applied to divide closed edges.
|
||||
//! The number of resulting faces will be num+1.
|
||||
Standard_EXPORT void SetNbSplitPoints (const Standard_Integer num);
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _ShapeUpgrade_ShapeDivideClosedEdges_HeaderFile
|
@@ -1,81 +0,0 @@
|
||||
-- Created on: 1999-04-30
|
||||
-- Created by: data exchange team
|
||||
-- Copyright (c) 1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class ShapeDivideContinuity from ShapeUpgrade inherits ShapeDivide from ShapeUpgrade
|
||||
|
||||
---Purpose: API Tool for converting shapes with C0 geometry into C1 ones
|
||||
|
||||
uses
|
||||
|
||||
Shape from TopoDS,
|
||||
Shape from GeomAbs,
|
||||
FaceDivide from ShapeUpgrade
|
||||
|
||||
is
|
||||
Create returns ShapeDivideContinuity from ShapeUpgrade;
|
||||
|
||||
Create (S: Shape from TopoDS)
|
||||
returns ShapeDivideContinuity from ShapeUpgrade;
|
||||
---Purpose: Initialize by a Shape.
|
||||
|
||||
SetTolerance(me: in out; Tol: Real);
|
||||
---Purpose: Sets tolerance.
|
||||
|
||||
SetTolerance2d(me: in out; Tol: Real);
|
||||
---Purpose: Sets tolerance.
|
||||
|
||||
SetBoundaryCriterion (me: in out; Criterion: Shape from GeomAbs = GeomAbs_C1);
|
||||
---Purpose:
|
||||
-- Defines a criterion of continuity for the boundary (all the
|
||||
-- Wires)
|
||||
--
|
||||
-- The possible values are C0, G1, C1, G2, C2, C3, CN The
|
||||
-- default is C1 to respect the Cas.Cade Shape Validity. G1
|
||||
-- and G2 are not authorized.
|
||||
|
||||
SetPCurveCriterion (me: in out; Criterion: Shape from GeomAbs = GeomAbs_C1);
|
||||
---Purpose:
|
||||
-- Defines a criterion of continuity for the boundary (all the
|
||||
-- pcurves of Wires)
|
||||
--
|
||||
-- The possible values are C0, G1, C1, G2, C2, C3, CN The
|
||||
-- default is C1 to respect the Cas.Cade Shape Validity. G1
|
||||
-- and G2 are not authorized.
|
||||
|
||||
SetSurfaceCriterion (me: in out; Criterion: Shape from GeomAbs = GeomAbs_C1);
|
||||
---Purpose:
|
||||
-- Defines a criterion of continuity for the boundary (all the
|
||||
-- Wires)
|
||||
--
|
||||
-- The possible values are C0, G1, C1, G2, C2, C3, CN The
|
||||
-- default is C1 to respect the Cas.Cade Shape Validity. G1
|
||||
-- and G2 are not authorized.
|
||||
|
||||
---Level: Internal
|
||||
|
||||
GetSplitFaceTool (me) returns FaceDivide from ShapeUpgrade
|
||||
is redefined protected;
|
||||
---Purpose: Returns the tool for dividing faces.
|
||||
|
||||
fields
|
||||
|
||||
myCurve3dCriterion: Shape from GeomAbs;
|
||||
myCurve2dCriterion: Shape from GeomAbs;
|
||||
mySurfaceCriterion : Shape from GeomAbs;
|
||||
myTolerance3d: Real;
|
||||
myTolerance2d: Real;
|
||||
|
||||
end ShapeDivideContinuity;
|
@@ -14,20 +14,20 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <ShapeUpgrade_ShapeDivideContinuity.ixx>
|
||||
|
||||
#include <Precision.hxx>
|
||||
#include <ShapeUpgrade_FaceDivide.hxx>
|
||||
#include <ShapeUpgrade_ShapeDivideContinuity.hxx>
|
||||
#include <ShapeUpgrade_SplitCurve2dContinuity.hxx>
|
||||
#include <ShapeUpgrade_SplitCurve3dContinuity.hxx>
|
||||
#include <ShapeUpgrade_SplitSurfaceContinuity.hxx>
|
||||
#include <ShapeUpgrade_WireDivide.hxx>
|
||||
#include <ShapeUpgrade_FaceDivide.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : ShapeUpgrade_ShapeDivideContinuity
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
ShapeUpgrade_ShapeDivideContinuity::ShapeUpgrade_ShapeDivideContinuity()
|
||||
{
|
||||
myCurve3dCriterion = GeomAbs_C1;
|
||||
|
108
src/ShapeUpgrade/ShapeUpgrade_ShapeDivideContinuity.hxx
Normal file
108
src/ShapeUpgrade/ShapeUpgrade_ShapeDivideContinuity.hxx
Normal file
@@ -0,0 +1,108 @@
|
||||
// Created on: 1999-04-30
|
||||
// Created by: data exchange team
|
||||
// Copyright (c) 1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _ShapeUpgrade_ShapeDivideContinuity_HeaderFile
|
||||
#define _ShapeUpgrade_ShapeDivideContinuity_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <GeomAbs_Shape.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <ShapeUpgrade_ShapeDivide.hxx>
|
||||
class TopoDS_Shape;
|
||||
class ShapeUpgrade_FaceDivide;
|
||||
|
||||
|
||||
//! API Tool for converting shapes with C0 geometry into C1 ones
|
||||
class ShapeUpgrade_ShapeDivideContinuity : public ShapeUpgrade_ShapeDivide
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
Standard_EXPORT ShapeUpgrade_ShapeDivideContinuity();
|
||||
|
||||
//! Initialize by a Shape.
|
||||
Standard_EXPORT ShapeUpgrade_ShapeDivideContinuity(const TopoDS_Shape& S);
|
||||
|
||||
//! Sets tolerance.
|
||||
Standard_EXPORT void SetTolerance (const Standard_Real Tol);
|
||||
|
||||
//! Sets tolerance.
|
||||
Standard_EXPORT void SetTolerance2d (const Standard_Real Tol);
|
||||
|
||||
|
||||
//! Defines a criterion of continuity for the boundary (all the
|
||||
//! Wires)
|
||||
//!
|
||||
//! The possible values are C0, G1, C1, G2, C2, C3, CN The
|
||||
//! default is C1 to respect the Cas.Cade Shape Validity. G1
|
||||
//! and G2 are not authorized.
|
||||
Standard_EXPORT void SetBoundaryCriterion (const GeomAbs_Shape Criterion = GeomAbs_C1);
|
||||
|
||||
|
||||
//! Defines a criterion of continuity for the boundary (all the
|
||||
//! pcurves of Wires)
|
||||
//!
|
||||
//! The possible values are C0, G1, C1, G2, C2, C3, CN The
|
||||
//! default is C1 to respect the Cas.Cade Shape Validity. G1
|
||||
//! and G2 are not authorized.
|
||||
Standard_EXPORT void SetPCurveCriterion (const GeomAbs_Shape Criterion = GeomAbs_C1);
|
||||
|
||||
|
||||
//! Defines a criterion of continuity for the boundary (all the
|
||||
//! Wires)
|
||||
//!
|
||||
//! The possible values are C0, G1, C1, G2, C2, C3, CN The
|
||||
//! default is C1 to respect the Cas.Cade Shape Validity. G1
|
||||
//! and G2 are not authorized.
|
||||
Standard_EXPORT void SetSurfaceCriterion (const GeomAbs_Shape Criterion = GeomAbs_C1);
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
//! Returns the tool for dividing faces.
|
||||
Standard_EXPORT virtual Handle(ShapeUpgrade_FaceDivide) GetSplitFaceTool() const Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
GeomAbs_Shape myCurve3dCriterion;
|
||||
GeomAbs_Shape myCurve2dCriterion;
|
||||
GeomAbs_Shape mySurfaceCriterion;
|
||||
Standard_Real myTolerance3d;
|
||||
Standard_Real myTolerance2d;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _ShapeUpgrade_ShapeDivideContinuity_HeaderFile
|
@@ -1,56 +0,0 @@
|
||||
-- Created on: 1998-06-03
|
||||
-- Created by: data exchange team
|
||||
-- Copyright (c) 1998-1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class ShellSewing from ShapeUpgrade
|
||||
|
||||
---Purpose: This class provides a tool for applying sewing algorithm from
|
||||
-- BRepBuilderAPI: it takes a shape, calls sewing for each shell,
|
||||
-- and then replaces sewed shells with use of ShapeBuild_ReShape
|
||||
|
||||
uses
|
||||
Shape from TopoDS,
|
||||
IndexedMapOfShape from TopTools,
|
||||
ReShape from ShapeBuild
|
||||
|
||||
is
|
||||
|
||||
Create returns ShellSewing;
|
||||
---Purpose: Creates a ShellSewing, empty
|
||||
|
||||
ApplySewing (me: in out; shape: Shape from TopoDS; tol: Real = 0.0)
|
||||
returns Shape from TopoDS;
|
||||
---Purpose: Builds a new shape from a former one, by calling Sewing from
|
||||
-- BRepBuilderAPI. Rebuilt solids are oriented to be "not infinite"
|
||||
--
|
||||
-- If <tol> is not given (i.e. value 0. by default), it is
|
||||
-- computed as the mean tolerance recorded in <shape>
|
||||
--
|
||||
-- If no shell has been sewed, this method returns the input
|
||||
-- shape
|
||||
|
||||
Init (me: in out; shape: Shape from TopoDS) is private;
|
||||
|
||||
Prepare (me: in out; tol: Real) returns Integer is private;
|
||||
|
||||
Apply (me: in out; shape: Shape from TopoDS; tol: Real)
|
||||
returns Shape from TopoDS is private;
|
||||
|
||||
fields
|
||||
|
||||
myShells: IndexedMapOfShape from TopTools;
|
||||
myReShape: ReShape from ShapeBuild;
|
||||
|
||||
end ShellSewing;
|
@@ -12,24 +12,23 @@
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
//szv#4 S4163
|
||||
#include <ShapeUpgrade_ShellSewing.ixx>
|
||||
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopoDS_Shell.hxx>
|
||||
#include <TopoDS_Solid.hxx>
|
||||
#include <TopExp_Explorer.hxx>
|
||||
|
||||
#include <BRepBuilderAPI_Sewing.hxx>
|
||||
#include <BRepClass3d_SolidClassifier.hxx>
|
||||
|
||||
#include <ShapeAnalysis_ShapeTolerance.hxx>
|
||||
#include <ShapeBuild_ReShape.hxx>
|
||||
#include <ShapeUpgrade_ShellSewing.hxx>
|
||||
#include <ShapeUpgrade_WireDivide.hxx>
|
||||
#include <TopExp_Explorer.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <TopoDS_Shell.hxx>
|
||||
#include <TopoDS_Solid.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : ShapeUpgrade_ShellSewing
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
ShapeUpgrade_ShellSewing::ShapeUpgrade_ShellSewing()
|
||||
{
|
||||
myReShape = new ShapeBuild_ReShape;
|
||||
|
85
src/ShapeUpgrade/ShapeUpgrade_ShellSewing.hxx
Normal file
85
src/ShapeUpgrade/ShapeUpgrade_ShellSewing.hxx
Normal file
@@ -0,0 +1,85 @@
|
||||
// Created on: 1998-06-03
|
||||
// Created by: data exchange team
|
||||
// Copyright (c) 1998-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _ShapeUpgrade_ShellSewing_HeaderFile
|
||||
#define _ShapeUpgrade_ShellSewing_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <TopTools_IndexedMapOfShape.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
class ShapeBuild_ReShape;
|
||||
class TopoDS_Shape;
|
||||
|
||||
|
||||
//! This class provides a tool for applying sewing algorithm from
|
||||
//! BRepBuilderAPI: it takes a shape, calls sewing for each shell,
|
||||
//! and then replaces sewed shells with use of ShapeBuild_ReShape
|
||||
class ShapeUpgrade_ShellSewing
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Creates a ShellSewing, empty
|
||||
Standard_EXPORT ShapeUpgrade_ShellSewing();
|
||||
|
||||
//! Builds a new shape from a former one, by calling Sewing from
|
||||
//! BRepBuilderAPI. Rebuilt solids are oriented to be "not infinite"
|
||||
//!
|
||||
//! If <tol> is not given (i.e. value 0. by default), it is
|
||||
//! computed as the mean tolerance recorded in <shape>
|
||||
//!
|
||||
//! If no shell has been sewed, this method returns the input
|
||||
//! shape
|
||||
Standard_EXPORT TopoDS_Shape ApplySewing (const TopoDS_Shape& shape, const Standard_Real tol = 0.0);
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Standard_EXPORT void Init (const TopoDS_Shape& shape);
|
||||
|
||||
Standard_EXPORT Standard_Integer Prepare (const Standard_Real tol);
|
||||
|
||||
Standard_EXPORT TopoDS_Shape Apply (const TopoDS_Shape& shape, const Standard_Real tol);
|
||||
|
||||
|
||||
TopTools_IndexedMapOfShape myShells;
|
||||
Handle(ShapeBuild_ReShape) myReShape;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _ShapeUpgrade_ShellSewing_HeaderFile
|
@@ -1,75 +0,0 @@
|
||||
-- Created on: 1998-03-12
|
||||
-- Created by: Pierre BARRAS
|
||||
-- Copyright (c) 1998-1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class SplitCurve from ShapeUpgrade inherits TShared from MMgt
|
||||
|
||||
---Purpose: Splits a curve with a criterion.
|
||||
|
||||
uses
|
||||
Curve from Geom,
|
||||
HArray1OfCurve from TColGeom,
|
||||
HSequenceOfReal from TColStd,
|
||||
Shape from GeomAbs,
|
||||
Status from ShapeExtend
|
||||
is
|
||||
|
||||
Create returns SplitCurve from ShapeUpgrade;
|
||||
---Purpose: Empty constructor.
|
||||
|
||||
Init (me: mutable; First, Last: Real);
|
||||
---Purpose: Initializes with curve first and last parameters.
|
||||
|
||||
SetSplitValues (me: mutable; SplitValues: HSequenceOfReal from TColStd);
|
||||
---Purpose: Sets the parameters where splitting has to be done.
|
||||
|
||||
Build (me: mutable; Segment: Boolean) is virtual;
|
||||
---Purpose: If Segment is True, the result is composed with
|
||||
-- segments of the curve bounded by the SplitValues. If
|
||||
-- Segment is False, the result is composed with trimmed
|
||||
-- Curves all based on the same complete curve.
|
||||
--
|
||||
|
||||
SplitValues(me) returns HSequenceOfReal from TColStd;
|
||||
---C++: return const &
|
||||
--- Purpose : returns all the splitting values including the
|
||||
-- First and Last parameters of the input curve
|
||||
|
||||
|
||||
---Level: Internal
|
||||
|
||||
--PrepareKnots (me: mutable) is protected;
|
||||
---Purpose: Merges input split values and new ones into myGlobalKnots
|
||||
|
||||
Compute(me: mutable) is virtual;
|
||||
---Purpose: Calculates points for correction/splitting of the curve
|
||||
|
||||
Perform(me: mutable; Segment: Boolean = Standard_True);
|
||||
---Purpose: Performs correction/splitting of the curve.
|
||||
--- First defines splitting values by method Compute(), then calls method Build().
|
||||
|
||||
Status (me; status: Status from ShapeExtend) returns Boolean;
|
||||
---Purpose: Returns the status
|
||||
-- OK - no splitting is needed
|
||||
-- DONE1 - splitting required and gives more than one segment
|
||||
-- DONE2 - splitting is required, but gives only one segment (initial)
|
||||
-- DONE3 - geometric form of the curve or parametrisation is modified
|
||||
fields
|
||||
|
||||
mySplitValues : HSequenceOfReal from TColStd is protected;
|
||||
myNbCurves : Integer is protected;
|
||||
myStatus : Integer is protected;
|
||||
end;
|
||||
|
@@ -16,20 +16,20 @@
|
||||
|
||||
// gka 30.04.99 S4137: re-worked
|
||||
|
||||
#include <ShapeUpgrade_SplitCurve.ixx>
|
||||
#include <Geom_BSplineCurve.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <ShapeExtend.hxx>
|
||||
#include <ShapeUpgrade.hxx>
|
||||
#include <TColStd_ListIteratorOfListOfReal.hxx>
|
||||
#include <ShapeUpgrade_SplitCurve.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TColGeom_HArray1OfCurve.hxx>
|
||||
#include <TColStd_HSequenceOfReal.hxx>
|
||||
#include <ShapeExtend.hxx>
|
||||
#include <TColStd_ListIteratorOfListOfReal.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : ShapeUpgrade_SplitCurve
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
ShapeUpgrade_SplitCurve::ShapeUpgrade_SplitCurve() : myStatus(0)
|
||||
{
|
||||
}
|
||||
|
101
src/ShapeUpgrade/ShapeUpgrade_SplitCurve.hxx
Normal file
101
src/ShapeUpgrade/ShapeUpgrade_SplitCurve.hxx
Normal file
@@ -0,0 +1,101 @@
|
||||
// Created on: 1998-03-12
|
||||
// Created by: Pierre BARRAS
|
||||
// Copyright (c) 1998-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _ShapeUpgrade_SplitCurve_HeaderFile
|
||||
#define _ShapeUpgrade_SplitCurve_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <TColStd_HSequenceOfReal.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <MMgt_TShared.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <ShapeExtend_Status.hxx>
|
||||
|
||||
|
||||
class ShapeUpgrade_SplitCurve;
|
||||
DEFINE_STANDARD_HANDLE(ShapeUpgrade_SplitCurve, MMgt_TShared)
|
||||
|
||||
//! Splits a curve with a criterion.
|
||||
class ShapeUpgrade_SplitCurve : public MMgt_TShared
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Empty constructor.
|
||||
Standard_EXPORT ShapeUpgrade_SplitCurve();
|
||||
|
||||
//! Initializes with curve first and last parameters.
|
||||
Standard_EXPORT void Init (const Standard_Real First, const Standard_Real Last);
|
||||
|
||||
//! Sets the parameters where splitting has to be done.
|
||||
Standard_EXPORT void SetSplitValues (const Handle(TColStd_HSequenceOfReal)& SplitValues);
|
||||
|
||||
//! If Segment is True, the result is composed with
|
||||
//! segments of the curve bounded by the SplitValues. If
|
||||
//! Segment is False, the result is composed with trimmed
|
||||
//! Curves all based on the same complete curve.
|
||||
Standard_EXPORT virtual void Build (const Standard_Boolean Segment);
|
||||
|
||||
//! returns all the splitting values including the
|
||||
//! First and Last parameters of the input curve
|
||||
//! Merges input split values and new ones into myGlobalKnots
|
||||
Standard_EXPORT const Handle(TColStd_HSequenceOfReal)& SplitValues() const;
|
||||
|
||||
//! Calculates points for correction/splitting of the curve
|
||||
Standard_EXPORT virtual void Compute();
|
||||
|
||||
//! Performs correction/splitting of the curve.
|
||||
//! First defines splitting values by method Compute(), then calls method Build().
|
||||
Standard_EXPORT void Perform (const Standard_Boolean Segment = Standard_True);
|
||||
|
||||
//! Returns the status
|
||||
//! OK - no splitting is needed
|
||||
//! DONE1 - splitting required and gives more than one segment
|
||||
//! DONE2 - splitting is required, but gives only one segment (initial)
|
||||
//! DONE3 - geometric form of the curve or parametrisation is modified
|
||||
Standard_EXPORT Standard_Boolean Status (const ShapeExtend_Status status) const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(ShapeUpgrade_SplitCurve,MMgt_TShared)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
Handle(TColStd_HSequenceOfReal) mySplitValues;
|
||||
Standard_Integer myNbCurves;
|
||||
Standard_Integer myStatus;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _ShapeUpgrade_SplitCurve_HeaderFile
|
@@ -1,52 +0,0 @@
|
||||
-- Created on: 1998-03-12
|
||||
-- Created by: Pierre BARRAS
|
||||
-- Copyright (c) 1998-1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class SplitCurve2d from ShapeUpgrade inherits SplitCurve from ShapeUpgrade
|
||||
|
||||
---Purpose: Splits a 2d curve with a criterion.
|
||||
|
||||
uses
|
||||
Curve from Geom2d,
|
||||
HArray1OfCurve from TColGeom2d
|
||||
|
||||
is
|
||||
|
||||
Create returns SplitCurve2d from ShapeUpgrade;
|
||||
---Purpose: Empty constructor.
|
||||
|
||||
Init (me: mutable; C: Curve from Geom2d);
|
||||
---Purpose: Initializes with pcurve with its first and last parameters.
|
||||
|
||||
Init (me: mutable; C : Curve from Geom2d;
|
||||
First, Last: Real);
|
||||
---Purpose: Initializes with pcurve with its parameters.
|
||||
|
||||
Build (me: mutable; Segment: Boolean) is redefined;
|
||||
---Purpose: If Segment is True, the result is composed with
|
||||
-- segments of the curve bounded by the SplitValues. If
|
||||
-- Segment is False, the result is composed with trimmed
|
||||
-- Curves all based on the same complete curve.
|
||||
--
|
||||
GetCurves(me) returns HArray1OfCurve from TColGeom2d;
|
||||
---C++: return const &
|
||||
|
||||
fields
|
||||
|
||||
myCurve : Curve from Geom2d is protected;
|
||||
myResultingCurves: HArray1OfCurve from TColGeom2d is protected;
|
||||
|
||||
end;
|
||||
|
@@ -14,27 +14,28 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <ShapeUpgrade_SplitCurve2d.ixx>
|
||||
#include <ShapeUpgrade.hxx>
|
||||
|
||||
#include <Geom2d_BezierCurve.hxx>
|
||||
#include <Geom2d_BSplineCurve.hxx>
|
||||
#include <TColStd_ListIteratorOfListOfReal.hxx>
|
||||
#include <TColStd_HSequenceOfReal.hxx>
|
||||
#include <TColGeom2d_HArray1OfCurve.hxx>
|
||||
#include <Geom2d_TrimmedCurve.hxx>
|
||||
#include <Geom2d_Curve.hxx>
|
||||
#include <Geom2d_OffsetCurve.hxx>
|
||||
#include <Geom2d_TrimmedCurve.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <ShapeAnalysis_Curve.hxx>
|
||||
#include <ShapeExtend.hxx>
|
||||
#include <ShapeUpgrade.hxx>
|
||||
#include <ShapeUpgrade_SplitCurve2d.hxx>
|
||||
#include <Standard_ErrorHandler.hxx>
|
||||
#include <Standard_Failure.hxx>
|
||||
#include <ShapeExtend.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <Geom2d_BezierCurve.hxx>
|
||||
#include <ShapeAnalysis_Curve.hxx>
|
||||
#include <Geom2d_Curve.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TColGeom2d_HArray1OfCurve.hxx>
|
||||
#include <TColStd_HSequenceOfReal.hxx>
|
||||
#include <TColStd_ListIteratorOfListOfReal.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : ShapeUpgrade_SplitCurve2d
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
ShapeUpgrade_SplitCurve2d::ShapeUpgrade_SplitCurve2d()
|
||||
{
|
||||
}
|
||||
|
82
src/ShapeUpgrade/ShapeUpgrade_SplitCurve2d.hxx
Normal file
82
src/ShapeUpgrade/ShapeUpgrade_SplitCurve2d.hxx
Normal file
@@ -0,0 +1,82 @@
|
||||
// Created on: 1998-03-12
|
||||
// Created by: Pierre BARRAS
|
||||
// Copyright (c) 1998-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _ShapeUpgrade_SplitCurve2d_HeaderFile
|
||||
#define _ShapeUpgrade_SplitCurve2d_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <TColGeom2d_HArray1OfCurve.hxx>
|
||||
#include <ShapeUpgrade_SplitCurve.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class Geom2d_Curve;
|
||||
|
||||
|
||||
class ShapeUpgrade_SplitCurve2d;
|
||||
DEFINE_STANDARD_HANDLE(ShapeUpgrade_SplitCurve2d, ShapeUpgrade_SplitCurve)
|
||||
|
||||
//! Splits a 2d curve with a criterion.
|
||||
class ShapeUpgrade_SplitCurve2d : public ShapeUpgrade_SplitCurve
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Empty constructor.
|
||||
Standard_EXPORT ShapeUpgrade_SplitCurve2d();
|
||||
|
||||
//! Initializes with pcurve with its first and last parameters.
|
||||
Standard_EXPORT void Init (const Handle(Geom2d_Curve)& C);
|
||||
|
||||
//! Initializes with pcurve with its parameters.
|
||||
Standard_EXPORT void Init (const Handle(Geom2d_Curve)& C, const Standard_Real First, const Standard_Real Last);
|
||||
|
||||
//! If Segment is True, the result is composed with
|
||||
//! segments of the curve bounded by the SplitValues. If
|
||||
//! Segment is False, the result is composed with trimmed
|
||||
//! Curves all based on the same complete curve.
|
||||
Standard_EXPORT virtual void Build (const Standard_Boolean Segment) Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT const Handle(TColGeom2d_HArray1OfCurve)& GetCurves() const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(ShapeUpgrade_SplitCurve2d,ShapeUpgrade_SplitCurve)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
Handle(Geom2d_Curve) myCurve;
|
||||
Handle(TColGeom2d_HArray1OfCurve) myResultingCurves;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _ShapeUpgrade_SplitCurve2d_HeaderFile
|
@@ -1,52 +0,0 @@
|
||||
-- Created on: 1999-04-14
|
||||
-- Created by: Roman LYGIN
|
||||
-- Copyright (c) 1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class SplitCurve2dContinuity from ShapeUpgrade inherits SplitCurve2d from ShapeUpgrade
|
||||
|
||||
---Purpose: Corrects/splits a 2d curve with a continuity criterion.
|
||||
-- Tolerance is used to correct the curve at a knot that respects
|
||||
-- geometrically the criterion, in order to reduce the
|
||||
-- multiplicity of the knot.
|
||||
|
||||
uses
|
||||
|
||||
Curve from Geom2d,
|
||||
Shape from GeomAbs
|
||||
|
||||
is
|
||||
|
||||
Create returns SplitCurve2dContinuity from ShapeUpgrade;
|
||||
---Purpose: Empty constructor.
|
||||
|
||||
SetCriterion (me: mutable; Criterion: Shape from GeomAbs);
|
||||
---Purpose: Sets criterion for splitting.
|
||||
|
||||
SetTolerance (me: mutable; Tol: Real);
|
||||
---Purpose: Sets tolerance.
|
||||
|
||||
|
||||
Compute(me: mutable) is redefined;
|
||||
---Purpose: Calculates points for correction/splitting of the curve
|
||||
|
||||
|
||||
|
||||
fields
|
||||
|
||||
myCriterion: Shape from GeomAbs;
|
||||
myCont : Integer;
|
||||
myTolerance: Real;
|
||||
|
||||
end SplitCurve2dContinuity;
|
@@ -14,25 +14,24 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <ShapeUpgrade_SplitCurve2dContinuity.ixx>
|
||||
|
||||
#include <Geom2d_BSplineCurve.hxx>
|
||||
#include <Geom2d_OffsetCurve.hxx>
|
||||
#include <Geom2d_TrimmedCurve.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <ShapeExtend.hxx>
|
||||
#include <ShapeUpgrade.hxx>
|
||||
#include <ShapeUpgrade_SplitCurve2dContinuity.hxx>
|
||||
#include <Standard_ErrorHandler.hxx>
|
||||
#include <Standard_Failure.hxx>
|
||||
#include <Geom2d_BSplineCurve.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <ShapeUpgrade.hxx>
|
||||
#include <Geom2d_TrimmedCurve.hxx>
|
||||
#include <Geom2d_OffsetCurve.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TColGeom2d_HArray1OfCurve.hxx>
|
||||
#include <TColStd_HSequenceOfReal.hxx>
|
||||
#include <TColGeom2d_HArray1OfCurve.hxx>
|
||||
#include <ShapeExtend.hxx>
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : ShapeUpgrade_SplitCurve2dContinuity
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
ShapeUpgrade_SplitCurve2dContinuity::ShapeUpgrade_SplitCurve2dContinuity()
|
||||
{
|
||||
myCriterion = GeomAbs_C1;
|
||||
|
80
src/ShapeUpgrade/ShapeUpgrade_SplitCurve2dContinuity.hxx
Normal file
80
src/ShapeUpgrade/ShapeUpgrade_SplitCurve2dContinuity.hxx
Normal file
@@ -0,0 +1,80 @@
|
||||
// Created on: 1999-04-14
|
||||
// Created by: Roman LYGIN
|
||||
// Copyright (c) 1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _ShapeUpgrade_SplitCurve2dContinuity_HeaderFile
|
||||
#define _ShapeUpgrade_SplitCurve2dContinuity_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <GeomAbs_Shape.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <ShapeUpgrade_SplitCurve2d.hxx>
|
||||
|
||||
|
||||
class ShapeUpgrade_SplitCurve2dContinuity;
|
||||
DEFINE_STANDARD_HANDLE(ShapeUpgrade_SplitCurve2dContinuity, ShapeUpgrade_SplitCurve2d)
|
||||
|
||||
//! Corrects/splits a 2d curve with a continuity criterion.
|
||||
//! Tolerance is used to correct the curve at a knot that respects
|
||||
//! geometrically the criterion, in order to reduce the
|
||||
//! multiplicity of the knot.
|
||||
class ShapeUpgrade_SplitCurve2dContinuity : public ShapeUpgrade_SplitCurve2d
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Empty constructor.
|
||||
Standard_EXPORT ShapeUpgrade_SplitCurve2dContinuity();
|
||||
|
||||
//! Sets criterion for splitting.
|
||||
Standard_EXPORT void SetCriterion (const GeomAbs_Shape Criterion);
|
||||
|
||||
//! Sets tolerance.
|
||||
Standard_EXPORT void SetTolerance (const Standard_Real Tol);
|
||||
|
||||
//! Calculates points for correction/splitting of the curve
|
||||
Standard_EXPORT virtual void Compute() Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(ShapeUpgrade_SplitCurve2dContinuity,ShapeUpgrade_SplitCurve2d)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
GeomAbs_Shape myCriterion;
|
||||
Standard_Integer myCont;
|
||||
Standard_Real myTolerance;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _ShapeUpgrade_SplitCurve2dContinuity_HeaderFile
|
@@ -1,53 +0,0 @@
|
||||
-- Created on: 1998-03-12
|
||||
-- Created by: Roman LYGIN
|
||||
-- Copyright (c) 1998-1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class SplitCurve3d from ShapeUpgrade inherits SplitCurve from ShapeUpgrade
|
||||
|
||||
---Purpose: Splits a 3d curve with a criterion.
|
||||
|
||||
uses
|
||||
Curve from Geom,
|
||||
HArray1OfCurve from TColGeom
|
||||
|
||||
is
|
||||
|
||||
Create returns SplitCurve3d from ShapeUpgrade;
|
||||
---Purpose: Empty constructor.
|
||||
|
||||
Init (me: mutable; C: Curve from Geom);
|
||||
---Purpose: Initializes with curve with its first and last parameters.
|
||||
|
||||
Init (me: mutable; C : Curve from Geom;
|
||||
First, Last: Real);
|
||||
---Purpose: Initializes with curve with its parameters.
|
||||
|
||||
Build (me: mutable; Segment: Boolean) is redefined;
|
||||
---Purpose: If Segment is True, the result is composed with
|
||||
-- segments of the curve bounded by the SplitValues. If
|
||||
-- Segment is False, the result is composed with trimmed
|
||||
-- Curves all based on the same complete curve.
|
||||
--
|
||||
|
||||
GetCurves(me) returns HArray1OfCurve from TColGeom;
|
||||
---C++: return const &
|
||||
|
||||
fields
|
||||
|
||||
myCurve : Curve from Geom is protected;
|
||||
myResultingCurves: HArray1OfCurve from TColGeom is protected;
|
||||
|
||||
end;
|
||||
|
@@ -14,28 +14,28 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <ShapeUpgrade_SplitCurve3d.ixx>
|
||||
|
||||
#include <Geom_BezierCurve.hxx>
|
||||
#include <Geom_BSplineCurve.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <ShapeUpgrade.hxx>
|
||||
#include <TColStd_ListIteratorOfListOfReal.hxx>
|
||||
#include <TColStd_HSequenceOfReal.hxx>
|
||||
#include <TColGeom_HArray1OfCurve.hxx>
|
||||
#include <Geom_TrimmedCurve.hxx>
|
||||
#include <Geom_Curve.hxx>
|
||||
#include <Geom_OffsetCurve.hxx>
|
||||
#include <Geom_TrimmedCurve.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <ShapeAnalysis_Curve.hxx>
|
||||
#include <ShapeExtend.hxx>
|
||||
#include <ShapeUpgrade.hxx>
|
||||
#include <ShapeUpgrade_SplitCurve3d.hxx>
|
||||
#include <Standard_ErrorHandler.hxx>
|
||||
#include <Standard_Failure.hxx>
|
||||
#include <ShapeExtend.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <Geom_BezierCurve.hxx>
|
||||
#include <ShapeAnalysis_Curve.hxx>
|
||||
#include <Geom_Curve.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TColGeom_HArray1OfCurve.hxx>
|
||||
#include <TColStd_HSequenceOfReal.hxx>
|
||||
#include <TColStd_ListIteratorOfListOfReal.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : ShapeUpgrade_SplitCurve3d
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
ShapeUpgrade_SplitCurve3d::ShapeUpgrade_SplitCurve3d()
|
||||
{
|
||||
}
|
||||
|
82
src/ShapeUpgrade/ShapeUpgrade_SplitCurve3d.hxx
Normal file
82
src/ShapeUpgrade/ShapeUpgrade_SplitCurve3d.hxx
Normal file
@@ -0,0 +1,82 @@
|
||||
// Created on: 1998-03-12
|
||||
// Created by: Roman LYGIN
|
||||
// Copyright (c) 1998-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _ShapeUpgrade_SplitCurve3d_HeaderFile
|
||||
#define _ShapeUpgrade_SplitCurve3d_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <TColGeom_HArray1OfCurve.hxx>
|
||||
#include <ShapeUpgrade_SplitCurve.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class Geom_Curve;
|
||||
|
||||
|
||||
class ShapeUpgrade_SplitCurve3d;
|
||||
DEFINE_STANDARD_HANDLE(ShapeUpgrade_SplitCurve3d, ShapeUpgrade_SplitCurve)
|
||||
|
||||
//! Splits a 3d curve with a criterion.
|
||||
class ShapeUpgrade_SplitCurve3d : public ShapeUpgrade_SplitCurve
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Empty constructor.
|
||||
Standard_EXPORT ShapeUpgrade_SplitCurve3d();
|
||||
|
||||
//! Initializes with curve with its first and last parameters.
|
||||
Standard_EXPORT void Init (const Handle(Geom_Curve)& C);
|
||||
|
||||
//! Initializes with curve with its parameters.
|
||||
Standard_EXPORT void Init (const Handle(Geom_Curve)& C, const Standard_Real First, const Standard_Real Last);
|
||||
|
||||
//! If Segment is True, the result is composed with
|
||||
//! segments of the curve bounded by the SplitValues. If
|
||||
//! Segment is False, the result is composed with trimmed
|
||||
//! Curves all based on the same complete curve.
|
||||
Standard_EXPORT virtual void Build (const Standard_Boolean Segment) Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT const Handle(TColGeom_HArray1OfCurve)& GetCurves() const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(ShapeUpgrade_SplitCurve3d,ShapeUpgrade_SplitCurve)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
Handle(Geom_Curve) myCurve;
|
||||
Handle(TColGeom_HArray1OfCurve) myResultingCurves;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _ShapeUpgrade_SplitCurve3d_HeaderFile
|
@@ -1,54 +0,0 @@
|
||||
-- Created on: 1999-04-15
|
||||
-- Created by: Roman LYGIN
|
||||
-- Copyright (c) 1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class SplitCurve3dContinuity from ShapeUpgrade inherits SplitCurve3d from ShapeUpgrade
|
||||
|
||||
---Purpose: Corrects/splits a 2d curve with a continuity criterion.
|
||||
-- Tolerance is used to correct the curve at a knot that respects
|
||||
-- geometrically the criterion, in order to reduce the
|
||||
-- multiplicity of the knot.
|
||||
|
||||
uses
|
||||
|
||||
Curve from Geom,
|
||||
Shape from GeomAbs
|
||||
|
||||
is
|
||||
|
||||
Create returns SplitCurve3dContinuity from ShapeUpgrade;
|
||||
---Purpose: Empty constructor.
|
||||
|
||||
SetCriterion (me: mutable; Criterion: Shape from GeomAbs);
|
||||
---Purpose: Sets criterion for splitting.
|
||||
|
||||
SetTolerance (me: mutable; Tol: Real);
|
||||
---Purpose: Sets tolerance.
|
||||
|
||||
|
||||
Compute(me: mutable) is redefined;
|
||||
---Purpose: Calculates points for correction/splitting of the curve
|
||||
|
||||
GetCurve(me) returns Curve from Geom;
|
||||
---C++: return const&
|
||||
|
||||
|
||||
fields
|
||||
|
||||
myCriterion: Shape from GeomAbs;
|
||||
myTolerance: Real;
|
||||
myCont : Integer;
|
||||
|
||||
end SplitCurve3dContinuity;
|
@@ -14,25 +14,25 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <ShapeUpgrade_SplitCurve3dContinuity.ixx>
|
||||
|
||||
#include <Geom_BSplineCurve.hxx>
|
||||
#include <Geom_Curve.hxx>
|
||||
#include <Geom_OffsetCurve.hxx>
|
||||
#include <Geom_TrimmedCurve.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <ShapeExtend.hxx>
|
||||
#include <ShapeUpgrade.hxx>
|
||||
#include <ShapeUpgrade_SplitCurve3dContinuity.hxx>
|
||||
#include <Standard_ErrorHandler.hxx>
|
||||
#include <Standard_Failure.hxx>
|
||||
#include <Geom_BSplineCurve.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <ShapeUpgrade.hxx>
|
||||
#include <Geom_TrimmedCurve.hxx>
|
||||
#include <Geom_TrimmedCurve.hxx>
|
||||
#include <Geom_OffsetCurve.hxx>
|
||||
#include <Geom_Curve.hxx>
|
||||
#include <TColStd_HSequenceOfReal.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TColGeom_HArray1OfCurve.hxx>
|
||||
#include <ShapeExtend.hxx>
|
||||
#include <TColStd_HSequenceOfReal.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : ShapeUpgrade_SplitCurve3dContinuity
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
ShapeUpgrade_SplitCurve3dContinuity::ShapeUpgrade_SplitCurve3dContinuity()
|
||||
{
|
||||
myCriterion = GeomAbs_C1;
|
||||
|
83
src/ShapeUpgrade/ShapeUpgrade_SplitCurve3dContinuity.hxx
Normal file
83
src/ShapeUpgrade/ShapeUpgrade_SplitCurve3dContinuity.hxx
Normal file
@@ -0,0 +1,83 @@
|
||||
// Created on: 1999-04-15
|
||||
// Created by: Roman LYGIN
|
||||
// Copyright (c) 1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _ShapeUpgrade_SplitCurve3dContinuity_HeaderFile
|
||||
#define _ShapeUpgrade_SplitCurve3dContinuity_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <GeomAbs_Shape.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <ShapeUpgrade_SplitCurve3d.hxx>
|
||||
class Geom_Curve;
|
||||
|
||||
|
||||
class ShapeUpgrade_SplitCurve3dContinuity;
|
||||
DEFINE_STANDARD_HANDLE(ShapeUpgrade_SplitCurve3dContinuity, ShapeUpgrade_SplitCurve3d)
|
||||
|
||||
//! Corrects/splits a 2d curve with a continuity criterion.
|
||||
//! Tolerance is used to correct the curve at a knot that respects
|
||||
//! geometrically the criterion, in order to reduce the
|
||||
//! multiplicity of the knot.
|
||||
class ShapeUpgrade_SplitCurve3dContinuity : public ShapeUpgrade_SplitCurve3d
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Empty constructor.
|
||||
Standard_EXPORT ShapeUpgrade_SplitCurve3dContinuity();
|
||||
|
||||
//! Sets criterion for splitting.
|
||||
Standard_EXPORT void SetCriterion (const GeomAbs_Shape Criterion);
|
||||
|
||||
//! Sets tolerance.
|
||||
Standard_EXPORT void SetTolerance (const Standard_Real Tol);
|
||||
|
||||
//! Calculates points for correction/splitting of the curve
|
||||
Standard_EXPORT virtual void Compute() Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT const Handle(Geom_Curve)& GetCurve() const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(ShapeUpgrade_SplitCurve3dContinuity,ShapeUpgrade_SplitCurve3d)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
GeomAbs_Shape myCriterion;
|
||||
Standard_Real myTolerance;
|
||||
Standard_Integer myCont;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _ShapeUpgrade_SplitCurve3dContinuity_HeaderFile
|
@@ -1,95 +0,0 @@
|
||||
-- Created on: 1998-03-16
|
||||
-- Created by: Pierre BARRAS
|
||||
-- Copyright (c) 1998-1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class SplitSurface from ShapeUpgrade inherits TShared from MMgt
|
||||
|
||||
---Purpose: Splits a Surface with a criterion.
|
||||
|
||||
uses
|
||||
HArray1OfInteger from TColStd,
|
||||
HSequenceOfReal from TColStd,
|
||||
HArray2OfSurface from TColGeom,
|
||||
Surface from Geom,
|
||||
Status from ShapeExtend,
|
||||
CompositeSurface from ShapeExtend
|
||||
|
||||
is
|
||||
|
||||
Create returns SplitSurface from ShapeUpgrade;
|
||||
---Purpose: Empty constructor.
|
||||
|
||||
Init (me: mutable; S: Surface from Geom);
|
||||
---Purpose: Initializes with single supporting surface.
|
||||
|
||||
Init (me: mutable; S: Surface from Geom; UFirst,ULast,VFirst,VLast : Real);
|
||||
---Purpose: Initializes with single supporting surface with bounding parameters.
|
||||
|
||||
SetUSplitValues(me: mutable; UValues : HSequenceOfReal from TColStd);
|
||||
---Purpose: Sets U parameters where splitting has to be done
|
||||
|
||||
SetVSplitValues(me: mutable; VValues : HSequenceOfReal from TColStd);
|
||||
---Purpose: Sets V parameters where splitting has to be done
|
||||
|
||||
Build (me: mutable; Segment: Boolean) is virtual;
|
||||
---Purpose: Performs splitting of the supporting surface.
|
||||
-- If resulting surface is B-Spline and Segment is True,
|
||||
-- the result is composed with segments of the surface bounded
|
||||
-- by the U and V SplitValues (method Geom_BSplineSurface::Segment
|
||||
-- is used).
|
||||
-- If Segment is False, the result is composed with
|
||||
-- Geom_RectangularTrimmedSurface all based on the same complete
|
||||
-- surface.
|
||||
-- Fields myNbResultingRow and myNbResultingCol must be set to
|
||||
-- specify the size of resulting grid of surfaces.
|
||||
Compute(me: mutable; Segment: Boolean = Standard_True) is virtual;
|
||||
---Purpose: Calculates points for correction/splitting of the surface.
|
||||
|
||||
Perform(me: mutable; Segment: Boolean = Standard_True);
|
||||
---Purpose: Performs correction/splitting of the surface.
|
||||
--- First defines splitting values by method Compute(), then calls method Build().
|
||||
USplitValues(me) returns HSequenceOfReal from TColStd;
|
||||
---C++: return const &
|
||||
--- Purpose : returns all the U splitting values including the
|
||||
-- First and Last parameters of the input surface
|
||||
VSplitValues(me) returns HSequenceOfReal from TColStd;
|
||||
---C++: return const &
|
||||
--- Purpose : returns all the splitting V values including the
|
||||
-- First and Last parameters of the input surface
|
||||
|
||||
|
||||
Status (me; status: Status from ShapeExtend) returns Boolean;
|
||||
---Purpose: Returns the status
|
||||
-- OK - no splitting is needed
|
||||
-- DONE1 - splitting required and gives more than one patch
|
||||
-- DONE2 - splitting is required, but gives only single patch (initial)
|
||||
-- DONE3 - geometric form of the surface or parametrisation is modified
|
||||
|
||||
ResSurfaces(me) returns CompositeSurface from ShapeExtend;
|
||||
---C++: return const &
|
||||
---Purpose: Returns obtained surfaces after splitting as CompositeSurface
|
||||
|
||||
fields
|
||||
|
||||
myUSplitValues : HSequenceOfReal from TColStd is protected;
|
||||
myVSplitValues : HSequenceOfReal from TColStd is protected;
|
||||
myNbResultingRow : Integer is protected;
|
||||
myNbResultingCol : Integer is protected;
|
||||
mySurface : Surface from Geom is protected;
|
||||
myStatus : Integer is protected;
|
||||
myResSurfaces : CompositeSurface from ShapeExtend is protected;
|
||||
|
||||
end;
|
||||
|
@@ -16,32 +16,32 @@
|
||||
|
||||
// gka 30.04.99 S4137: extended for all types of surfaces
|
||||
|
||||
#include <ShapeUpgrade_SplitSurface.ixx>
|
||||
#include <ShapeUpgrade.hxx>
|
||||
#include <Geom_BezierSurface.hxx>
|
||||
#include <Geom_BSplineSurface.hxx>
|
||||
#include <Geom_RectangularTrimmedSurface.hxx>
|
||||
#include <TColGeom_HArray2OfSurface.hxx>
|
||||
#include <TColStd_HSequenceOfReal.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <Geom_SurfaceOfRevolution.hxx>
|
||||
#include <Geom_SurfaceOfLinearExtrusion.hxx>
|
||||
#include <Geom_RectangularTrimmedSurface.hxx>
|
||||
#include <Geom_OffsetSurface.hxx>
|
||||
#include <ShapeUpgrade_SplitCurve3d.hxx>
|
||||
#include <TColGeom_HArray1OfCurve.hxx>
|
||||
#include <Geom_RectangularTrimmedSurface.hxx>
|
||||
#include <Geom_Surface.hxx>
|
||||
#include <Geom_SurfaceOfLinearExtrusion.hxx>
|
||||
#include <Geom_SurfaceOfRevolution.hxx>
|
||||
#include <gp_Ax1.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <ShapeExtend.hxx>
|
||||
#include <ShapeExtend_CompositeSurface.hxx>
|
||||
#include <ShapeUpgrade.hxx>
|
||||
#include <ShapeUpgrade_SplitCurve3d.hxx>
|
||||
#include <ShapeUpgrade_SplitSurface.hxx>
|
||||
#include <Standard_ErrorHandler.hxx>
|
||||
#include <Standard_Failure.hxx>
|
||||
#include <ShapeExtend.hxx>
|
||||
#include <Geom_BezierSurface.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TColGeom_HArray1OfCurve.hxx>
|
||||
#include <TColGeom_HArray2OfSurface.hxx>
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
#include <Geom_Surface.hxx>
|
||||
#include <TColStd_HSequenceOfReal.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : ShapeUpgrade_SplitSurface
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
ShapeUpgrade_SplitSurface::ShapeUpgrade_SplitSurface() : myStatus(0)
|
||||
{
|
||||
}
|
||||
|
125
src/ShapeUpgrade/ShapeUpgrade_SplitSurface.hxx
Normal file
125
src/ShapeUpgrade/ShapeUpgrade_SplitSurface.hxx
Normal file
@@ -0,0 +1,125 @@
|
||||
// Created on: 1998-03-16
|
||||
// Created by: Pierre BARRAS
|
||||
// Copyright (c) 1998-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _ShapeUpgrade_SplitSurface_HeaderFile
|
||||
#define _ShapeUpgrade_SplitSurface_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <TColStd_HSequenceOfReal.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <MMgt_TShared.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <ShapeExtend_Status.hxx>
|
||||
class Geom_Surface;
|
||||
class ShapeExtend_CompositeSurface;
|
||||
|
||||
|
||||
class ShapeUpgrade_SplitSurface;
|
||||
DEFINE_STANDARD_HANDLE(ShapeUpgrade_SplitSurface, MMgt_TShared)
|
||||
|
||||
//! Splits a Surface with a criterion.
|
||||
class ShapeUpgrade_SplitSurface : public MMgt_TShared
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Empty constructor.
|
||||
Standard_EXPORT ShapeUpgrade_SplitSurface();
|
||||
|
||||
//! Initializes with single supporting surface.
|
||||
Standard_EXPORT void Init (const Handle(Geom_Surface)& S);
|
||||
|
||||
//! Initializes with single supporting surface with bounding parameters.
|
||||
Standard_EXPORT void Init (const Handle(Geom_Surface)& S, const Standard_Real UFirst, const Standard_Real ULast, const Standard_Real VFirst, const Standard_Real VLast);
|
||||
|
||||
//! Sets U parameters where splitting has to be done
|
||||
Standard_EXPORT void SetUSplitValues (const Handle(TColStd_HSequenceOfReal)& UValues);
|
||||
|
||||
//! Sets V parameters where splitting has to be done
|
||||
Standard_EXPORT void SetVSplitValues (const Handle(TColStd_HSequenceOfReal)& VValues);
|
||||
|
||||
//! Performs splitting of the supporting surface.
|
||||
//! If resulting surface is B-Spline and Segment is True,
|
||||
//! the result is composed with segments of the surface bounded
|
||||
//! by the U and V SplitValues (method Geom_BSplineSurface::Segment
|
||||
//! is used).
|
||||
//! If Segment is False, the result is composed with
|
||||
//! Geom_RectangularTrimmedSurface all based on the same complete
|
||||
//! surface.
|
||||
//! Fields myNbResultingRow and myNbResultingCol must be set to
|
||||
//! specify the size of resulting grid of surfaces.
|
||||
Standard_EXPORT virtual void Build (const Standard_Boolean Segment);
|
||||
|
||||
//! Calculates points for correction/splitting of the surface.
|
||||
Standard_EXPORT virtual void Compute (const Standard_Boolean Segment = Standard_True);
|
||||
|
||||
//! Performs correction/splitting of the surface.
|
||||
//! First defines splitting values by method Compute(), then calls method Build().
|
||||
Standard_EXPORT void Perform (const Standard_Boolean Segment = Standard_True);
|
||||
|
||||
//! returns all the U splitting values including the
|
||||
//! First and Last parameters of the input surface
|
||||
Standard_EXPORT const Handle(TColStd_HSequenceOfReal)& USplitValues() const;
|
||||
|
||||
//! returns all the splitting V values including the
|
||||
//! First and Last parameters of the input surface
|
||||
Standard_EXPORT const Handle(TColStd_HSequenceOfReal)& VSplitValues() const;
|
||||
|
||||
//! Returns the status
|
||||
//! OK - no splitting is needed
|
||||
//! DONE1 - splitting required and gives more than one patch
|
||||
//! DONE2 - splitting is required, but gives only single patch (initial)
|
||||
//! DONE3 - geometric form of the surface or parametrisation is modified
|
||||
Standard_EXPORT Standard_Boolean Status (const ShapeExtend_Status status) const;
|
||||
|
||||
//! Returns obtained surfaces after splitting as CompositeSurface
|
||||
Standard_EXPORT const Handle(ShapeExtend_CompositeSurface)& ResSurfaces() const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(ShapeUpgrade_SplitSurface,MMgt_TShared)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
Handle(TColStd_HSequenceOfReal) myUSplitValues;
|
||||
Handle(TColStd_HSequenceOfReal) myVSplitValues;
|
||||
Standard_Integer myNbResultingRow;
|
||||
Standard_Integer myNbResultingCol;
|
||||
Handle(Geom_Surface) mySurface;
|
||||
Standard_Integer myStatus;
|
||||
Handle(ShapeExtend_CompositeSurface) myResSurfaces;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _ShapeUpgrade_SplitSurface_HeaderFile
|
@@ -1,42 +0,0 @@
|
||||
-- Created on: 1999-05-06
|
||||
-- Created by: data exchange team
|
||||
-- Copyright (c) 1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class SplitSurfaceAngle from ShapeUpgrade inherits SplitSurface from ShapeUpgrade
|
||||
|
||||
---Purpose: Splits a surfaces of revolution, cylindrical, toroidal,
|
||||
-- conical, spherical so that each resulting segment covers
|
||||
-- not more than defined number of degrees.
|
||||
|
||||
is
|
||||
|
||||
Create (MaxAngle: Real) returns SplitSurfaceAngle from ShapeUpgrade;
|
||||
---Purpose: Empty constructor.
|
||||
|
||||
SetMaxAngle (me: mutable; MaxAngle: Real);
|
||||
---Purpose: Set maximal angle
|
||||
|
||||
MaxAngle (me) returns Real;
|
||||
---Purpose: Returns maximal angle
|
||||
|
||||
Compute(me: mutable; Segment: Boolean) is redefined;
|
||||
---Purpose: Performs splitting of the supporting surface(s).
|
||||
--- First defines splitting values, then calls inherited method.
|
||||
|
||||
fields
|
||||
|
||||
myMaxAngle: Real;
|
||||
|
||||
end SplitSurfaceAngle;
|
@@ -14,23 +14,24 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <ShapeUpgrade_SplitSurfaceAngle.ixx>
|
||||
#include <Geom_SurfaceOfRevolution.hxx>
|
||||
|
||||
#include <Geom_ConicalSurface.hxx>
|
||||
#include <Geom_ToroidalSurface.hxx>
|
||||
#include <Geom_CylindricalSurface.hxx>
|
||||
#include <Geom_SphericalSurface.hxx>
|
||||
#include <TColStd_HSequenceOfReal.hxx>
|
||||
#include <ShapeExtend.hxx>
|
||||
#include <Geom_RectangularTrimmedSurface.hxx>
|
||||
#include <Geom_OffsetSurface.hxx>
|
||||
#include <Geom_RectangularTrimmedSurface.hxx>
|
||||
#include <Geom_SphericalSurface.hxx>
|
||||
#include <Geom_SurfaceOfRevolution.hxx>
|
||||
#include <Geom_ToroidalSurface.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <ShapeExtend.hxx>
|
||||
#include <ShapeUpgrade_SplitSurfaceAngle.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TColStd_HSequenceOfReal.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : ShapeUpgrade_SplitSurfaceAngle
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
ShapeUpgrade_SplitSurfaceAngle::ShapeUpgrade_SplitSurfaceAngle (const Standard_Real MaxAngle)
|
||||
{
|
||||
myMaxAngle = MaxAngle;
|
||||
|
77
src/ShapeUpgrade/ShapeUpgrade_SplitSurfaceAngle.hxx
Normal file
77
src/ShapeUpgrade/ShapeUpgrade_SplitSurfaceAngle.hxx
Normal file
@@ -0,0 +1,77 @@
|
||||
// Created on: 1999-05-06
|
||||
// Created by: data exchange team
|
||||
// Copyright (c) 1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _ShapeUpgrade_SplitSurfaceAngle_HeaderFile
|
||||
#define _ShapeUpgrade_SplitSurfaceAngle_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Standard_Real.hxx>
|
||||
#include <ShapeUpgrade_SplitSurface.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
|
||||
|
||||
class ShapeUpgrade_SplitSurfaceAngle;
|
||||
DEFINE_STANDARD_HANDLE(ShapeUpgrade_SplitSurfaceAngle, ShapeUpgrade_SplitSurface)
|
||||
|
||||
//! Splits a surfaces of revolution, cylindrical, toroidal,
|
||||
//! conical, spherical so that each resulting segment covers
|
||||
//! not more than defined number of degrees.
|
||||
class ShapeUpgrade_SplitSurfaceAngle : public ShapeUpgrade_SplitSurface
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Empty constructor.
|
||||
Standard_EXPORT ShapeUpgrade_SplitSurfaceAngle(const Standard_Real MaxAngle);
|
||||
|
||||
//! Set maximal angle
|
||||
Standard_EXPORT void SetMaxAngle (const Standard_Real MaxAngle);
|
||||
|
||||
//! Returns maximal angle
|
||||
Standard_EXPORT Standard_Real MaxAngle() const;
|
||||
|
||||
//! Performs splitting of the supporting surface(s).
|
||||
//! First defines splitting values, then calls inherited method.
|
||||
Standard_EXPORT virtual void Compute (const Standard_Boolean Segment) Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(ShapeUpgrade_SplitSurfaceAngle,ShapeUpgrade_SplitSurface)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Standard_Real myMaxAngle;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _ShapeUpgrade_SplitSurfaceAngle_HeaderFile
|
@@ -1,38 +0,0 @@
|
||||
-- Created on: 2006-08-07
|
||||
-- Created by: Galina KULIKOVA
|
||||
-- Copyright (c) 2006-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class SplitSurfaceArea from ShapeUpgrade inherits SplitSurface from ShapeUpgrade
|
||||
|
||||
---Purpose:Split surface in the parametric space
|
||||
-- in according specified number of splits on the
|
||||
|
||||
|
||||
|
||||
is
|
||||
Create returns SplitSurfaceArea from ShapeUpgrade;
|
||||
---Purpose: Empty constructor.
|
||||
|
||||
NbParts(me: mutable) returns Integer;
|
||||
---C++: inline
|
||||
---C++: return &
|
||||
---Purpose:Set number of split for surfaces
|
||||
|
||||
Compute(me: mutable; Segment: Boolean = Standard_True) is redefined;
|
||||
|
||||
fields
|
||||
|
||||
myNbParts : Integer; -- number of splitting
|
||||
|
||||
end SplitSurfaceArea;
|
@@ -11,15 +11,16 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <ShapeUpgrade_SplitSurfaceArea.ixx>
|
||||
#include <TColStd_HSequenceOfReal.hxx>
|
||||
|
||||
#include <GeomAdaptor_Surface.hxx>
|
||||
#include <ShapeUpgrade_SplitSurfaceArea.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TColStd_HSequenceOfReal.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : ShapeUpgrade_SplitSurfaceArea
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
ShapeUpgrade_SplitSurfaceArea::ShapeUpgrade_SplitSurfaceArea():
|
||||
ShapeUpgrade_SplitSurface()
|
||||
{
|
||||
|
71
src/ShapeUpgrade/ShapeUpgrade_SplitSurfaceArea.hxx
Normal file
71
src/ShapeUpgrade/ShapeUpgrade_SplitSurfaceArea.hxx
Normal file
@@ -0,0 +1,71 @@
|
||||
// Created on: 2006-08-07
|
||||
// Created by: Galina KULIKOVA
|
||||
// Copyright (c) 2006-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _ShapeUpgrade_SplitSurfaceArea_HeaderFile
|
||||
#define _ShapeUpgrade_SplitSurfaceArea_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <ShapeUpgrade_SplitSurface.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
|
||||
|
||||
class ShapeUpgrade_SplitSurfaceArea;
|
||||
DEFINE_STANDARD_HANDLE(ShapeUpgrade_SplitSurfaceArea, ShapeUpgrade_SplitSurface)
|
||||
|
||||
//! Split surface in the parametric space
|
||||
//! in according specified number of splits on the
|
||||
class ShapeUpgrade_SplitSurfaceArea : public ShapeUpgrade_SplitSurface
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Empty constructor.
|
||||
Standard_EXPORT ShapeUpgrade_SplitSurfaceArea();
|
||||
|
||||
//! Set number of split for surfaces
|
||||
Standard_Integer& NbParts();
|
||||
|
||||
Standard_EXPORT virtual void Compute (const Standard_Boolean Segment = Standard_True) Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(ShapeUpgrade_SplitSurfaceArea,ShapeUpgrade_SplitSurface)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Standard_Integer myNbParts;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#include <ShapeUpgrade_SplitSurfaceArea.lxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _ShapeUpgrade_SplitSurfaceArea_HeaderFile
|
@@ -1,51 +0,0 @@
|
||||
-- Created on: 1999-04-14
|
||||
-- Created by: Roman LYGIN
|
||||
-- Copyright (c) 1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class SplitSurfaceContinuity from ShapeUpgrade inherits SplitSurface from ShapeUpgrade
|
||||
|
||||
---Purpose: Splits a Surface with a continuity criterion.
|
||||
-- At the present moment C1 criterion is used only.
|
||||
-- This tool works with tolerance. If C0 surface can be corrected
|
||||
-- at a knot with given tolerance then the surface is corrected,
|
||||
-- otherwise it is spltted at that knot.
|
||||
|
||||
uses
|
||||
|
||||
Shape from GeomAbs
|
||||
|
||||
is
|
||||
|
||||
Create returns SplitSurfaceContinuity from ShapeUpgrade;
|
||||
---Purpose: Empty constructor.
|
||||
|
||||
SetCriterion (me: mutable; Criterion: Shape from GeomAbs);
|
||||
---Purpose: Sets criterion for splitting.
|
||||
|
||||
SetTolerance (me: mutable; Tol: Real);
|
||||
---Purpose: Sets tolerance.
|
||||
|
||||
--Build (me: mutable; Segment: Boolean) is redefined;
|
||||
--Purpose: Performs correction/splitting of the supporting surface(s).
|
||||
--- First defines splitting values, then calls inherited method.
|
||||
Compute(me: mutable; Segment: Boolean) is redefined;
|
||||
--Perform(me: mutable; Segment: Boolean);
|
||||
fields
|
||||
|
||||
myCriterion: Shape from GeomAbs;
|
||||
myTolerance: Real;
|
||||
myCont : Integer;
|
||||
|
||||
end SplitSurfaceContinuity;
|
@@ -14,27 +14,29 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <ShapeUpgrade_SplitSurfaceContinuity.ixx>
|
||||
|
||||
#include <Geom_BSplineSurface.hxx>
|
||||
#include <Geom_OffsetSurface.hxx>
|
||||
#include <Geom_RectangularTrimmedSurface.hxx>
|
||||
#include <Geom_SurfaceOfLinearExtrusion.hxx>
|
||||
#include <Geom_SurfaceOfRevolution.hxx>
|
||||
#include <Geom_SweptSurface.hxx>
|
||||
#include <gp_Ax1.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <ShapeExtend.hxx>
|
||||
#include <ShapeUpgrade.hxx>
|
||||
#include <ShapeUpgrade_SplitCurve3dContinuity.hxx>
|
||||
#include <ShapeUpgrade_SplitSurfaceContinuity.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TColGeom_HArray1OfCurve.hxx>
|
||||
#include <TColGeom_HArray2OfSurface.hxx>
|
||||
#include <TColStd_HArray1OfInteger.hxx>
|
||||
#include <Geom_SweptSurface.hxx>
|
||||
#include <TColStd_HSequenceOfReal.hxx>
|
||||
#include <Geom_SurfaceOfRevolution.hxx>
|
||||
#include <ShapeUpgrade_SplitCurve3dContinuity.hxx>
|
||||
#include <Geom_SurfaceOfLinearExtrusion.hxx>
|
||||
#include <TColGeom_HArray1OfCurve.hxx>
|
||||
#include <gp_Ax1.hxx>
|
||||
#include <Geom_RectangularTrimmedSurface.hxx>
|
||||
#include <Geom_OffsetSurface.hxx>
|
||||
#include <ShapeExtend.hxx>
|
||||
|
||||
//======================================================================
|
||||
//function : ShapeUpgrade_SplitSurface
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
ShapeUpgrade_SplitSurfaceContinuity::ShapeUpgrade_SplitSurfaceContinuity()
|
||||
{
|
||||
myCriterion = GeomAbs_C1;
|
||||
|
81
src/ShapeUpgrade/ShapeUpgrade_SplitSurfaceContinuity.hxx
Normal file
81
src/ShapeUpgrade/ShapeUpgrade_SplitSurfaceContinuity.hxx
Normal file
@@ -0,0 +1,81 @@
|
||||
// Created on: 1999-04-14
|
||||
// Created by: Roman LYGIN
|
||||
// Copyright (c) 1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _ShapeUpgrade_SplitSurfaceContinuity_HeaderFile
|
||||
#define _ShapeUpgrade_SplitSurfaceContinuity_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <GeomAbs_Shape.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <ShapeUpgrade_SplitSurface.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
|
||||
|
||||
class ShapeUpgrade_SplitSurfaceContinuity;
|
||||
DEFINE_STANDARD_HANDLE(ShapeUpgrade_SplitSurfaceContinuity, ShapeUpgrade_SplitSurface)
|
||||
|
||||
//! Splits a Surface with a continuity criterion.
|
||||
//! At the present moment C1 criterion is used only.
|
||||
//! This tool works with tolerance. If C0 surface can be corrected
|
||||
//! at a knot with given tolerance then the surface is corrected,
|
||||
//! otherwise it is spltted at that knot.
|
||||
class ShapeUpgrade_SplitSurfaceContinuity : public ShapeUpgrade_SplitSurface
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Empty constructor.
|
||||
Standard_EXPORT ShapeUpgrade_SplitSurfaceContinuity();
|
||||
|
||||
//! Sets criterion for splitting.
|
||||
Standard_EXPORT void SetCriterion (const GeomAbs_Shape Criterion);
|
||||
|
||||
//! Sets tolerance.
|
||||
Standard_EXPORT void SetTolerance (const Standard_Real Tol);
|
||||
|
||||
Standard_EXPORT virtual void Compute (const Standard_Boolean Segment) Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(ShapeUpgrade_SplitSurfaceContinuity,ShapeUpgrade_SplitSurface)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
GeomAbs_Shape myCriterion;
|
||||
Standard_Real myTolerance;
|
||||
Standard_Integer myCont;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _ShapeUpgrade_SplitSurfaceContinuity_HeaderFile
|
@@ -1,79 +0,0 @@
|
||||
-- Created on: 1999-08-31
|
||||
-- Created by: Pavel DURANDIN
|
||||
-- Copyright (c) 1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
private class Tool from ShapeUpgrade inherits TShared from MMgt
|
||||
|
||||
---Purpose: Tool is a root class for splitting classes
|
||||
-- Provides context for recording changes, basic
|
||||
-- precision value and limit (minimal and maximal)
|
||||
-- values for tolerances
|
||||
|
||||
uses
|
||||
|
||||
ReShape from ShapeBuild
|
||||
|
||||
is
|
||||
|
||||
Create returns Tool from ShapeUpgrade;
|
||||
---Purpose: Empty constructor
|
||||
|
||||
Set (me: mutable; tool: Tool from ShapeUpgrade);
|
||||
---Purpose: Copy all fields from another Root object
|
||||
|
||||
SetContext (me: mutable; context : ReShape from ShapeBuild);
|
||||
---Purpose: Sets context
|
||||
---C++: inline
|
||||
|
||||
Context (me) returns ReShape from ShapeBuild;
|
||||
---Purpose: Returns context
|
||||
---C++: inline
|
||||
|
||||
SetPrecision (me: mutable; preci: Real);
|
||||
---Purpose: Sets basic precision value
|
||||
---C++: inline
|
||||
|
||||
Precision (me) returns Real;
|
||||
---Purpose: Returns basic precision value
|
||||
---C++: inline
|
||||
|
||||
SetMinTolerance (me: mutable; mintol: Real);
|
||||
---Purpose: Sets minimal allowed tolerance
|
||||
---C++: inline
|
||||
|
||||
MinTolerance (me) returns Real;
|
||||
---Purpose: Returns minimal allowed tolerance
|
||||
---C++: inline
|
||||
|
||||
SetMaxTolerance (me: mutable; maxtol: Real);
|
||||
---Purpose: Sets maximal allowed tolerance
|
||||
---C++: inline
|
||||
|
||||
MaxTolerance (me) returns Real;
|
||||
---Purpose: Returns maximal allowed tolerance
|
||||
---C++: inline
|
||||
|
||||
LimitTolerance (me; toler: Real) returns Real;
|
||||
---Purpose: Returns tolerance limited by [myMinTol,myMaxTol]
|
||||
---C++: inline
|
||||
|
||||
fields
|
||||
|
||||
myContext : ReShape from ShapeBuild;
|
||||
myPrecision: Real; -- basic precision
|
||||
myMinTol : Real; -- minimal allowed tolerance
|
||||
myMaxTol : Real; -- maximal allowed tolerance
|
||||
|
||||
end Tool;
|
@@ -14,14 +14,16 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <ShapeUpgrade_Tool.ixx>
|
||||
|
||||
#include <Precision.hxx>
|
||||
#include <ShapeBuild_ReShape.hxx>
|
||||
#include <ShapeUpgrade_Tool.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : ShapeUpgrade_Tool
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
ShapeUpgrade_Tool::ShapeUpgrade_Tool()
|
||||
{
|
||||
myPrecision = myMinTol = Precision::Confusion();
|
||||
|
102
src/ShapeUpgrade/ShapeUpgrade_Tool.hxx
Normal file
102
src/ShapeUpgrade/ShapeUpgrade_Tool.hxx
Normal file
@@ -0,0 +1,102 @@
|
||||
// Created on: 1999-08-31
|
||||
// Created by: Pavel DURANDIN
|
||||
// Copyright (c) 1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _ShapeUpgrade_Tool_HeaderFile
|
||||
#define _ShapeUpgrade_Tool_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Standard_Real.hxx>
|
||||
#include <MMgt_TShared.hxx>
|
||||
class ShapeBuild_ReShape;
|
||||
|
||||
|
||||
class ShapeUpgrade_Tool;
|
||||
DEFINE_STANDARD_HANDLE(ShapeUpgrade_Tool, MMgt_TShared)
|
||||
|
||||
//! Tool is a root class for splitting classes
|
||||
//! Provides context for recording changes, basic
|
||||
//! precision value and limit (minimal and maximal)
|
||||
//! values for tolerances
|
||||
class ShapeUpgrade_Tool : public MMgt_TShared
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Empty constructor
|
||||
Standard_EXPORT ShapeUpgrade_Tool();
|
||||
|
||||
//! Copy all fields from another Root object
|
||||
Standard_EXPORT void Set (const Handle(ShapeUpgrade_Tool)& tool);
|
||||
|
||||
//! Sets context
|
||||
void SetContext (const Handle(ShapeBuild_ReShape)& context);
|
||||
|
||||
//! Returns context
|
||||
Handle(ShapeBuild_ReShape) Context() const;
|
||||
|
||||
//! Sets basic precision value
|
||||
void SetPrecision (const Standard_Real preci);
|
||||
|
||||
//! Returns basic precision value
|
||||
Standard_Real Precision() const;
|
||||
|
||||
//! Sets minimal allowed tolerance
|
||||
void SetMinTolerance (const Standard_Real mintol);
|
||||
|
||||
//! Returns minimal allowed tolerance
|
||||
Standard_Real MinTolerance() const;
|
||||
|
||||
//! Sets maximal allowed tolerance
|
||||
void SetMaxTolerance (const Standard_Real maxtol);
|
||||
|
||||
//! Returns maximal allowed tolerance
|
||||
Standard_Real MaxTolerance() const;
|
||||
|
||||
//! Returns tolerance limited by [myMinTol,myMaxTol]
|
||||
Standard_Real LimitTolerance (const Standard_Real toler) const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(ShapeUpgrade_Tool,MMgt_TShared)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Handle(ShapeBuild_ReShape) myContext;
|
||||
Standard_Real myPrecision;
|
||||
Standard_Real myMinTol;
|
||||
Standard_Real myMaxTol;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#include <ShapeUpgrade_Tool.lxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _ShapeUpgrade_Tool_HeaderFile
|
@@ -1,74 +0,0 @@
|
||||
---Copyright: Open CASCADE 2014
|
||||
-- Created on: 2012-06-09
|
||||
-- Created by: jgv@ROLEX
|
||||
-- Copyright (c) 2012-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class UnifySameDomain from ShapeUpgrade inherits TShared from MMgt
|
||||
|
||||
---Purpose: Unifies same domain faces and edges of specified shape
|
||||
|
||||
uses
|
||||
Shape from TopoDS,
|
||||
ListOfShape from TopTools,
|
||||
ReShape from ShapeBuild
|
||||
|
||||
is
|
||||
Create returns UnifySameDomain from ShapeUpgrade;
|
||||
---Purpose: empty constructor
|
||||
|
||||
Create(aShape: Shape from TopoDS;
|
||||
UnifyEdges: Boolean from Standard = Standard_True;
|
||||
UnifyFaces: Boolean from Standard = Standard_True;
|
||||
ConcatBSplines: Boolean from Standard = Standard_False)
|
||||
returns UnifySameDomain from ShapeUpgrade;
|
||||
|
||||
Initialize(me: mutable; aShape: Shape from TopoDS;
|
||||
UnifyEdges: Boolean from Standard = Standard_True;
|
||||
UnifyFaces: Boolean from Standard = Standard_True;
|
||||
ConcatBSplines: Boolean from Standard = Standard_False);
|
||||
|
||||
Build( me : mutable );
|
||||
---Purpose: Builds the resulting shape
|
||||
|
||||
Shape(me) returns Shape from TopoDS;
|
||||
---C++: return const &
|
||||
---Purpose: Gives the resulting shape
|
||||
|
||||
Generated (me; aShape : Shape from TopoDS)
|
||||
returns Shape from TopoDS;
|
||||
|
||||
UnifyFaces(me: mutable);
|
||||
---Purpose: this method makes if possible a common face from each
|
||||
-- group of faces lying on coincident surfaces
|
||||
|
||||
UnifyEdges(me: mutable);
|
||||
---Purpose: this method makes if possible a common edge from each
|
||||
-- group of edges connecting common couple of faces
|
||||
|
||||
UnifyFacesAndEdges(me: mutable);
|
||||
---Purpose: this method unifies same domain faces and edges
|
||||
|
||||
fields
|
||||
|
||||
myInitShape : Shape from TopoDS;
|
||||
myUnifyFaces : Boolean from Standard;
|
||||
myUnifyEdges : Boolean from Standard;
|
||||
myConcatBSplines : Boolean from Standard;
|
||||
|
||||
myShape : Shape from TopoDS;
|
||||
|
||||
myContext : ReShape from ShapeBuild;
|
||||
--myOldNewMap : DataMapOfShapeShape from TopTools;
|
||||
|
||||
end UnifySameDomain;
|
@@ -13,76 +13,76 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <ShapeUpgrade_UnifySameDomain.ixx>
|
||||
#include <ShapeUpgrade_UnifySameDomain.hxx>
|
||||
#include <TopTools_SequenceOfShape.hxx>
|
||||
#include <TopTools_IndexedMapOfShape.hxx>
|
||||
#include <TopExp_Explorer.hxx>
|
||||
#include <Geom_Surface.hxx>
|
||||
#include <Geom_Line.hxx>
|
||||
#include <gp_Dir.hxx>
|
||||
#include <Geom_CylindricalSurface.hxx>
|
||||
#include <gp_Cylinder.hxx>
|
||||
#include <Geom_SurfaceOfRevolution.hxx>
|
||||
#include <Geom_SurfaceOfLinearExtrusion.hxx>
|
||||
#include <gp_Lin.hxx>
|
||||
#include <Geom_Circle.hxx>
|
||||
#include <Geom_RectangularTrimmedSurface.hxx>
|
||||
#include <TopoDS_Face.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <GeomAdaptor_HSurface.hxx>
|
||||
#include <BRepTopAdaptor_TopolTool.hxx>
|
||||
#include <IntPatch_ImpImpIntersection.hxx>
|
||||
#include <GeomLib_IsPlanarSurface.hxx>
|
||||
|
||||
#include <BRep_Builder.hxx>
|
||||
#include <ShapeFix_Wire.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
#include <ShapeAnalysis_Edge.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <TColGeom_SequenceOfSurface.hxx>
|
||||
#include <BRep_CurveRepresentation.hxx>
|
||||
#include <BRep_ListIteratorOfListOfCurveRepresentation.hxx>
|
||||
#include <BRep_TEdge.hxx>
|
||||
#include <BRep_CurveRepresentation.hxx>
|
||||
#include <TColGeom_Array1OfBSplineCurve.hxx>
|
||||
#include <TColGeom_HArray1OfBSplineCurve.hxx>
|
||||
#include <TColGeom2d_Array1OfBSplineCurve.hxx>
|
||||
#include <TColGeom2d_HArray1OfBSplineCurve.hxx>
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
#include <TopExp.hxx>
|
||||
#include <Geom_TrimmedCurve.hxx>
|
||||
#include <Geom2d_TrimmedCurve.hxx>
|
||||
#include <GeomConvert.hxx>
|
||||
#include <Geom2dConvert.hxx>
|
||||
#include <GeomConvert_CompCurveToBSplineCurve.hxx>
|
||||
#include <Geom2dConvert_CompCurveToBSplineCurve.hxx>
|
||||
#include <TColGeom2d_SequenceOfBoundedCurve.hxx>
|
||||
#include <BRepLib_MakeEdge.hxx>
|
||||
#include <TColStd_MapOfInteger.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <BRepLib.hxx>
|
||||
#include <BRepLib_MakeEdge.hxx>
|
||||
#include <BRepTopAdaptor_TopolTool.hxx>
|
||||
#include <GC_MakeCircle.hxx>
|
||||
#include <Geom2d_Line.hxx>
|
||||
#include <Geom2d_TrimmedCurve.hxx>
|
||||
#include <Geom2dConvert.hxx>
|
||||
#include <Geom2dConvert_CompCurveToBSplineCurve.hxx>
|
||||
#include <Geom_BezierCurve.hxx>
|
||||
#include <ShapeBuild_ReShape.hxx>
|
||||
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
|
||||
#include <TopTools_MapOfShape.hxx>
|
||||
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
||||
#include <Geom_BSplineCurve.hxx>
|
||||
#include <Geom_Circle.hxx>
|
||||
#include <Geom_CylindricalSurface.hxx>
|
||||
#include <Geom_ElementarySurface.hxx>
|
||||
#include <Geom_Line.hxx>
|
||||
#include <Geom_OffsetSurface.hxx>
|
||||
#include <Geom_RectangularTrimmedSurface.hxx>
|
||||
#include <Geom_Surface.hxx>
|
||||
#include <Geom_SurfaceOfLinearExtrusion.hxx>
|
||||
#include <Geom_SurfaceOfRevolution.hxx>
|
||||
#include <Geom_SweptSurface.hxx>
|
||||
#include <Geom_TrimmedCurve.hxx>
|
||||
#include <GeomAdaptor_HSurface.hxx>
|
||||
#include <GeomConvert.hxx>
|
||||
#include <GeomConvert_CompCurveToBSplineCurve.hxx>
|
||||
#include <GeomLib_IsPlanarSurface.hxx>
|
||||
#include <gp_Cylinder.hxx>
|
||||
#include <gp_Dir.hxx>
|
||||
#include <gp_Lin.hxx>
|
||||
#include <IntPatch_ImpImpIntersection.hxx>
|
||||
#include <ShapeAnalysis_Edge.hxx>
|
||||
#include <ShapeAnalysis_WireOrder.hxx>
|
||||
#include <ShapeBuild_Edge.hxx>
|
||||
#include <Geom2d_Line.hxx>
|
||||
#include <ShapeFix_Face.hxx>
|
||||
#include <TColGeom_HArray2OfSurface.hxx>
|
||||
#include <ShapeBuild_ReShape.hxx>
|
||||
#include <ShapeExtend_CompositeSurface.hxx>
|
||||
#include <ShapeFix_ComposeShell.hxx>
|
||||
#include <ShapeFix_SequenceOfWireSegment.hxx>
|
||||
#include <ShapeFix_WireSegment.hxx>
|
||||
#include <ShapeFix_Edge.hxx>
|
||||
#include <ShapeFix_Face.hxx>
|
||||
#include <ShapeFix_SequenceOfWireSegment.hxx>
|
||||
#include <ShapeFix_Shell.hxx>
|
||||
#include <ShapeFix_Wire.hxx>
|
||||
#include <ShapeFix_WireSegment.hxx>
|
||||
#include <ShapeUpgrade_RemoveLocations.hxx>
|
||||
#include <ShapeUpgrade_UnifySameDomain.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TColGeom2d_Array1OfBSplineCurve.hxx>
|
||||
#include <TColGeom2d_HArray1OfBSplineCurve.hxx>
|
||||
#include <TColGeom2d_SequenceOfBoundedCurve.hxx>
|
||||
#include <TColGeom_Array1OfBSplineCurve.hxx>
|
||||
#include <TColGeom_HArray1OfBSplineCurve.hxx>
|
||||
#include <TColGeom_HArray2OfSurface.hxx>
|
||||
#include <TColGeom_SequenceOfSurface.hxx>
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
#include <TColStd_MapOfInteger.hxx>
|
||||
#include <TopExp.hxx>
|
||||
#include <TopExp_Explorer.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <TopoDS_Face.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
|
||||
#include <TopTools_IndexedMapOfShape.hxx>
|
||||
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
||||
#include <TopTools_MapOfShape.hxx>
|
||||
#include <Geom_ElementarySurface.hxx>
|
||||
#include <Geom_SweptSurface.hxx>
|
||||
#include <Geom_BSplineCurve.hxx>
|
||||
#include <Geom_OffsetSurface.hxx>
|
||||
|
||||
#include <TopTools_SequenceOfShape.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : AddOrdinaryEdges
|
||||
|
95
src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.hxx
Normal file
95
src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.hxx
Normal file
@@ -0,0 +1,95 @@
|
||||
//-Copyright: Open CASCADE 2014
|
||||
// Created on: 2012-06-09
|
||||
// Created by: jgv@ROLEX
|
||||
// Copyright (c) 2012-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _ShapeUpgrade_UnifySameDomain_HeaderFile
|
||||
#define _ShapeUpgrade_UnifySameDomain_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <MMgt_TShared.hxx>
|
||||
class ShapeBuild_ReShape;
|
||||
class TopoDS_Shape;
|
||||
|
||||
|
||||
class ShapeUpgrade_UnifySameDomain;
|
||||
DEFINE_STANDARD_HANDLE(ShapeUpgrade_UnifySameDomain, MMgt_TShared)
|
||||
|
||||
//! Unifies same domain faces and edges of specified shape
|
||||
class ShapeUpgrade_UnifySameDomain : public MMgt_TShared
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! empty constructor
|
||||
Standard_EXPORT ShapeUpgrade_UnifySameDomain();
|
||||
|
||||
Standard_EXPORT ShapeUpgrade_UnifySameDomain(const TopoDS_Shape& aShape, const Standard_Boolean UnifyEdges = Standard_True, const Standard_Boolean UnifyFaces = Standard_True, const Standard_Boolean ConcatBSplines = Standard_False);
|
||||
|
||||
Standard_EXPORT void Initialize (const TopoDS_Shape& aShape, const Standard_Boolean UnifyEdges = Standard_True, const Standard_Boolean UnifyFaces = Standard_True, const Standard_Boolean ConcatBSplines = Standard_False);
|
||||
|
||||
//! Builds the resulting shape
|
||||
Standard_EXPORT void Build();
|
||||
|
||||
//! Gives the resulting shape
|
||||
Standard_EXPORT const TopoDS_Shape& Shape() const;
|
||||
|
||||
Standard_EXPORT TopoDS_Shape Generated (const TopoDS_Shape& aShape) const;
|
||||
|
||||
//! this method makes if possible a common face from each
|
||||
//! group of faces lying on coincident surfaces
|
||||
Standard_EXPORT void UnifyFaces();
|
||||
|
||||
//! this method makes if possible a common edge from each
|
||||
//! group of edges connecting common couple of faces
|
||||
Standard_EXPORT void UnifyEdges();
|
||||
|
||||
//! this method unifies same domain faces and edges
|
||||
Standard_EXPORT void UnifyFacesAndEdges();
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(ShapeUpgrade_UnifySameDomain,MMgt_TShared)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
TopoDS_Shape myInitShape;
|
||||
Standard_Boolean myUnifyFaces;
|
||||
Standard_Boolean myUnifyEdges;
|
||||
Standard_Boolean myConcatBSplines;
|
||||
TopoDS_Shape myShape;
|
||||
Handle(ShapeBuild_ReShape) myContext;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _ShapeUpgrade_UnifySameDomain_HeaderFile
|
@@ -1,149 +0,0 @@
|
||||
-- Created on: 1999-04-15
|
||||
-- Created by: Roman LYGIN
|
||||
-- Copyright (c) 1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class WireDivide from ShapeUpgrade inherits Tool from ShapeUpgrade
|
||||
|
||||
---Purpose: Divides edges in the wire lying on the face or free wires or
|
||||
-- free edges with a criterion.
|
||||
-- Splits 3D curve and pcurve(s) of the edge on the face.
|
||||
-- Other pcurves which may be associated with the edge are simply
|
||||
-- copied.
|
||||
-- If 3D curve is splitted then pcurve on the face is splitted as
|
||||
-- well, and wice-versa.
|
||||
-- Input shape is not modified.
|
||||
-- The modifications made are recorded in external context
|
||||
-- (ShapeBuild_ReShape). This tool is applied to all edges
|
||||
-- before splitting them in order to keep sharing.
|
||||
|
||||
uses
|
||||
|
||||
Edge from TopoDS,
|
||||
Wire from TopoDS,
|
||||
Face from TopoDS,
|
||||
Surface from Geom,
|
||||
Location from TopLoc,
|
||||
SplitCurve3d from ShapeUpgrade,
|
||||
SplitCurve2d from ShapeUpgrade,
|
||||
TransferParameters from ShapeAnalysis,
|
||||
Status from ShapeExtend,
|
||||
HSequenceOfReal from TColStd,
|
||||
EdgeDivide from ShapeUpgrade,
|
||||
FixSmallCurves from ShapeUpgrade
|
||||
is
|
||||
|
||||
Create returns WireDivide from ShapeUpgrade;
|
||||
---Purpose: Empty constructor
|
||||
|
||||
Init (me: mutable; W: Wire from TopoDS; F: Face from TopoDS);
|
||||
---Purpose: Initializes by wire and face
|
||||
|
||||
Init (me: mutable; W: Wire from TopoDS;
|
||||
S: Surface from Geom);
|
||||
---Purpose: Initializes by wire and surface
|
||||
|
||||
Load (me: mutable; W: Wire from TopoDS);
|
||||
---Purpose: Loads working wire
|
||||
|
||||
Load (me: mutable; E: Edge from TopoDS);
|
||||
---Purpose: Creates wire of one edge and calls Load for wire
|
||||
|
||||
SetFace (me: mutable; F: Face from TopoDS);
|
||||
---Purpose: Sets supporting surface by face
|
||||
|
||||
SetSurface (me: mutable; S: Surface from Geom);
|
||||
---Purpose: Sets supporting surface
|
||||
|
||||
SetSurface (me: mutable; S: Surface from Geom; L: Location from TopLoc);
|
||||
---Purpose: Sets supporting surface with location
|
||||
|
||||
|
||||
Perform (me: mutable) is virtual;
|
||||
---Purpose: Computes the resulting wire by splitting all the edges
|
||||
-- according to splitting criteria.
|
||||
-- All the modifications made are recorded in context
|
||||
-- (ShapeBuild_ReShape). This tool is applied to all edges
|
||||
-- before splitting them in order to keep sharings.
|
||||
-- If no supporting face or surface is defined, only 3d
|
||||
-- splitting criteria are used.
|
||||
|
||||
Wire (me) returns Wire from TopoDS;
|
||||
---C++: return const &
|
||||
---Purpose: Gives the resulting Wire (equal to initial one if not done
|
||||
-- or Null if not loaded)
|
||||
|
||||
Status (me; status: Status from ShapeExtend) returns Boolean;
|
||||
---Purpose: Queries status of last call to Perform()
|
||||
-- OK - no edges were splitted, wire left untouched
|
||||
-- DONE1 - some edges were splitted
|
||||
-- FAIL1 - some edges have no 3d curve (skipped)
|
||||
-- FAIL2 - some edges have no pcurve (skipped)
|
||||
|
||||
---Level: Internal
|
||||
|
||||
SetSplitCurve3dTool(me: mutable; splitCurve3dTool: SplitCurve3d from ShapeUpgrade);
|
||||
---Purpose: Sets the tool for splitting 3D curves.
|
||||
|
||||
SetSplitCurve2dTool(me: mutable; splitCurve2dTool: SplitCurve2d from ShapeUpgrade);
|
||||
---Purpose: Sets the tool for splitting pcurves.
|
||||
|
||||
SetTransferParamTool(me: mutable; TransferParam: TransferParameters from ShapeAnalysis);
|
||||
---Purpose: Sets the tool for Transfer parameters between curves and pcurves.
|
||||
|
||||
GetSplitCurve3dTool(me) returns SplitCurve3d from ShapeUpgrade
|
||||
is virtual protected;
|
||||
---Purpose: Returns the tool for splitting 3D curves.
|
||||
---Remark: here TopoDS_Edge can be used to transfer some specific information (tolerance, etc)
|
||||
|
||||
GetSplitCurve2dTool(me) returns SplitCurve2d from ShapeUpgrade
|
||||
is virtual protected;
|
||||
---Purpose: Returns the tool for splitting pcurves.
|
||||
|
||||
SetEdgeDivideTool (me: mutable; edgeDivideTool: EdgeDivide from ShapeUpgrade);
|
||||
---Purpose: Sets tool for splitting edge
|
||||
|
||||
GetEdgeDivideTool (me) returns EdgeDivide from ShapeUpgrade
|
||||
is virtual;
|
||||
---Purpose: returns tool for splitting edges
|
||||
|
||||
GetTransferParamTool(me:mutable) returns TransferParameters from ShapeAnalysis
|
||||
is virtual;
|
||||
---Purpose: Returns the tool for Transfer of parameters.
|
||||
|
||||
SetEdgeMode(me : mutable;EdgeMode : Integer);
|
||||
---Purpose:Sets mode for splitting 3d curves from edges.
|
||||
-- 0 - only curve 3d from free edges.
|
||||
-- 1 - only curve 3d from shared edges.
|
||||
-- 2 - all curve 3d.
|
||||
|
||||
SetFixSmallCurveTool(me : mutable; FixSmallCurvesTool : FixSmallCurves from ShapeUpgrade);
|
||||
---Purpose:Sets tool for fixing small curves with specified min tolerance;
|
||||
|
||||
GetFixSmallCurveTool(me) returns FixSmallCurves from ShapeUpgrade;
|
||||
---Purpose:Returns tool for fixing small curves
|
||||
|
||||
fields
|
||||
|
||||
mySplitCurve3dTool: SplitCurve3d from ShapeUpgrade;
|
||||
mySplitCurve2dTool: SplitCurve2d from ShapeUpgrade;
|
||||
myEdgeDivide : EdgeDivide from ShapeUpgrade;
|
||||
myTransferParamTool : TransferParameters from ShapeAnalysis;
|
||||
myFace : Face from TopoDS is protected; -- supporting face
|
||||
myWire : Wire from TopoDS is protected; -- wire being splitted
|
||||
myStatus: Integer is protected;
|
||||
myEdgeMode : Integer is protected;
|
||||
myFixSmallCurveTool : FixSmallCurves from ShapeUpgrade;
|
||||
|
||||
end WireDivide;
|
@@ -19,46 +19,54 @@
|
||||
// abv 14.07.99 dealing with edges without 3d curve
|
||||
// svv 10.01.00 porting on DEC
|
||||
|
||||
#include <ShapeUpgrade_WireDivide.ixx>
|
||||
#include <ShapeUpgrade.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <Adaptor3d_CurveOnSurface.hxx>
|
||||
#include <BRep_Builder.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <BRepLib_MakeFace.hxx>
|
||||
#include <BRepLib_MakeWire.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopoDS_Vertex.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <TopoDS_Iterator.hxx>
|
||||
#include <ShapeBuild_Edge.hxx>
|
||||
#include <ShapeAnalysis_Edge.hxx>
|
||||
#include <Geom2d_BoundedCurve.hxx>
|
||||
#include <Geom2d_Curve.hxx>
|
||||
#include <Geom2dAdaptor_HCurve.hxx>
|
||||
#include <Geom_BoundedCurve.hxx>
|
||||
#include <Geom_Curve.hxx>
|
||||
#include <Geom_Surface.hxx>
|
||||
#include <GeomAdaptor_HSurface.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <ShapeAnalysis_Curve.hxx>
|
||||
#include <ShapeAnalysis_Edge.hxx>
|
||||
#include <ShapeAnalysis_TransferParameters.hxx>
|
||||
#include <ShapeAnalysis_TransferParametersProj.hxx>
|
||||
#include <ShapeBuild_Edge.hxx>
|
||||
#include <ShapeBuild_ReShape.hxx>
|
||||
#include <ShapeExtend.hxx>
|
||||
#include <ShapeUpgrade.hxx>
|
||||
#include <ShapeUpgrade_EdgeDivide.hxx>
|
||||
#include <ShapeUpgrade_FixSmallCurves.hxx>
|
||||
#include <ShapeUpgrade_SplitCurve2d.hxx>
|
||||
#include <ShapeUpgrade_SplitCurve3d.hxx>
|
||||
#include <ShapeUpgrade_WireDivide.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TColGeom2d_HArray1OfCurve.hxx>
|
||||
#include <TColGeom_HArray1OfCurve.hxx>
|
||||
#include <TColStd_Array1OfBoolean.hxx>
|
||||
#include <TColStd_HSequenceOfReal.hxx>
|
||||
#include <TColStd_SequenceOfReal.hxx>
|
||||
#include <TopExp.hxx>
|
||||
#include <TopExp_Explorer.hxx>
|
||||
#include <TColStd_HSequenceOfReal.hxx>
|
||||
#include <TColGeom_HArray1OfCurve.hxx>
|
||||
#include <TColGeom2d_HArray1OfCurve.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <Geom_Curve.hxx>
|
||||
#include <Geom2d_Curve.hxx>
|
||||
#include <ShapeExtend.hxx>
|
||||
#include <TColStd_Array1OfBoolean.hxx>
|
||||
#include <ShapeBuild_ReShape.hxx>
|
||||
#include <ShapeAnalysis_TransferParametersProj.hxx>
|
||||
#include <ShapeUpgrade_FixSmallCurves.hxx>
|
||||
#include <TopLoc_Location.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <TopoDS_Face.hxx>
|
||||
#include <TopoDS_Iterator.hxx>
|
||||
#include <TopoDS_Vertex.hxx>
|
||||
#include <TopoDS_Wire.hxx>
|
||||
#include <TopTools_SequenceOfShape.hxx>
|
||||
#include <TColStd_SequenceOfReal.hxx>
|
||||
#include <GeomAdaptor_HSurface.hxx>
|
||||
#include <Geom2dAdaptor_HCurve.hxx>
|
||||
#include <ShapeAnalysis_Curve.hxx>
|
||||
#include <Adaptor3d_CurveOnSurface.hxx>
|
||||
#include <Geom_BoundedCurve.hxx>
|
||||
#include <Geom2d_BoundedCurve.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : ShapeUpgrade_WireDivide
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
ShapeUpgrade_WireDivide::ShapeUpgrade_WireDivide():
|
||||
ShapeUpgrade_Tool(), myStatus(0)
|
||||
{
|
||||
|
173
src/ShapeUpgrade/ShapeUpgrade_WireDivide.hxx
Normal file
173
src/ShapeUpgrade/ShapeUpgrade_WireDivide.hxx
Normal file
@@ -0,0 +1,173 @@
|
||||
// Created on: 1999-04-15
|
||||
// Created by: Roman LYGIN
|
||||
// Copyright (c) 1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _ShapeUpgrade_WireDivide_HeaderFile
|
||||
#define _ShapeUpgrade_WireDivide_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <TopoDS_Face.hxx>
|
||||
#include <TopoDS_Wire.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <ShapeUpgrade_Tool.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <ShapeExtend_Status.hxx>
|
||||
class ShapeUpgrade_SplitCurve3d;
|
||||
class ShapeUpgrade_SplitCurve2d;
|
||||
class ShapeUpgrade_EdgeDivide;
|
||||
class ShapeAnalysis_TransferParameters;
|
||||
class ShapeUpgrade_FixSmallCurves;
|
||||
class TopoDS_Wire;
|
||||
class TopoDS_Face;
|
||||
class Geom_Surface;
|
||||
class TopoDS_Edge;
|
||||
class TopLoc_Location;
|
||||
|
||||
|
||||
class ShapeUpgrade_WireDivide;
|
||||
DEFINE_STANDARD_HANDLE(ShapeUpgrade_WireDivide, ShapeUpgrade_Tool)
|
||||
|
||||
//! Divides edges in the wire lying on the face or free wires or
|
||||
//! free edges with a criterion.
|
||||
//! Splits 3D curve and pcurve(s) of the edge on the face.
|
||||
//! Other pcurves which may be associated with the edge are simply
|
||||
//! copied.
|
||||
//! If 3D curve is splitted then pcurve on the face is splitted as
|
||||
//! well, and wice-versa.
|
||||
//! Input shape is not modified.
|
||||
//! The modifications made are recorded in external context
|
||||
//! (ShapeBuild_ReShape). This tool is applied to all edges
|
||||
//! before splitting them in order to keep sharing.
|
||||
class ShapeUpgrade_WireDivide : public ShapeUpgrade_Tool
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Empty constructor
|
||||
Standard_EXPORT ShapeUpgrade_WireDivide();
|
||||
|
||||
//! Initializes by wire and face
|
||||
Standard_EXPORT void Init (const TopoDS_Wire& W, const TopoDS_Face& F);
|
||||
|
||||
//! Initializes by wire and surface
|
||||
Standard_EXPORT void Init (const TopoDS_Wire& W, const Handle(Geom_Surface)& S);
|
||||
|
||||
//! Loads working wire
|
||||
Standard_EXPORT void Load (const TopoDS_Wire& W);
|
||||
|
||||
//! Creates wire of one edge and calls Load for wire
|
||||
Standard_EXPORT void Load (const TopoDS_Edge& E);
|
||||
|
||||
//! Sets supporting surface by face
|
||||
Standard_EXPORT void SetFace (const TopoDS_Face& F);
|
||||
|
||||
//! Sets supporting surface
|
||||
Standard_EXPORT void SetSurface (const Handle(Geom_Surface)& S);
|
||||
|
||||
//! Sets supporting surface with location
|
||||
Standard_EXPORT void SetSurface (const Handle(Geom_Surface)& S, const TopLoc_Location& L);
|
||||
|
||||
//! Computes the resulting wire by splitting all the edges
|
||||
//! according to splitting criteria.
|
||||
//! All the modifications made are recorded in context
|
||||
//! (ShapeBuild_ReShape). This tool is applied to all edges
|
||||
//! before splitting them in order to keep sharings.
|
||||
//! If no supporting face or surface is defined, only 3d
|
||||
//! splitting criteria are used.
|
||||
Standard_EXPORT virtual void Perform();
|
||||
|
||||
//! Gives the resulting Wire (equal to initial one if not done
|
||||
//! or Null if not loaded)
|
||||
Standard_EXPORT const TopoDS_Wire& Wire() const;
|
||||
|
||||
//! Queries status of last call to Perform()
|
||||
//! OK - no edges were splitted, wire left untouched
|
||||
//! DONE1 - some edges were splitted
|
||||
//! FAIL1 - some edges have no 3d curve (skipped)
|
||||
//! FAIL2 - some edges have no pcurve (skipped)
|
||||
Standard_EXPORT Standard_Boolean Status (const ShapeExtend_Status status) const;
|
||||
|
||||
//! Sets the tool for splitting 3D curves.
|
||||
Standard_EXPORT void SetSplitCurve3dTool (const Handle(ShapeUpgrade_SplitCurve3d)& splitCurve3dTool);
|
||||
|
||||
//! Sets the tool for splitting pcurves.
|
||||
Standard_EXPORT void SetSplitCurve2dTool (const Handle(ShapeUpgrade_SplitCurve2d)& splitCurve2dTool);
|
||||
|
||||
//! Sets the tool for Transfer parameters between curves and pcurves.
|
||||
Standard_EXPORT void SetTransferParamTool (const Handle(ShapeAnalysis_TransferParameters)& TransferParam);
|
||||
|
||||
//! Sets tool for splitting edge
|
||||
Standard_EXPORT void SetEdgeDivideTool (const Handle(ShapeUpgrade_EdgeDivide)& edgeDivideTool);
|
||||
|
||||
//! returns tool for splitting edges
|
||||
Standard_EXPORT virtual Handle(ShapeUpgrade_EdgeDivide) GetEdgeDivideTool() const;
|
||||
|
||||
//! Returns the tool for Transfer of parameters.
|
||||
Standard_EXPORT virtual Handle(ShapeAnalysis_TransferParameters) GetTransferParamTool();
|
||||
|
||||
//! Sets mode for splitting 3d curves from edges.
|
||||
//! 0 - only curve 3d from free edges.
|
||||
//! 1 - only curve 3d from shared edges.
|
||||
//! 2 - all curve 3d.
|
||||
Standard_EXPORT void SetEdgeMode (const Standard_Integer EdgeMode);
|
||||
|
||||
//! Sets tool for fixing small curves with specified min tolerance;
|
||||
Standard_EXPORT void SetFixSmallCurveTool (const Handle(ShapeUpgrade_FixSmallCurves)& FixSmallCurvesTool);
|
||||
|
||||
//! Returns tool for fixing small curves
|
||||
Standard_EXPORT Handle(ShapeUpgrade_FixSmallCurves) GetFixSmallCurveTool() const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(ShapeUpgrade_WireDivide,ShapeUpgrade_Tool)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
//! Returns the tool for splitting 3D curves.
|
||||
Standard_EXPORT virtual Handle(ShapeUpgrade_SplitCurve3d) GetSplitCurve3dTool() const;
|
||||
|
||||
//! Returns the tool for splitting pcurves.
|
||||
Standard_EXPORT virtual Handle(ShapeUpgrade_SplitCurve2d) GetSplitCurve2dTool() const;
|
||||
|
||||
TopoDS_Face myFace;
|
||||
TopoDS_Wire myWire;
|
||||
Standard_Integer myStatus;
|
||||
Standard_Integer myEdgeMode;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Handle(ShapeUpgrade_SplitCurve3d) mySplitCurve3dTool;
|
||||
Handle(ShapeUpgrade_SplitCurve2d) mySplitCurve2dTool;
|
||||
Handle(ShapeUpgrade_EdgeDivide) myEdgeDivide;
|
||||
Handle(ShapeAnalysis_TransferParameters) myTransferParamTool;
|
||||
Handle(ShapeUpgrade_FixSmallCurves) myFixSmallCurveTool;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _ShapeUpgrade_WireDivide_HeaderFile
|
Reference in New Issue
Block a user