1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +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:
abv
2015-07-12 07:42:38 +03:00
parent 543a996496
commit 42cf5bc1ca
15354 changed files with 623957 additions and 509844 deletions

View File

@@ -1,229 +0,0 @@
-- Created on: 1994-03-03
-- Created by: Joelle CHAUVET
-- Copyright (c) 1994-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.
-- Modified: Mon Nov 3 10:24:07 1997
-- new class CurveConstraint
-- Modified: Mon Jan 12 10:46:37 1998
-- new method Organize
-- Modified: Mon Feb 23 09:28:33 1998
-- new methods SameNumber, ComputeACR, InsertACR
-- for sections with different number of elements
-- Modified: Thu Apr 30 15:27:04 1998
-- methods Organize and SameNumber are dispatched in
-- new methods SearchOrigin and SameNumberByACR for open wires
-- and SameNumberByPolarMethod and ComputeOrigin for closed wires
-- Modified: Tue Nov 3 10:41:06 1998
-- add classe CompatibleWires
package BRepFill
uses
MMgt,
TCollection,
TColStd,
GeomAbs,
gp,
Bnd,
TopLoc,
TColgp,
MAT,
Geom2d,
TColGeom2d,
TopAbs,
TopoDS,
TopTools,
Geom,
TColGeom,
Geom2dAdaptor,
Approx,
Bisector,
BRep,
BRepTools,
BRepAlgo,
BRepSweep,
GeomFill,
BRepMAT2d,
StdFail,
GeomPlate,
Adaptor3d,
Law,
GeomLProp
is
enumeration TransitionStyle
is Modified, Right, Round end;
enumeration TypeOfContact
is NoContact, Contact, ContactOnBorder end;
-- private class FilledPair;
---Purpose: A pair of bound shapes with the result.
class Generator;
deferred class SectionLaw;
class ShapeLaw;
class NSections;
class Draft;
deferred class LocationLaw;
class DraftLaw;
class Edge3DLaw;
class EdgeOnSurfLaw;
class ACRLaw;
class Pipe;
class PipeShell;
class Evolved;
class Sweep;
class CompatibleWires;
class OffsetWire;
class OffsetAncestors;
imported ListOfOffsetWire;
imported ListIteratorOfListOfOffsetWire;
private class ApproxSeewing;
imported MultiLine;
private class ComputeCLine instantiates
ComputeCLine from Approx (MultiLine);
private class TrimSurfaceTool;
private class TrimEdgeTool;
private class SectionPlacement;
private class Section;
--class TrimCorner;
--modified by NIZHNY-MKK Tue Oct 21 17:43:15 2003
class TrimShellCorner;
imported SequenceOfSection;
imported DataMapOfNodeDataMapOfShapeShape;
imported DataMapIteratorOfDataMapOfNodeDataMapOfShapeShape;
imported DataMapOfNodeShape;
imported DataMapIteratorOfDataMapOfNodeShape;
imported DataMapOfShapeDataMapOfShapeListOfShape;
imported DataMapIteratorOfDataMapOfShapeDataMapOfShapeListOfShape;
imported DataMapOfShapeSequenceOfReal;
imported DataMapIteratorOfDataMapOfShapeSequenceOfReal;
imported DataMapOfShapeSequenceOfPnt;
imported DataMapIteratorOfDataMapOfShapeSequenceOfPnt;
imported DataMapOfOrientedShapeListOfShape;
imported DataMapIteratorOfDataMapOfOrientedShapeListOfShape;
imported IndexedDataMapOfOrientedShapeListOfShape;
imported DataMapOfShapeHArray2OfShape;
imported DataMapIteratorOfDataMapOfShapeHArray2OfShape;
class CurveConstraint ;
class Filling;
private class FaceAndOrder;
private class EdgeFaceAndOrder;
imported SequenceOfFaceAndOrder;
imported SequenceOfEdgeFaceAndOrder;
Face( Edge1 : Edge from TopoDS;
Edge2 : Edge from TopoDS )
---Purpose: Computes a ruled surface between two edges.
returns Face from TopoDS;
Shell( Wire1 : Wire from TopoDS;
Wire2 : Wire from TopoDS )
---Purpose: Computes a ruled surface between two wires.
-- The wires must have the same number of edges.
returns Shell from TopoDS;
Axe (Spine : Shape from TopoDS;
Profile : Wire from TopoDS;
AxeProf : in out Ax3 from gp;
ProfOnSpine : in out Boolean from Standard;
Tol : Real from Standard);
---Purpose: Computes <AxeProf> as Follow. <Location> is
-- the Position of the nearest vertex V of <Profile>
-- to <Spine>.<XDirection> is confused with the tangent
-- to <Spine> at the projected point of V on the Spine.
-- <Direction> is normal to <Spine>.
-- <Spine> is a plane wire or a plane face.
-- <ProfOnSpine> is <False> if the distance
-- between <Profile> and <Spine> is high to <Tol>.
SearchOrigin( W : in out Wire from TopoDS;
P : Pnt from gp;
V : Vec from gp;
Tol : Real) is private;
---Purpose: Computes origins and orientation on a closed wire
ComputeACR( wire : Wire from TopoDS;
ACR : out Array1OfReal from TColStd );
---Purpose: Compute ACR on a wire
InsertACR( wire : Wire from TopoDS;
ACRcuts : Array1OfReal from TColStd;
prec : Real from Standard )
---Purpose: Insert ACR on a wire
returns Wire from TopoDS;
end BRepFill;

View File

@@ -34,64 +34,63 @@
// Modified: Mon Oct 12 09:42:33 1998
// number of edges in EdgesFromVertex (CTS21570)
#include <BRepFill.ixx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <BRepExtrema_DistShapeShape.hxx>
#include <BRepExtrema_ExtPC.hxx>
#include <BRepFill.hxx>
#include <BRepGProp.hxx>
#include <BRepLib.hxx>
#include <BRepLib_FindSurface.hxx>
#include <BRepLib_MakeFace.hxx>
#include <BRepLib_MakeEdge.hxx>
#include <BRepLib_MakeFace.hxx>
#include <BRepLib_MakeVertex.hxx>
#include <BRepLib_MakeWire.hxx>
#include <BRepExtrema_ExtPC.hxx>
#include <BRepExtrema_DistShapeShape.hxx>
#include <BRep_Tool.hxx>
#include <BRepLProp.hxx>
#include <BRepTools_WireExplorer.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Wire.hxx>
#include <TopoDS_Vertex.hxx>
#include <BRep_Builder.hxx>
#include <TopLoc_Location.hxx>
#include <TopExp_Explorer.hxx>
#include <gp_Vec.hxx>
#include <gp_Lin.hxx>
#include <gp_Pln.hxx>
#include <gp_Pnt2d.hxx>
#include <GCPnts_AbscissaPoint.hxx>
#include <Geom2d_Line.hxx>
#include <Geom_Curve.hxx>
#include <Geom_Plane.hxx>
#include <Geom_Surface.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <GeomAdaptor_Curve.hxx>
#include <GeomFill_Generator.hxx>
#include <gp_Ax3.hxx>
#include <gp_Circ.hxx>
#include <gp_Dir.hxx>
#include <gp_Dir2d.hxx>
#include <gp_Circ.hxx>
#include <gp_Elips.hxx>
#include <Geom_Curve.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <Geom_Surface.hxx>
#include <Geom_Plane.hxx>
#include <Geom2d_Line.hxx>
#include <GeomFill_Generator.hxx>
#include <GeomAdaptor_Curve.hxx>
#include <BRepLProp.hxx>
#include <BRepGProp.hxx>
#include <gp_Lin.hxx>
#include <gp_Pln.hxx>
#include <gp_Pnt.hxx>
#include <gp_Pnt2d.hxx>
#include <gp_Vec.hxx>
#include <GProp_GProps.hxx>
#include <GProp_PrincipalProps.hxx>
#include <GCPnts_AbscissaPoint.hxx>
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
#include <TopTools_DataMapOfShapeListOfShape.hxx>
#include <Precision.hxx>
#include <Standard_NoSuchObject.hxx>
#include <TColStd_Array1OfInteger.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_Shape.hxx>
#include <TopoDS_Shell.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Wire.hxx>
#include <TopTools_Array1OfShape.hxx>
#include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
#include <TopTools_DataMapOfShapeListOfShape.hxx>
#include <TopTools_HSequenceOfShape.hxx>
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_ListOfShape.hxx>
#include <TopTools_Array1OfShape.hxx>
#include <TopTools_SequenceOfShape.hxx>
#include <TopTools_HSequenceOfShape.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <BRep_Tool.hxx>
#include <TopoDS.hxx>
#include <TopExp.hxx>
#include <Precision.hxx>
#include <TColStd_Array1OfInteger.hxx>
#include <Standard_NoSuchObject.hxx>
static void MakeWire(const TopTools_Array1OfShape& Edges,
const Standard_Integer rangdeb,

148
src/BRepFill/BRepFill.hxx Normal file
View File

@@ -0,0 +1,148 @@
// Created on: 1994-03-03
// Created by: Joelle CHAUVET
// Copyright (c) 1994-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 _BRepFill_HeaderFile
#define _BRepFill_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Real.hxx>
#include <TColStd_Array1OfReal.hxx>
class TopoDS_Face;
class TopoDS_Edge;
class TopoDS_Shell;
class TopoDS_Wire;
class TopoDS_Shape;
class gp_Ax3;
class gp_Pnt;
class gp_Vec;
class BRepFill_Generator;
class BRepFill_SectionLaw;
class BRepFill_ShapeLaw;
class BRepFill_NSections;
class BRepFill_Draft;
class BRepFill_LocationLaw;
class BRepFill_DraftLaw;
class BRepFill_Edge3DLaw;
class BRepFill_EdgeOnSurfLaw;
class BRepFill_ACRLaw;
class BRepFill_Pipe;
class BRepFill_PipeShell;
class BRepFill_Evolved;
class BRepFill_Sweep;
class BRepFill_CompatibleWires;
class BRepFill_OffsetWire;
class BRepFill_OffsetAncestors;
class BRepFill_ApproxSeewing;
class BRepFill_ComputeCLine;
class BRepFill_TrimSurfaceTool;
class BRepFill_TrimEdgeTool;
class BRepFill_SectionPlacement;
class BRepFill_Section;
class BRepFill_TrimShellCorner;
class BRepFill_CurveConstraint;
class BRepFill_Filling;
class BRepFill_FaceAndOrder;
class BRepFill_EdgeFaceAndOrder;
class BRepFill
{
public:
DEFINE_STANDARD_ALLOC
//! Computes a ruled surface between two edges.
Standard_EXPORT static TopoDS_Face Face (const TopoDS_Edge& Edge1, const TopoDS_Edge& Edge2);
//! Computes a ruled surface between two wires.
//! The wires must have the same number of edges.
Standard_EXPORT static TopoDS_Shell Shell (const TopoDS_Wire& Wire1, const TopoDS_Wire& Wire2);
//! Computes <AxeProf> as Follow. <Location> is
//! the Position of the nearest vertex V of <Profile>
//! to <Spine>.<XDirection> is confused with the tangent
//! to <Spine> at the projected point of V on the Spine.
//! <Direction> is normal to <Spine>.
//! <Spine> is a plane wire or a plane face.
Standard_EXPORT static void Axe (const TopoDS_Shape& Spine, const TopoDS_Wire& Profile, gp_Ax3& AxeProf, Standard_Boolean& ProfOnSpine, const Standard_Real Tol);
//! Compute ACR on a wire
Standard_EXPORT static void ComputeACR (const TopoDS_Wire& wire, TColStd_Array1OfReal& ACR);
//! Insert ACR on a wire
Standard_EXPORT static TopoDS_Wire InsertACR (const TopoDS_Wire& wire, const TColStd_Array1OfReal& ACRcuts, const Standard_Real prec);
protected:
private:
//! Computes origins and orientation on a closed wire
Standard_EXPORT static void SearchOrigin (TopoDS_Wire& W, const gp_Pnt& P, const gp_Vec& V, const Standard_Real Tol);
friend class BRepFill_Generator;
friend class BRepFill_SectionLaw;
friend class BRepFill_ShapeLaw;
friend class BRepFill_NSections;
friend class BRepFill_Draft;
friend class BRepFill_LocationLaw;
friend class BRepFill_DraftLaw;
friend class BRepFill_Edge3DLaw;
friend class BRepFill_EdgeOnSurfLaw;
friend class BRepFill_ACRLaw;
friend class BRepFill_Pipe;
friend class BRepFill_PipeShell;
friend class BRepFill_Evolved;
friend class BRepFill_Sweep;
friend class BRepFill_CompatibleWires;
friend class BRepFill_OffsetWire;
friend class BRepFill_OffsetAncestors;
friend class BRepFill_ApproxSeewing;
friend class BRepFill_ComputeCLine;
friend class BRepFill_TrimSurfaceTool;
friend class BRepFill_TrimEdgeTool;
friend class BRepFill_SectionPlacement;
friend class BRepFill_Section;
friend class BRepFill_TrimShellCorner;
friend class BRepFill_CurveConstraint;
friend class BRepFill_Filling;
friend class BRepFill_FaceAndOrder;
friend class BRepFill_EdgeFaceAndOrder;
};
#endif // _BRepFill_HeaderFile

View File

@@ -1,39 +0,0 @@
-- Created on: 1998-09-01
-- Created by: Stephanie HUMEAU
-- 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 ACRLaw from BRepFill inherits LocationLaw from BRepFill
---Purpose: Build Location Law, with a Wire. In the case
-- of guided contour and trihedron by reduced
-- curvilinear abscissa
uses
Wire from TopoDS,
LocationLaw from GeomFill,
LocationGuide from GeomFill,
HArray1OfReal from TColStd
is
Create (Path : Wire from TopoDS;
Law : LocationGuide from GeomFill)
returns ACRLaw from BRepFill;
fields
OrigParam : HArray1OfReal from TColStd;
end ACRLaw;

View File

@@ -14,23 +14,24 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BRepFill_ACRLaw.ixx>
#include <BRepTools_WireExplorer.hxx>
#include <Approx_CurvlinFunc.hxx>
#include <BRep_Tool.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#include <TopExp.hxx>
#include <TopTools_HArray1OfShape.hxx>
#include <BRepFill.hxx>
#include <GeomFill_LocationLaw.hxx>
#include <GeomFill_LocationGuide.hxx>
#include <GeomFill_HArray1OfLocationLaw.hxx>
#include <BRepFill_ACRLaw.hxx>
#include <BRepTools_WireExplorer.hxx>
#include <Geom_Curve.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <GeomAdaptor_HCurve.hxx>
#include <Approx_CurvlinFunc.hxx>
#include <GeomFill_HArray1OfLocationLaw.hxx>
#include <GeomFill_LocationGuide.hxx>
#include <GeomFill_LocationLaw.hxx>
#include <Standard_Type.hxx>
#include <TopExp.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Wire.hxx>
#include <TopTools_HArray1OfShape.hxx>
BRepFill_ACRLaw::BRepFill_ACRLaw(const TopoDS_Wire& Path,
const Handle(GeomFill_LocationGuide)& theLaw)

View File

@@ -0,0 +1,67 @@
// Created on: 1998-09-01
// Created by: Stephanie HUMEAU
// 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 _BRepFill_ACRLaw_HeaderFile
#define _BRepFill_ACRLaw_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <TColStd_HArray1OfReal.hxx>
#include <BRepFill_LocationLaw.hxx>
class TopoDS_Wire;
class GeomFill_LocationGuide;
class BRepFill_ACRLaw;
DEFINE_STANDARD_HANDLE(BRepFill_ACRLaw, BRepFill_LocationLaw)
//! Build Location Law, with a Wire. In the case
//! of guided contour and trihedron by reduced
//! curvilinear abscissa
class BRepFill_ACRLaw : public BRepFill_LocationLaw
{
public:
Standard_EXPORT BRepFill_ACRLaw(const TopoDS_Wire& Path, const Handle(GeomFill_LocationGuide)& Law);
DEFINE_STANDARD_RTTI(BRepFill_ACRLaw,BRepFill_LocationLaw)
protected:
private:
Handle(TColStd_HArray1OfReal) OrigParam;
};
#endif // _BRepFill_ACRLaw_HeaderFile

View File

@@ -1,82 +0,0 @@
-- Created on: 1995-09-21
-- Created by: Bruno DUMORTIER
-- Copyright (c) 1995-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 ApproxSeewing from BRepFill
---Purpose: Evaluate the 3dCurve and the PCurves described in
-- a MultiLine from BRepFill. The parametrization of
-- those curves is not imposed by the Bissectrice.
-- The parametrization is given approximatively by
-- the abscissa of the curve3d.
uses
MultiLine from BRepFill,
Curve from Geom,
Curve from Geom2d
raises
NotDone from StdFail
is
Create returns ApproxSeewing from BRepFill;
Create( ML : MultiLine from BRepFill)
returns ApproxSeewing from BRepFill;
Perform(me : in out;
ML : MultiLine from BRepFill)
is static;
IsDone(me)
returns Boolean from Standard
is static;
Curve(me)
---Purpose: returns the approximation of the 3d Curve
---C++: return const &
returns Curve from Geom
raises
NotDone from StdFail
is static;
CurveOnF1(me)
---Purpose: returns the approximation of the PCurve on the
-- first face of the MultiLine
---C++: return const &
returns Curve from Geom2d
raises
NotDone from StdFail
is static;
CurveOnF2(me)
---Purpose: returns the approximation of the PCurve on the
-- first face of the MultiLine
---C++: return const &
returns Curve from Geom2d
raises
NotDone from StdFail
is static;
fields
myML : MultiLine from BRepFill;
myIsDone : Boolean from Standard;
myCurve : Curve from Geom;
myPCurve1 : Curve from Geom2d;
myPCurve2 : Curve from Geom2d;
end ApproxSeewing;

View File

@@ -14,27 +14,28 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BRepFill_ApproxSeewing.ixx>
#include <AppParCurves_MultiCurve.hxx>
#include <AppDef_Compute.hxx>
#include <AppDef_MultiLine.hxx>
#include <AppDef_MultiPointConstraint.hxx>
#include <AppParCurves_MultiCurve.hxx>
#include <BRepFill_ApproxSeewing.hxx>
#include <BSplCLib.hxx>
#include <PLib.hxx>
#include <Geom_BSplineCurve.hxx>
#include <Geom2d_BSplineCurve.hxx>
#include <Geom2d_Curve.hxx>
#include <Geom_BSplineCurve.hxx>
#include <Geom_Curve.hxx>
#include <PLib.hxx>
#include <StdFail_NotDone.hxx>
#include <TColgp_Array1OfPnt.hxx>
#include <TColgp_Array1OfPnt2d.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <TColStd_Array1OfInteger.hxx>
#include <TColStd_Array1OfReal.hxx>
//=======================================================================
//function : BRepFill_ApproxSeewing
//purpose :
//=======================================================================
BRepFill_ApproxSeewing::BRepFill_ApproxSeewing()
:myIsDone(Standard_False)
{

View File

@@ -0,0 +1,90 @@
// Created on: 1995-09-21
// Created by: Bruno DUMORTIER
// Copyright (c) 1995-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 _BRepFill_ApproxSeewing_HeaderFile
#define _BRepFill_ApproxSeewing_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <BRepFill_MultiLine.hxx>
#include <Standard_Boolean.hxx>
class Geom_Curve;
class Geom2d_Curve;
class StdFail_NotDone;
//! Evaluate the 3dCurve and the PCurves described in
//! a MultiLine from BRepFill. The parametrization of
//! those curves is not imposed by the Bissectrice.
//! The parametrization is given approximatively by
//! the abscissa of the curve3d.
class BRepFill_ApproxSeewing
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT BRepFill_ApproxSeewing();
Standard_EXPORT BRepFill_ApproxSeewing(const BRepFill_MultiLine& ML);
Standard_EXPORT void Perform (const BRepFill_MultiLine& ML);
Standard_EXPORT Standard_Boolean IsDone() const;
//! returns the approximation of the 3d Curve
Standard_EXPORT const Handle(Geom_Curve)& Curve() const;
//! returns the approximation of the PCurve on the
//! first face of the MultiLine
Standard_EXPORT const Handle(Geom2d_Curve)& CurveOnF1() const;
//! returns the approximation of the PCurve on the
//! first face of the MultiLine
Standard_EXPORT const Handle(Geom2d_Curve)& CurveOnF2() const;
protected:
private:
BRepFill_MultiLine myML;
Standard_Boolean myIsDone;
Handle(Geom_Curve) myCurve;
Handle(Geom2d_Curve) myPCurve1;
Handle(Geom2d_Curve) myPCurve2;
};
#endif // _BRepFill_ApproxSeewing_HeaderFile

View File

@@ -1,128 +0,0 @@
-- Created on: 1998-07-02
-- Created by: Joelle CHAUVET
-- 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 CompatibleWires from BRepFill
---Purpose: Constructs a sequence of Wires (with good orientation
-- and origin) agreed each other so that the surface passing
-- through these sections is not twisted
uses
Edge from TopoDS,
SequenceOfShape from TopTools,
ListOfShape from TopTools,
DataMapOfShapeListOfShape from TopTools
raises
ConstructionError from Standard,
NoSuchObject from Standard
is
Create returns CompatibleWires from BRepFill;
Create ( Sections : SequenceOfShape from TopTools)
returns CompatibleWires from BRepFill;
Init ( me : in out;
Sections : SequenceOfShape from TopTools)
raises
ConstructionError from Standard
is static;
SetPercent ( me : in out; percent : Real = 0.01)
is static;
Perform (me : in out;
WithRotation : Boolean = Standard_True)
---Purpose: Performs CompatibleWires According to the orientation
-- and the origin of each other
raises
ConstructionError from Standard
is static;
IsDone ( me)
returns Boolean from Standard
is static;
Shape(me) returns SequenceOfShape from TopTools
---Purpose: returns the generated sequence.
---C++ : return const &
is static;
GeneratedShapes (me ; SubSection : Edge from TopoDS)
---Purpose: Returns the shapes created from a subshape
-- <SubSection> of a section.
--
---C++ : return const &
returns ListOfShape from TopTools
is static;
Generated (me)
---C++: return const &
returns DataMapOfShapeListOfShape from TopTools
is static;
SameNumberByPolarMethod (me : in out;
WithRotation : Boolean = Standard_True)
---Purpose: Insert cutting points on closed wires to have same
-- number of edges. The sequence of shapes must
-- be a sequence of wires.
is static private;
SameNumberByACR (me : in out; report : Boolean from Standard )
---Purpose: Insert cutting points on open wires to have same
-- number of edges. The sequence of shapes must
-- be a sequence of wires.
is static private;
ComputeOrigin (me : in out; polar : Boolean from Standard )
---Purpose: Computes origins and orientation on closed wires to
-- avoid twisted results. The sequence of shapes must
-- be a sequence of wires. <polar> must be true
-- if SameNumberByPolarMethod was used before.
is static private;
SearchOrigin (me : in out)
---Purpose: Computes origins and orientation on open wires to
-- avoid twisted results. The sequence of shapes must
-- be a sequence of wires.
is static private;
fields
myInit : SequenceOfShape from TopTools;
myWork : SequenceOfShape from TopTools;
myPercent : Real from Standard;
myDegen1 : Boolean from Standard;
myDegen2 : Boolean from Standard;
myIsDone : Boolean from Standard;
myMap : DataMapOfShapeListOfShape from TopTools;
end CompatibleWires;

View File

@@ -14,55 +14,55 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BRepFill_CompatibleWires.ixx>
#include <BRepAdaptor_Curve.hxx>
#include <BRepFill.hxx>
#include <BRepLib.hxx>
#include <BRepLib_FindSurface.hxx>
#include <BRepLib_MakeWire.hxx>
#include <BRepLib_MakeEdge.hxx>
#include <BRepCheck_Wire.hxx>
#include <BRepExtrema_DistShapeShape.hxx>
#include <Bnd_Box.hxx>
#include <BRepBndLib.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <BRepTools_WireExplorer.hxx>
#include <BRepLProp.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <BRepBndLib.hxx>
#include <BRepCheck_Wire.hxx>
#include <BRepExtrema_DistShapeShape.hxx>
#include <BRepFill.hxx>
#include <BRepFill_CompatibleWires.hxx>
#include <BRepGProp.hxx>
#include <BRepLib.hxx>
#include <BRepLib_FindSurface.hxx>
#include <BRepLib_MakeEdge.hxx>
#include <BRepLib_MakeWire.hxx>
#include <BRepLProp.hxx>
#include <BRepTools_WireExplorer.hxx>
#include <Geom_Plane.hxx>
#include <Geom_Surface.hxx>
#include <gp.hxx>
#include <gp_Ax2.hxx>
#include <gp_Circ.hxx>
#include <gp_Elips.hxx>
#include <gp_Pln.hxx>
#include <gp_Vec.hxx>
#include <GProp_GProps.hxx>
#include <GProp_PrincipalProps.hxx>
#include <Geom_Surface.hxx>
#include <Geom_Plane.hxx>
#include <Precision.hxx>
#include <TopAbs.hxx>
#include <Standard_ConstructionError.hxx>
#include <Standard_NoSuchObject.hxx>
#include <TColgp_HArray1OfPnt.hxx>
#include <TColgp_HArray1OfVec.hxx>
#include <TColStd_Array1OfInteger.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <TColStd_MapOfInteger.hxx>
#include <TColStd_SequenceOfReal.hxx>
#include <TopAbs.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Wire.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_DataMapOfShapeListOfShape.hxx>
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
#include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
#include <TopTools_DataMapOfShapeListOfShape.hxx>
#include <TopTools_HSequenceOfShape.hxx>
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_ListOfShape.hxx>
#include <TopTools_SequenceOfShape.hxx>
#include <TopTools_ListOfShape.hxx>
#include <gp.hxx>
#include <gp_Vec.hxx>
#include <gp_Ax2.hxx>
#include <gp_Pln.hxx>
#include <gp_Circ.hxx>
#include <gp_Elips.hxx>
#include <TColgp_HArray1OfVec.hxx>
#include <TColgp_HArray1OfPnt.hxx>
#include <TColStd_Array1OfInteger.hxx>
#include <TColStd_MapOfInteger.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <TColStd_SequenceOfReal.hxx>
#ifdef OCCT_DEBUG_EFV
static void EdgesFromVertex (const TopoDS_Wire& W,

View File

@@ -0,0 +1,118 @@
// Created on: 1998-07-02
// Created by: Joelle CHAUVET
// 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 _BRepFill_CompatibleWires_HeaderFile
#define _BRepFill_CompatibleWires_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <TopTools_SequenceOfShape.hxx>
#include <Standard_Real.hxx>
#include <Standard_Boolean.hxx>
#include <TopTools_DataMapOfShapeListOfShape.hxx>
#include <TopTools_ListOfShape.hxx>
class Standard_ConstructionError;
class Standard_NoSuchObject;
class TopoDS_Edge;
//! Constructs a sequence of Wires (with good orientation
//! and origin) agreed each other so that the surface passing
//! through these sections is not twisted
class BRepFill_CompatibleWires
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT BRepFill_CompatibleWires();
Standard_EXPORT BRepFill_CompatibleWires(const TopTools_SequenceOfShape& Sections);
Standard_EXPORT void Init (const TopTools_SequenceOfShape& Sections);
Standard_EXPORT void SetPercent (const Standard_Real percent = 0.01);
//! Performs CompatibleWires According to the orientation
//! and the origin of each other
Standard_EXPORT void Perform (const Standard_Boolean WithRotation = Standard_True);
Standard_EXPORT Standard_Boolean IsDone() const;
//! returns the generated sequence.
Standard_EXPORT const TopTools_SequenceOfShape& Shape() const;
//! Returns the shapes created from a subshape
//! <SubSection> of a section.
Standard_EXPORT const TopTools_ListOfShape& GeneratedShapes (const TopoDS_Edge& SubSection) const;
Standard_EXPORT const TopTools_DataMapOfShapeListOfShape& Generated() const;
protected:
private:
//! Insert cutting points on closed wires to have same
//! number of edges. The sequence of shapes must
//! be a sequence of wires.
Standard_EXPORT void SameNumberByPolarMethod (const Standard_Boolean WithRotation = Standard_True);
//! Insert cutting points on open wires to have same
//! number of edges. The sequence of shapes must
//! be a sequence of wires.
Standard_EXPORT void SameNumberByACR (const Standard_Boolean report);
//! Computes origins and orientation on closed wires to
//! avoid twisted results. The sequence of shapes must
//! be a sequence of wires. <polar> must be true
//! if SameNumberByPolarMethod was used before.
Standard_EXPORT void ComputeOrigin (const Standard_Boolean polar);
//! Computes origins and orientation on open wires to
//! avoid twisted results. The sequence of shapes must
//! be a sequence of wires.
Standard_EXPORT void SearchOrigin();
TopTools_SequenceOfShape myInit;
TopTools_SequenceOfShape myWork;
Standard_Real myPercent;
Standard_Boolean myDegen1;
Standard_Boolean myDegen2;
Standard_Boolean myIsDone;
TopTools_DataMapOfShapeListOfShape myMap;
};
#endif // _BRepFill_CompatibleWires_HeaderFile

View File

@@ -0,0 +1,109 @@
// Created on: 1994-03-03
// Created by: Joelle CHAUVET
// Copyright (c) 1994-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 _BRepFill_ComputeCLine_HeaderFile
#define _BRepFill_ComputeCLine_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <AppParCurves_SequenceOfMultiCurve.hxx>
#include <TColStd_SequenceOfReal.hxx>
#include <AppParCurves_MultiCurve.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Real.hxx>
#include <AppParCurves_Constraint.hxx>
#include <BRepFill_MultiLine.hxx>
class AppParCurves_MultiCurve;
class BRepFill_ComputeCLine
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT BRepFill_ComputeCLine(const BRepFill_MultiLine& Line, const Standard_Integer degreemin = 3, const Standard_Integer degreemax = 8, const Standard_Real Tolerance3d = 1.0e-5, const Standard_Real Tolerance2d = 1.0e-5, const Standard_Boolean cutting = Standard_False, const AppParCurves_Constraint FirstC = AppParCurves_TangencyPoint, const AppParCurves_Constraint LastC = AppParCurves_TangencyPoint);
Standard_EXPORT BRepFill_ComputeCLine(const Standard_Integer degreemin = 3, const Standard_Integer degreemax = 8, const Standard_Real Tolerance3d = 1.0e-05, const Standard_Real Tolerance2d = 1.0e-05, const Standard_Boolean cutting = Standard_False, const AppParCurves_Constraint FirstC = AppParCurves_TangencyPoint, const AppParCurves_Constraint LastC = AppParCurves_TangencyPoint);
Standard_EXPORT void Perform (const BRepFill_MultiLine& Line);
Standard_EXPORT void SetDegrees (const Standard_Integer degreemin, const Standard_Integer degreemax);
Standard_EXPORT void SetTolerances (const Standard_Real Tolerance3d, const Standard_Real Tolerance2d);
Standard_EXPORT void SetConstraints (const AppParCurves_Constraint FirstC, const AppParCurves_Constraint LastC);
Standard_EXPORT Standard_Boolean IsAllApproximated() const;
Standard_EXPORT Standard_Boolean IsToleranceReached() const;
Standard_EXPORT void Error (const Standard_Integer Index, Standard_Real& tol3d, Standard_Real& tol2d) const;
Standard_EXPORT Standard_Integer NbMultiCurves() const;
Standard_EXPORT AppParCurves_MultiCurve Value (const Standard_Integer Index = 1) const;
Standard_EXPORT void Parameters (const Standard_Integer Index, Standard_Real& firstp, Standard_Real& lastp) const;
protected:
private:
Standard_EXPORT Standard_Boolean Compute (const BRepFill_MultiLine& Line, const Standard_Real Ufirst, const Standard_Real Ulast, Standard_Real& TheTol3d, Standard_Real& TheTol2d);
AppParCurves_SequenceOfMultiCurve myMultiCurves;
TColStd_SequenceOfReal myfirstparam;
TColStd_SequenceOfReal mylastparam;
AppParCurves_MultiCurve TheMultiCurve;
Standard_Boolean alldone;
Standard_Boolean tolreached;
TColStd_SequenceOfReal Tolers3d;
TColStd_SequenceOfReal Tolers2d;
Standard_Integer mydegremin;
Standard_Integer mydegremax;
Standard_Real mytol3d;
Standard_Real mytol2d;
Standard_Real currenttol3d;
Standard_Real currenttol2d;
Standard_Boolean mycut;
AppParCurves_Constraint myfirstC;
AppParCurves_Constraint mylastC;
};
#endif // _BRepFill_ComputeCLine_HeaderFile

View File

@@ -0,0 +1,27 @@
// Created on: 1994-03-03
// Created by: Joelle CHAUVET
// Copyright (c) 1994-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.
#include <BRepFill_ComputeCLine.hxx>
#include <AppParCurves_MultiCurve.hxx>
#define MultiLine BRepFill_MultiLine
#define MultiLine_hxx <BRepFill_MultiLine.hxx>
#define Approx_ComputeCLine BRepFill_ComputeCLine
#define Approx_ComputeCLine_hxx <BRepFill_ComputeCLine.hxx>
#include <Approx_ComputeCLine.gxx>

View File

@@ -1,71 +0,0 @@
-- Created on: 1997-10-31
-- Created by: Joelle CHAUVET
-- Copyright (c) 1997-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 CurveConstraint from BRepFill inherits CurveConstraint from GeomPlate
---Purpose: same as CurveConstraint from GeomPlate
-- with BRepAdaptor_Surface instead of
-- GeomAdaptor_Surface
uses
Pnt from gp,
Pnt2d from gp,
Vec from gp,
HCurveOnSurface from Adaptor3d,
HCurve from Adaptor3d,
Surface from Geom,
Curve from Geom2d,
Function from Law,
SLProps from GeomLProp
raises
ConstructionError from Standard
is
Create (Boundary : HCurveOnSurface from Adaptor3d;
Order : Integer from Standard ;
NPt : Integer from Standard = 10;
TolDist : Real from Standard = 0.0001;
TolAng : Real from Standard = 0.01;
TolCurv : Real from Standard = 0.1
)
returns CurveConstraint from BRepFill
raises ConstructionError;
--purpose : if Order is not -1 , 0, 1, 2
--
--- Purpose: Create a constraint
-- Order is the order of the constraint. The possible values for order are -1,0,1,2.
-- Order i means constraints Gi
-- Npt is the number of points associated with the constraint.
-- TolDist is the maximum error to satisfy for G0 constraints
-- TolAng is the maximum error to satisfy for G1 constraints
-- TolCurv is the maximum error to satisfy for G2 constraints
-- These errors can be replaced by laws of criterion.
Create (Boundary : HCurve from Adaptor3d;
Tang : Integer from Standard;
NPt : Integer from Standard = 10;
TolDist : Real from Standard = 0.0001)
returns CurveConstraint from BRepFill
raises ConstructionError;
--purpose : if Order is not 0 or -1
-- Purpose: Create a constraint
-- Order is the order of the constraint. The possible values for order are -1,0.
-- Order i means constraints Gi
-- Npt is the number of points associated with the constraint.
-- TolDist is the maximum error to satisfy for G0 constraints
-- These errors can be replaced by laws of criterion.
end;

View File

@@ -14,23 +14,27 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BRepFill_CurveConstraint.ixx>
#include <GeomPlate_CurveConstraint.hxx>
#include <GCPnts_AbscissaPoint.hxx>
#include <Adaptor2d_HCurve2d.hxx>
#include <Adaptor3d_HSurface.hxx>
#include <ProjLib_ProjectOnPlane.hxx>
#include <GeomAdaptor.hxx>
#include <GeomAPI.hxx>
#include <Geom_Plane.hxx>
#include <Precision.hxx>
#include <GeomAdaptor_HSurface.hxx>
#include <BRepAdaptor_HSurface.hxx>
#include <BRep_Tool.hxx>
#include <Geom2dAdaptor_HCurve.hxx>
#include <Adaptor2d_HCurve2d.hxx>
#include <Adaptor3d_HCurve.hxx>
#include <Adaptor3d_HCurveOnSurface.hxx>
#include <Adaptor3d_HSurface.hxx>
#include <BRep_Tool.hxx>
#include <BRepAdaptor_HSurface.hxx>
#include <BRepFill_CurveConstraint.hxx>
#include <GCPnts_AbscissaPoint.hxx>
#include <Geom2dAdaptor_HCurve.hxx>
#include <Geom_Plane.hxx>
#include <GeomAdaptor.hxx>
#include <GeomAdaptor_HSurface.hxx>
#include <GeomAPI.hxx>
#include <GeomPlate_CurveConstraint.hxx>
#include <Precision.hxx>
#include <ProjLib_ProjectedCurve.hxx>
#include <ProjLib_ProjectOnPlane.hxx>
#include <Standard_ConstructionError.hxx>
#include <Standard_Type.hxx>
//---------------------------------------------------------
// Constructeurs avec courbe sur surface
//---------------------------------------------------------

View File

@@ -0,0 +1,78 @@
// Created on: 1997-10-31
// Created by: Joelle CHAUVET
// Copyright (c) 1997-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 _BRepFill_CurveConstraint_HeaderFile
#define _BRepFill_CurveConstraint_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <GeomPlate_CurveConstraint.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Real.hxx>
class Standard_ConstructionError;
class Adaptor3d_HCurveOnSurface;
class Adaptor3d_HCurve;
class BRepFill_CurveConstraint;
DEFINE_STANDARD_HANDLE(BRepFill_CurveConstraint, GeomPlate_CurveConstraint)
//! same as CurveConstraint from GeomPlate
//! with BRepAdaptor_Surface instead of
//! GeomAdaptor_Surface
class BRepFill_CurveConstraint : public GeomPlate_CurveConstraint
{
public:
//! Create a constraint
//! Order is the order of the constraint. The possible values for order are -1,0,1,2.
//! Order i means constraints Gi
//! Npt is the number of points associated with the constraint.
//! TolDist is the maximum error to satisfy for G0 constraints
//! TolAng is the maximum error to satisfy for G1 constraints
//! TolCurv is the maximum error to satisfy for G2 constraints
//! These errors can be replaced by laws of criterion.
Standard_EXPORT BRepFill_CurveConstraint(const Handle(Adaptor3d_HCurveOnSurface)& Boundary, const Standard_Integer Order, const Standard_Integer NPt = 10, const Standard_Real TolDist = 0.0001, const Standard_Real TolAng = 0.01, const Standard_Real TolCurv = 0.1);
Standard_EXPORT BRepFill_CurveConstraint(const Handle(Adaptor3d_HCurve)& Boundary, const Standard_Integer Tang, const Standard_Integer NPt = 10, const Standard_Real TolDist = 0.0001);
DEFINE_STANDARD_RTTI(BRepFill_CurveConstraint,GeomPlate_CurveConstraint)
protected:
private:
};
#endif // _BRepFill_CurveConstraint_HeaderFile

View File

@@ -1,134 +0,0 @@
-- 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 Draft from BRepFill
uses
LocationDraft from GeomFill,
Dir from gp,
Box from Bnd,
Surface from Geom,
SectionLaw from BRepFill,
DraftLaw from BRepFill,
TransitionStyle from BRepFill,
HCurve from Adaptor3d,
Shape from GeomAbs,
Shape from TopoDS,
Shell from TopoDS,
Face from TopoDS,
Wire from TopoDS,
ListOfShape from TopTools,
HArray2OfShape from TopTools
raises
NotDone
is
Create(Shape : Shape from TopoDS;
Dir : Dir from gp;
Angle : Real)
---Purpose:
returns Draft from BRepFill;
SetOptions(me : in out;
Style : TransitionStyle from BRepFill = BRepFill_Right;
AngleMin : Real = 0.01;
AngleMax : Real = 3.0);
---Purpose:
SetDraft(me: in out; IsInternal : Boolean = Standard_False);
---Purpose:
Perform(me : in out;
LengthMax : Real)
is static;
---Purpose:
Perform(me : in out;
Surface : Surface from Geom;
KeepInsideSurface : Boolean = Standard_True)
is static;
---Purpose:
Perform(me : in out;
StopShape : Shape from TopoDS;
KeepOutSide : Boolean = Standard_True)
is static;
---Purpose:
IsDone(me)
returns Boolean;
Shell(me)
---Purpose: Returns the draft surface
-- To have the complete shape
-- you have to use the Shape() methode.
returns Shell from TopoDS
raises NotDone;
Generated (me: in out; S : Shape from TopoDS)
---Purpose: Returns the list of shapes generated from the
-- shape <S>.
---C++: return const &
---Level: Public
returns ListOfShape from TopTools;
Shape(me)
returns Shape from TopoDS;
-- retourne la shape resultat
Init(me:in out; Surf : Surface from Geom;
Length : Real;
Box : Box from Bnd)
is private;
BuildShell(me:in out; Surf : Surface from Geom;
KeepOutSide : Boolean = Standard_False)
is private;
Fuse(me:in out; S : Shape from TopoDS;
KeepOutSide : Boolean)
returns Boolean is private;
Sewing(me: in out)
returns Boolean is private;
fields
myDir : Dir from gp;
myAngle : Real;
angmin, angmax : Real;
myTol : Real;
myLoc : DraftLaw from BRepFill;
mySec : SectionLaw from BRepFill;
mySections: HArray2OfShape from TopTools;
myFaces : HArray2OfShape from TopTools;
myGenerated : ListOfShape from TopTools;
myShape : Shape from TopoDS;
myTop : Shape from TopoDS;
myShell : Shell from TopoDS;
myWire : Wire from TopoDS;
myCont : Shape from GeomAbs;
myStyle : TransitionStyle from BRepFill;
IsInternal : Boolean;
myDone : Boolean;
end Draft;

View File

@@ -15,72 +15,63 @@
// commercial license or contractual agreement.
#include <BRepFill_Draft.ixx>
#include <BRepFill_DraftLaw.hxx>
#include <BRepFill_ShapeLaw.hxx>
#include <BRepFill_Sweep.hxx>
#include <BRepFill_DataMapOfShapeHArray2OfShape.hxx>
#include <Adaptor3d_HCurve.hxx>
#include <Adaptor3d_Surface.hxx>
#include <Bnd_Box.hxx>
#include <BndLib_Add3dCurve.hxx>
#include <BndLib_AddSurface.hxx>
#include <Bnd_Box.hxx>
#include <gp_Dir.hxx>
#include <gp_Pnt.hxx>
#include <gp_Trsf.hxx>
#include <gp_Ax3.hxx>
#include <gp_Lin.hxx>
#include <gp_Mat.hxx>
#include <TColgp_Array1OfPnt.hxx>
#include <GeomAdaptor_Surface.hxx>
#include <BRepAdaptor_Surface.hxx>
#include <Adaptor3d_HCurve.hxx>
#include <GeomLProp_SLProps.hxx>
#include <Geom_Surface.hxx>
#include <Geom_Line.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <Geom_Geometry.hxx>
#include <Geom_Plane.hxx>
#include <Geom_RectangularTrimmedSurface.hxx>
#include <GeomAdaptor_HSurface.hxx>
#include <Adaptor3d_Surface.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <GeomFill_LocationDraft.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Wire.hxx>
#include <TopoDS_Shell.hxx>
#include <TopoDS_Solid.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopExp_Explorer.hxx>
#include <TopExp.hxx>
#include <TopAbs.hxx>
#include <BRepLib_MakeWire.hxx>
#include <BRepLib_MakeEdge.hxx>
#include <BRepLib_MakeFace.hxx>
#include <BRepLib_FindSurface.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <BRepTools.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <BRepAdaptor_Surface.hxx>
#include <BRepAlgo_DSAccess.hxx>
#include <BRepBuilderAPI_Sewing.hxx>
#include <BRepClass3d_SolidClassifier.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_ListOfShape.hxx>
#include <BRepExtrema_DistShapeShape.hxx>
#include <Precision.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <BRepFill_DataMapOfShapeHArray2OfShape.hxx>
#include <BRepFill_Draft.hxx>
#include <BRepFill_DraftLaw.hxx>
#include <BRepFill_SectionLaw.hxx>
#include <BRepFill_ShapeLaw.hxx>
#include <BRepFill_Sweep.hxx>
#include <BRepLib_FindSurface.hxx>
#include <BRepLib_MakeEdge.hxx>
#include <BRepLib_MakeFace.hxx>
#include <BRepLib_MakeWire.hxx>
#include <BRepTools.hxx>
#include <Geom_Geometry.hxx>
#include <Geom_Line.hxx>
#include <Geom_Plane.hxx>
#include <Geom_RectangularTrimmedSurface.hxx>
#include <Geom_Surface.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <GeomAdaptor_HSurface.hxx>
#include <GeomAdaptor_Surface.hxx>
#include <GeomFill_LocationDraft.hxx>
#include <GeomLProp_SLProps.hxx>
#include <gp_Ax3.hxx>
#include <gp_Dir.hxx>
#include <gp_Lin.hxx>
#include <gp_Mat.hxx>
#include <gp_Pnt.hxx>
#include <gp_Trsf.hxx>
#include <Precision.hxx>
#include <Standard_NoSuchObject.hxx>
#include <StdFail_NotDone.hxx>
#include <TColgp_Array1OfPnt.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <TopAbs.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Shell.hxx>
#include <TopoDS_Solid.hxx>
#include <TopoDS_Wire.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_ListOfShape.hxx>
#ifdef DRAW
#include <Geom_Circle.hxx>

View File

@@ -0,0 +1,123 @@
// 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 _BRepFill_Draft_HeaderFile
#define _BRepFill_Draft_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <gp_Dir.hxx>
#include <Standard_Real.hxx>
#include <TopTools_HArray2OfShape.hxx>
#include <TopTools_ListOfShape.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Shell.hxx>
#include <TopoDS_Wire.hxx>
#include <GeomAbs_Shape.hxx>
#include <BRepFill_TransitionStyle.hxx>
#include <Standard_Boolean.hxx>
class BRepFill_DraftLaw;
class BRepFill_SectionLaw;
class StdFail_NotDone;
class TopoDS_Shape;
class gp_Dir;
class Geom_Surface;
class TopoDS_Shell;
class Bnd_Box;
class BRepFill_Draft
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT BRepFill_Draft(const TopoDS_Shape& Shape, const gp_Dir& Dir, const Standard_Real Angle);
Standard_EXPORT void SetOptions (const BRepFill_TransitionStyle Style = BRepFill_Right, const Standard_Real AngleMin = 0.01, const Standard_Real AngleMax = 3.0);
Standard_EXPORT void SetDraft (const Standard_Boolean IsInternal = Standard_False);
Standard_EXPORT void Perform (const Standard_Real LengthMax);
Standard_EXPORT void Perform (const Handle(Geom_Surface)& Surface, const Standard_Boolean KeepInsideSurface = Standard_True);
Standard_EXPORT void Perform (const TopoDS_Shape& StopShape, const Standard_Boolean KeepOutSide = Standard_True);
Standard_EXPORT Standard_Boolean IsDone() const;
//! Returns the draft surface
//! To have the complete shape
//! you have to use the Shape() methode.
Standard_EXPORT TopoDS_Shell Shell() const;
//! Returns the list of shapes generated from the
//! shape <S>.
Standard_EXPORT const TopTools_ListOfShape& Generated (const TopoDS_Shape& S);
Standard_EXPORT TopoDS_Shape Shape() const;
protected:
private:
Standard_EXPORT void Init (const Handle(Geom_Surface)& Surf, const Standard_Real Length, const Bnd_Box& Box);
Standard_EXPORT void BuildShell (const Handle(Geom_Surface)& Surf, const Standard_Boolean KeepOutSide = Standard_False);
Standard_EXPORT Standard_Boolean Fuse (const TopoDS_Shape& S, const Standard_Boolean KeepOutSide);
Standard_EXPORT Standard_Boolean Sewing();
gp_Dir myDir;
Standard_Real myAngle;
Standard_Real angmin;
Standard_Real angmax;
Standard_Real myTol;
Handle(BRepFill_DraftLaw) myLoc;
Handle(BRepFill_SectionLaw) mySec;
Handle(TopTools_HArray2OfShape) mySections;
Handle(TopTools_HArray2OfShape) myFaces;
TopTools_ListOfShape myGenerated;
TopoDS_Shape myShape;
TopoDS_Shape myTop;
TopoDS_Shell myShell;
TopoDS_Wire myWire;
GeomAbs_Shape myCont;
BRepFill_TransitionStyle myStyle;
Standard_Boolean IsInternal;
Standard_Boolean myDone;
};
#endif // _BRepFill_Draft_HeaderFile

View File

@@ -1,37 +0,0 @@
-- Created on: 1998-01-14
-- Created by: Philippe MANGIN
-- 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 DraftLaw from BRepFill inherits Edge3DLaw from BRepFill
---Purpose: Build Location Law, with a Wire.
uses
LocationDraft from GeomFill,
Wire from TopoDS
is
Create (Path : Wire from TopoDS;
Law : LocationDraft from GeomFill)
returns DraftLaw from BRepFill;
CleanLaw(me : mutable; TolAngular : Real)
---Purpose: To clean the little discontinuities.
is static;
end DraftLaw;

View File

@@ -14,23 +14,22 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BRepFill_DraftLaw.ixx>
#include <BRepFill_DraftLaw.hxx>
#include <GeomFill_HArray1OfLocationLaw.hxx>
#include <GeomFill_LocationDraft.hxx>
#include <GeomFill_LocationLaw.hxx>
#include <GeomFill_HArray1OfLocationLaw.hxx>
#include <gp_Vec.hxx>
#include <gp_Mat.hxx>
#include <gp_XYZ.hxx>
#include <gp_Trsf.hxx>
#include <gp_Vec.hxx>
#include <gp_XYZ.hxx>
#include <Standard_Type.hxx>
#include <TopoDS_Wire.hxx>
//=======================================================================
//function : ToG0
//purpose : Cacul une tranformation T tq T.M2 = M1
//=======================================================================
static void ToG0(const gp_Mat& M1, const gp_Mat& M2, gp_Mat& T) {
T = M2.Inverted();
T *= M1;

View File

@@ -0,0 +1,67 @@
// Created on: 1998-01-14
// Created by: Philippe MANGIN
// 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 _BRepFill_DraftLaw_HeaderFile
#define _BRepFill_DraftLaw_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <BRepFill_Edge3DLaw.hxx>
#include <Standard_Real.hxx>
class TopoDS_Wire;
class GeomFill_LocationDraft;
class BRepFill_DraftLaw;
DEFINE_STANDARD_HANDLE(BRepFill_DraftLaw, BRepFill_Edge3DLaw)
//! Build Location Law, with a Wire.
class BRepFill_DraftLaw : public BRepFill_Edge3DLaw
{
public:
Standard_EXPORT BRepFill_DraftLaw(const TopoDS_Wire& Path, const Handle(GeomFill_LocationDraft)& Law);
//! To clean the little discontinuities.
Standard_EXPORT void CleanLaw (const Standard_Real TolAngular);
DEFINE_STANDARD_RTTI(BRepFill_DraftLaw,BRepFill_Edge3DLaw)
protected:
private:
};
#endif // _BRepFill_DraftLaw_HeaderFile

View File

@@ -1,30 +0,0 @@
-- Created on: 1998-07-27
-- Created by: Philippe MANGIN
-- 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 Edge3DLaw from BRepFill inherits LocationLaw from BRepFill
---Purpose: Build Location Law, with a Wire.
uses
Wire from TopoDS,
LocationLaw from GeomFill
is
Create (Path : Wire from TopoDS;
Law : LocationLaw from GeomFill)
returns Edge3DLaw from BRepFill;
end Edge3DLaw;

View File

@@ -14,20 +14,21 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BRepFill_Edge3DLaw.ixx>
#include <BRepTools_WireExplorer.hxx>
#include <BRep_Tool.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#include <TopExp.hxx>
#include <TopTools_HArray1OfShape.hxx>
#include <GeomFill_LocationLaw.hxx>
#include <GeomFill_HArray1OfLocationLaw.hxx>
#include <BRepFill_Edge3DLaw.hxx>
#include <BRepTools_WireExplorer.hxx>
#include <Geom_Curve.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <GeomAdaptor_HCurve.hxx>
#include <GeomFill_HArray1OfLocationLaw.hxx>
#include <GeomFill_LocationLaw.hxx>
#include <Standard_Type.hxx>
#include <TopExp.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Wire.hxx>
#include <TopTools_HArray1OfShape.hxx>
BRepFill_Edge3DLaw::BRepFill_Edge3DLaw(const TopoDS_Wire& Path,
const Handle(GeomFill_LocationLaw)& Law)

View File

@@ -0,0 +1,63 @@
// Created on: 1998-07-27
// Created by: Philippe MANGIN
// 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 _BRepFill_Edge3DLaw_HeaderFile
#define _BRepFill_Edge3DLaw_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <BRepFill_LocationLaw.hxx>
class TopoDS_Wire;
class GeomFill_LocationLaw;
class BRepFill_Edge3DLaw;
DEFINE_STANDARD_HANDLE(BRepFill_Edge3DLaw, BRepFill_LocationLaw)
//! Build Location Law, with a Wire.
class BRepFill_Edge3DLaw : public BRepFill_LocationLaw
{
public:
Standard_EXPORT BRepFill_Edge3DLaw(const TopoDS_Wire& Path, const Handle(GeomFill_LocationLaw)& Law);
DEFINE_STANDARD_RTTI(BRepFill_Edge3DLaw,BRepFill_LocationLaw)
protected:
private:
};
#endif // _BRepFill_Edge3DLaw_HeaderFile

View File

@@ -1,42 +0,0 @@
-- Created on: 1998-10-02
-- Created by: Julia GERASIMOVA
-- 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.
private class EdgeFaceAndOrder from BRepFill
---Purpose:
uses
Edge from TopoDS,
Face from TopoDS,
Shape from GeomAbs
is
Create returns EdgeFaceAndOrder from BRepFill;
Create( anEdge : Edge from TopoDS;
aFace : Face from TopoDS;
anOrder : Shape from GeomAbs )
returns EdgeFaceAndOrder from BRepFill;
fields
myEdge : Edge from TopoDS;
myFace : Face from TopoDS;
myOrder : Shape from GeomAbs;
friends
class Filling from BRepFill
end EdgeFaceAndOrder;

View File

@@ -14,7 +14,11 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BRepFill_EdgeFaceAndOrder.ixx>
#include <BRepFill_EdgeFaceAndOrder.hxx>
#include <BRepFill_Filling.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
BRepFill_EdgeFaceAndOrder::BRepFill_EdgeFaceAndOrder()
{

View File

@@ -0,0 +1,71 @@
// Created on: 1998-10-02
// Created by: Julia GERASIMOVA
// 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 _BRepFill_EdgeFaceAndOrder_HeaderFile
#define _BRepFill_EdgeFaceAndOrder_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <GeomAbs_Shape.hxx>
class BRepFill_Filling;
class TopoDS_Edge;
class TopoDS_Face;
class BRepFill_EdgeFaceAndOrder
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT BRepFill_EdgeFaceAndOrder();
Standard_EXPORT BRepFill_EdgeFaceAndOrder(const TopoDS_Edge& anEdge, const TopoDS_Face& aFace, const GeomAbs_Shape anOrder);
friend class BRepFill_Filling;
protected:
private:
TopoDS_Edge myEdge;
TopoDS_Face myFace;
GeomAbs_Shape myOrder;
};
#endif // _BRepFill_EdgeFaceAndOrder_HeaderFile

View File

@@ -1,40 +0,0 @@
-- Created on: 1998-07-27
-- Created by: Philippe MANGIN
-- 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 EdgeOnSurfLaw from BRepFill inherits LocationLaw from BRepFill
---Purpose: Build Location Law, with a Wire and a Surface.
uses
Wire from TopoDS,
Shape from TopoDS
is
Create (Path : Wire from TopoDS;
Surf : Shape from TopoDS)
returns EdgeOnSurfLaw from BRepFill;
HasResult(me)
---Purpose: returns <False> if one Edge of <Path> do not have
-- representation on <Surf>. In this case it is
-- impossible to use this object.
returns Boolean;
fields
hasresult : Boolean;
end EdgeOnSurfLaw;

View File

@@ -14,27 +14,27 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BRepFill_EdgeOnSurfLaw.ixx>
#include <BRepTools_WireExplorer.hxx>
#include <BRep_Tool.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#include <TopExp_Explorer.hxx>
#include <TopTools_HArray1OfShape.hxx>
#include <GeomFill_LocationLaw.hxx>
#include <GeomFill_HArray1OfLocationLaw.hxx>
#include <GeomFill_Darboux.hxx>
#include <GeomFill_CurveAndTrihedron.hxx>
#include <Geom2d_Curve.hxx>
#include <Geom2d_TrimmedCurve.hxx>
#include <Adaptor3d_CurveOnSurface.hxx>
#include <Adaptor3d_HCurveOnSurface.hxx>
#include <Geom2dAdaptor_HCurve.hxx>
#include <BRep_Tool.hxx>
#include <BRepAdaptor_HSurface.hxx>
#include <BRepFill_EdgeOnSurfLaw.hxx>
#include <BRepTools_WireExplorer.hxx>
#include <Geom2d_Curve.hxx>
#include <Geom2d_TrimmedCurve.hxx>
#include <Geom2dAdaptor_HCurve.hxx>
#include <GeomFill_CurveAndTrihedron.hxx>
#include <GeomFill_Darboux.hxx>
#include <GeomFill_HArray1OfLocationLaw.hxx>
#include <GeomFill_LocationLaw.hxx>
#include <Standard_Type.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Wire.hxx>
#include <TopTools_HArray1OfShape.hxx>
BRepFill_EdgeOnSurfLaw::BRepFill_EdgeOnSurfLaw(const TopoDS_Wire& Path,
const TopoDS_Shape& Surf)

View File

@@ -0,0 +1,70 @@
// Created on: 1998-07-27
// Created by: Philippe MANGIN
// 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 _BRepFill_EdgeOnSurfLaw_HeaderFile
#define _BRepFill_EdgeOnSurfLaw_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Standard_Boolean.hxx>
#include <BRepFill_LocationLaw.hxx>
class TopoDS_Wire;
class TopoDS_Shape;
class BRepFill_EdgeOnSurfLaw;
DEFINE_STANDARD_HANDLE(BRepFill_EdgeOnSurfLaw, BRepFill_LocationLaw)
//! Build Location Law, with a Wire and a Surface.
class BRepFill_EdgeOnSurfLaw : public BRepFill_LocationLaw
{
public:
Standard_EXPORT BRepFill_EdgeOnSurfLaw(const TopoDS_Wire& Path, const TopoDS_Shape& Surf);
//! returns <False> if one Edge of <Path> do not have
//! representation on <Surf>. In this case it is
//! impossible to use this object.
Standard_EXPORT Standard_Boolean HasResult() const;
DEFINE_STANDARD_RTTI(BRepFill_EdgeOnSurfLaw,BRepFill_LocationLaw)
protected:
private:
Standard_Boolean hasresult;
};
#endif // _BRepFill_EdgeOnSurfLaw_HeaderFile

View File

@@ -1,265 +0,0 @@
-- Created on: 1994-10-03
-- Created by: Bruno DUMORTIER
-- Copyright (c) 1994-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 Evolved from BRepFill
---Purpose: Constructs an evolved volume from a spine (wire or face)
-- and a profile ( wire).
uses
Vertex from TopoDS,
Edge from TopoDS,
Face from TopoDS,
Wire from TopoDS,
Shape from TopoDS,
Location from TopLoc,
Ax3 from gp,
JoinType from GeomAbs,
ListOfShape from TopTools,
DataMapOfShapeShape from TopTools,
DataMapOfShapeDataMapOfShapeListOfShape from BRepFill,
BisectingLocus from BRepMAT2d,
LinkTopoBilo from BRepMAT2d,
Quilt from BRepTools
raises
ConstructionError from Standard,
NoSuchObject from Standard
is
---Level: Public
Create returns Evolved from BRepFill;
Create ( Spine : Wire from TopoDS;
Profile : Wire from TopoDS;
AxeProf : Ax3 from gp;
Join : JoinType from GeomAbs = GeomAbs_Arc;
Solid : Boolean from Standard = Standard_False)
returns Evolved from BRepFill
---Purpose: Creates an evolved shape by sweeping the <Profile>
-- along the <Spine>. <AxeProf> is used to set the
-- position of <Profile> along <Spine> as follows:
-- <AxeProf> slides on the profile with direction
-- colinear to the normal to <Spine>, and its
-- <XDirection> mixed with the tangent to <Spine>.
--
raises
ConstructionError from Standard;
Create ( Spine : Face from TopoDS;
Profile : Wire from TopoDS;
AxeProf : Ax3 from gp;
Join : JoinType from GeomAbs = GeomAbs_Arc;
Solid : Boolean from Standard = Standard_False)
returns Evolved from BRepFill
---Purpose: Creates an evolved shape by sweeping the <Profile>
-- along the <Spine>
raises
ConstructionError from Standard;
Perform (me : in out;
Spine : Wire from TopoDS;
Profile : Wire from TopoDS;
AxeProf : Ax3 from gp;
Join : JoinType from GeomAbs = GeomAbs_Arc;
Solid : Boolean from Standard = Standard_False)
---Purpose: Performs an evolved shape by sweeping the <Profile>
-- along the <Spine>
raises
ConstructionError from Standard
is static;
Perform (me : in out;
Spine : Face from TopoDS;
Profile : Wire from TopoDS;
AxeProf : Ax3 from gp;
Join : JoinType from GeomAbs = GeomAbs_Arc;
Solid : Boolean from Standard = Standard_False)
---Purpose: Performs an evolved shape by sweeping the <Profile>
-- along the <Spine>
raises
ConstructionError from Standard
is static;
IsDone ( me)
returns Boolean from Standard
is static;
Shape(me) returns Shape from TopoDS
---Purpose: returns the generated shape.
---C++ : return const &
is static;
GeneratedShapes (me ;
SpineShape : Shape from TopoDS;
ProfShape : Shape from TopoDS)
---Purpose: Returns the shapes created from a subshape
-- <SpineShape> of the spine and a subshape
-- <ProfShape> on the profile.
--
---C++ : return const &
returns ListOfShape from TopTools
is static;
JoinType (me) returns JoinType from GeomAbs
is static;
Top (me) returns Shape from TopoDS
---Purpose: Return the face Top if <Solid> is True in the constructor.
---C++ : return const &
is static;
Bottom (me) returns Shape from TopoDS
---Purpose: Return the face Bottom if <Solid> is True in the constructor.
---C++ : return const &
is static;
---Level: Internal
PrivatePerform (me : in out;
Spine : Face from TopoDS;
Profile : Wire from TopoDS;
AxeProf : Ax3 from gp;
Join : JoinType from GeomAbs = GeomAbs_Arc;
Solid : Boolean from Standard = Standard_False)
raises
ConstructionError from Standard
is static private;
SetWork (me : in out;
Spine : Face from TopoDS;
Profile : Wire from TopoDS)
is static private;
ElementaryPerform ( me : in out;
Spine : Face from TopoDS;
Profile : Wire from TopoDS;
Locus : BisectingLocus from BRepMAT2d;
Link : in out LinkTopoBilo from BRepMAT2d;
Join : JoinType from GeomAbs = GeomAbs_Arc)
raises
ConstructionError from Standard
is static private;
PlanarPerform ( me : in out;
Spine : Face from TopoDS;
Profile : Wire from TopoDS;
Locus : BisectingLocus from BRepMAT2d;
Link : in out LinkTopoBilo from BRepMAT2d;
Join : JoinType from GeomAbs = GeomAbs_Arc)
raises
ConstructionError from Standard
is static private;
VerticalPerform ( me : in out;
Spine : Face from TopoDS;
Profile : Wire from TopoDS;
Locus : BisectingLocus from BRepMAT2d;
Link : in out LinkTopoBilo from BRepMAT2d;
Join : JoinType from GeomAbs = GeomAbs_Arc)
raises
ConstructionError from Standard
is static private;
Generated (me : in out )
---C++: return &
returns DataMapOfShapeDataMapOfShapeListOfShape from BRepFill
is static private;
Add ( me : in out; Vevo : in out Evolved from BRepFill;
Prof : Wire from TopoDS;
Glue : in out Quilt from BRepTools)
is static private;
ChangeShape(me : in out) returns Shape from TopoDS
---C++: return &
is static private;
Transfert( me : in out;
Vevo : in out Evolved from BRepFill;
MapProf : DataMapOfShapeShape from TopTools;
MapSpine : DataMapOfShapeShape from TopTools;
LS, InitLS, InitLP : Location from TopLoc)
is static private;
PrepareProfile ( me ; WorkProf : in out ListOfShape from TopTools;
MapProf : in out DataMapOfShapeShape from TopTools)
---Purpose: Prepare the profil as follow
-- - Project the profile in the yOz Plane
-- - Cut the profile at the extrema of distance from the
-- Profile to the Oz Axis.
-- - building the new wires with the cutting edges.
is static private;
PrepareSpine ( me ; WorkSpine : in out Face from TopoDS ;
SpineProf : in out DataMapOfShapeShape from TopTools)
---Purpose: Prepare the spine as follow
-- - Cut the spine-Edges at the extrema of curvature and
-- at the inflexion points.
is static private;
MakePipe (me : in out; SpineEdge : Edge from TopoDS ;
ProfRef : Ax3 from gp)
is static private;
MakeRevol(me : in out; SpineEdge : Edge from TopoDS;
SpineVertex : Vertex from TopoDS;
ProfRef : Ax3 from gp)
is static private;
FindLocation(me; Face : Face from TopoDS)
returns Location from TopLoc
---Purpose: Find the location transforming the planar shape <Shape>
-- in the plane xOy
raises NoSuchObject from Standard
---Purpose: if the Shape is not planar.
is static private;
TransformInitWork(me : in out; LS , LP : Location from TopLoc)
---Purpose: Apply the Location <LS> to <mySpine> and <LP> to
-- <myProfil>
-- in order to set the Shapes in the work space.
is static private;
ContinuityOnOffsetEdge (me : in out; WorkProf : ListOfShape from TopTools)
is static private;
AddTopAndBottom (me : in out;Glue : in out Quilt from BRepTools)
is static private;
MakeSolid(me : in out)
is static private;
fields
mySpine : Face from TopoDS;
myProfile : Wire from TopoDS;
myShape : Shape from TopoDS;
myIsDone : Boolean from Standard;
mySpineType : Boolean from Standard; -- True : Face ; False : Wire
myJoinType : JoinType from GeomAbs;
myMap : DataMapOfShapeDataMapOfShapeListOfShape from BRepFill;
myTop : Shape from TopoDS;
myBottom : Shape from TopoDS;
end Evolved;

View File

@@ -15,112 +15,103 @@
// commercial license or contractual agreement.
#include <BRepFill_Evolved.ixx>
#include <Bnd_Box2d.hxx>
#include <BndLib_Add2dCurve.hxx>
#include <BRepFill_OffsetWire.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <BRep_Builder.hxx>
#include <BRepClass3d_SolidClassifier.hxx>
#include <BRepLib.hxx>
#include <BRepMAT2d_Explorer.hxx>
#include <BRepFill_Pipe.hxx>
#include <BRepFill_OffsetAncestors.hxx>
#include <BRepAlgo_FaceRestrictor.hxx>
#include <BRepLib_FindSurface.hxx>
#include <BRepLib_MakeFace.hxx>
#include <BRepLib_MakeWire.hxx>
#include <BRepLib_MakeEdge.hxx>
#include <BRepLib_MakeVertex.hxx>
#include <BRepAlgo_Loop.hxx>
#include <BRepSweep_Revol.hxx>
#include <BRepSweep_Prism.hxx>
#include <BRepTools.hxx>
#include <BRepTools_WireExplorer.hxx>
#include <BRepTools_TrsfModification.hxx>
#include <BRepTools_Modifier.hxx>
#include <BRep_Tool.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <BRepLProp.hxx>
#include <BRepMAT2d_LinkTopoBilo.hxx>
#include <BRepMAT2d_BisectingLocus.hxx>
#include <BRepMAT2d_Explorer.hxx>
#include <GeomAPI.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom_Surface.hxx>
#include <Geom_Plane.hxx>
#include <Geom_Curve.hxx>
#include <Geom_Line.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <Geom2d_CartesianPoint.hxx>
#include <Geom2d_Curve.hxx>
#include <Geom2d_Line.hxx>
#include <Geom2d_Circle.hxx>
#include <Geom2d_TrimmedCurve.hxx>
#include <Geom2d_Geometry.hxx>
#include <GeomProjLib.hxx>
#include <Geom_RectangularTrimmedSurface.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom2dAPI_ExtremaCurveCurve.hxx>
#include <IntRes2d_IntersectionPoint.hxx>
#include <Geom2dInt_GInter.hxx>
#include <MAT2d_CutCurve.hxx>
#include <MAT_Graph.hxx>
#include <MAT_BasicElt.hxx>
#include <MAT_Side.hxx>
#include <MAT_Arc.hxx>
#include <MAT_Node.hxx>
#include <Bisector_Bisec.hxx>
#include <Bisector_BisecAna.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Wire.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Compound.hxx>
#include <TopoDS_Solid.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopTools_DataMapOfShapeShape.hxx>
#include <TopTools_SequenceOfShape.hxx>
#include <TopTools_DataMapIteratorOfDataMapOfShapeShape.hxx>
#include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_DataMapOfShapeSequenceOfShape.hxx>
#include <TopLoc_Location.hxx>
#include <TopAbs.hxx>
#include <Bnd_Box2d.hxx>
#include <BndLib_Add2dCurve.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <BRepAlgo_FaceRestrictor.hxx>
#include <BRepAlgo_Loop.hxx>
#include <BRepClass3d_SolidClassifier.hxx>
#include <BRepFill_DataMapIteratorOfDataMapOfShapeDataMapOfShapeListOfShape.hxx>
#include <BRepFill_DataMapOfNodeDataMapOfShapeShape.hxx>
#include <BRepFill_DataMapOfShapeDataMapOfShapeListOfShape.hxx>
#include <BRepFill_DataMapOfShapeSequenceOfPnt.hxx>
#include <BRepFill_DataMapOfShapeSequenceOfReal.hxx>
#include <BRepFill_Evolved.hxx>
#include <BRepFill_OffsetAncestors.hxx>
#include <BRepFill_OffsetWire.hxx>
#include <BRepFill_Pipe.hxx>
#include <BRepFill_TrimSurfaceTool.hxx>
#include <BRepLib.hxx>
#include <BRepLib_FindSurface.hxx>
#include <BRepLib_MakeEdge.hxx>
#include <BRepLib_MakeFace.hxx>
#include <BRepLib_MakeVertex.hxx>
#include <BRepLib_MakeWire.hxx>
#include <BRepLProp.hxx>
#include <BRepMAT2d_BisectingLocus.hxx>
#include <BRepMAT2d_Explorer.hxx>
#include <BRepMAT2d_LinkTopoBilo.hxx>
#include <BRepSweep_Prism.hxx>
#include <BRepSweep_Revol.hxx>
#include <BRepTools.hxx>
#include <BRepTools_Modifier.hxx>
#include <BRepTools_Quilt.hxx>
#include <BRepTools_TrsfModification.hxx>
#include <BRepTools_WireExplorer.hxx>
#include <Geom2d_CartesianPoint.hxx>
#include <Geom2d_Circle.hxx>
#include <Geom2d_Curve.hxx>
#include <Geom2d_Geometry.hxx>
#include <Geom2d_Line.hxx>
#include <Geom2d_TrimmedCurve.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom2dAPI_ExtremaCurveCurve.hxx>
#include <Geom2dInt_GInter.hxx>
#include <Geom_Curve.hxx>
#include <Geom_Line.hxx>
#include <Geom_Plane.hxx>
#include <Geom_RectangularTrimmedSurface.hxx>
#include <Geom_Surface.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <GeomAPI.hxx>
#include <GeomProjLib.hxx>
#include <gp.hxx>
#include <gp_Ax1.hxx>
#include <gp_Ax3.hxx>
#include <gp_Circ2d.hxx>
#include <gp_Dir.hxx>
#include <gp_Pnt.hxx>
#include <gp_Pln.hxx>
#include <gp_Pnt.hxx>
#include <gp_Pnt2d.hxx>
#include <gp_Trsf.hxx>
#include <gp_Vec.hxx>
#include <gp_Vec2d.hxx>
#include <gp_Circ2d.hxx>
#include <IntRes2d_IntersectionPoint.hxx>
#include <MAT2d_CutCurve.hxx>
#include <MAT_Arc.hxx>
#include <MAT_BasicElt.hxx>
#include <MAT_Graph.hxx>
#include <MAT_Node.hxx>
#include <MAT_Side.hxx>
#include <Precision.hxx>
#include <Standard_ConstructionError.hxx>
#include <Standard_NoSuchObject.hxx>
#include <Standard_NotImplemented.hxx>
#include <TColgp_SequenceOfPnt.hxx>
#include <TColStd_SequenceOfReal.hxx>
#include <BRepFill_TrimSurfaceTool.hxx>
#include <BRepFill_DataMapOfNodeDataMapOfShapeShape.hxx>
#include <BRepFill_DataMapOfShapeDataMapOfShapeListOfShape.hxx>
#include <BRepFill_DataMapOfShapeSequenceOfReal.hxx>
#include <BRepFill_DataMapOfShapeSequenceOfPnt.hxx>
#include <BRepFill_DataMapIteratorOfDataMapOfShapeDataMapOfShapeListOfShape.hxx>
#include <Precision.hxx>
#include <Standard_ConstructionError.hxx>
#include <Standard_NotImplemented.hxx>
#include <TopAbs.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopLoc_Location.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Compound.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Solid.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Wire.hxx>
#include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
#include <TopTools_DataMapIteratorOfDataMapOfShapeShape.hxx>
#include <TopTools_DataMapOfShapeSequenceOfShape.hxx>
#include <TopTools_DataMapOfShapeShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_SequenceOfShape.hxx>
#ifdef DRAW
#include <DBRep.hxx>

View File

@@ -0,0 +1,177 @@
// Created on: 1994-10-03
// Created by: Bruno DUMORTIER
// Copyright (c) 1994-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 _BRepFill_Evolved_HeaderFile
#define _BRepFill_Evolved_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Wire.hxx>
#include <TopoDS_Shape.hxx>
#include <Standard_Boolean.hxx>
#include <GeomAbs_JoinType.hxx>
#include <BRepFill_DataMapOfShapeDataMapOfShapeListOfShape.hxx>
#include <TopTools_ListOfShape.hxx>
#include <TopTools_DataMapOfShapeShape.hxx>
class Standard_ConstructionError;
class Standard_NoSuchObject;
class TopoDS_Wire;
class gp_Ax3;
class TopoDS_Face;
class TopoDS_Shape;
class BRepMAT2d_BisectingLocus;
class BRepMAT2d_LinkTopoBilo;
class BRepTools_Quilt;
class TopLoc_Location;
class TopoDS_Edge;
class TopoDS_Vertex;
//! Constructs an evolved volume from a spine (wire or face)
//! and a profile ( wire).
class BRepFill_Evolved
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT BRepFill_Evolved();
//! Creates an evolved shape by sweeping the <Profile>
//! along the <Spine>. <AxeProf> is used to set the
//! position of <Profile> along <Spine> as follows:
//! <AxeProf> slides on the profile with direction
//! colinear to the normal to <Spine>, and its
//! <XDirection> mixed with the tangent to <Spine>.
Standard_EXPORT BRepFill_Evolved(const TopoDS_Wire& Spine, const TopoDS_Wire& Profile, const gp_Ax3& AxeProf, const GeomAbs_JoinType Join = GeomAbs_Arc, const Standard_Boolean Solid = Standard_False);
//! Creates an evolved shape by sweeping the <Profile>
//! along the <Spine>
Standard_EXPORT BRepFill_Evolved(const TopoDS_Face& Spine, const TopoDS_Wire& Profile, const gp_Ax3& AxeProf, const GeomAbs_JoinType Join = GeomAbs_Arc, const Standard_Boolean Solid = Standard_False);
//! Performs an evolved shape by sweeping the <Profile>
//! along the <Spine>
Standard_EXPORT void Perform (const TopoDS_Wire& Spine, const TopoDS_Wire& Profile, const gp_Ax3& AxeProf, const GeomAbs_JoinType Join = GeomAbs_Arc, const Standard_Boolean Solid = Standard_False);
//! Performs an evolved shape by sweeping the <Profile>
//! along the <Spine>
Standard_EXPORT void Perform (const TopoDS_Face& Spine, const TopoDS_Wire& Profile, const gp_Ax3& AxeProf, const GeomAbs_JoinType Join = GeomAbs_Arc, const Standard_Boolean Solid = Standard_False);
Standard_EXPORT Standard_Boolean IsDone() const;
//! returns the generated shape.
Standard_EXPORT const TopoDS_Shape& Shape() const;
//! Returns the shapes created from a subshape
//! <SpineShape> of the spine and a subshape
//! <ProfShape> on the profile.
Standard_EXPORT const TopTools_ListOfShape& GeneratedShapes (const TopoDS_Shape& SpineShape, const TopoDS_Shape& ProfShape) const;
Standard_EXPORT GeomAbs_JoinType JoinType() const;
//! Return the face Top if <Solid> is True in the constructor.
Standard_EXPORT const TopoDS_Shape& Top() const;
//! Return the face Bottom if <Solid> is True in the constructor.
Standard_EXPORT const TopoDS_Shape& Bottom() const;
protected:
private:
Standard_EXPORT void PrivatePerform (const TopoDS_Face& Spine, const TopoDS_Wire& Profile, const gp_Ax3& AxeProf, const GeomAbs_JoinType Join = GeomAbs_Arc, const Standard_Boolean Solid = Standard_False);
Standard_EXPORT void SetWork (const TopoDS_Face& Spine, const TopoDS_Wire& Profile);
Standard_EXPORT void ElementaryPerform (const TopoDS_Face& Spine, const TopoDS_Wire& Profile, const BRepMAT2d_BisectingLocus& Locus, BRepMAT2d_LinkTopoBilo& Link, const GeomAbs_JoinType Join = GeomAbs_Arc);
Standard_EXPORT void PlanarPerform (const TopoDS_Face& Spine, const TopoDS_Wire& Profile, const BRepMAT2d_BisectingLocus& Locus, BRepMAT2d_LinkTopoBilo& Link, const GeomAbs_JoinType Join = GeomAbs_Arc);
Standard_EXPORT void VerticalPerform (const TopoDS_Face& Spine, const TopoDS_Wire& Profile, const BRepMAT2d_BisectingLocus& Locus, BRepMAT2d_LinkTopoBilo& Link, const GeomAbs_JoinType Join = GeomAbs_Arc);
Standard_EXPORT BRepFill_DataMapOfShapeDataMapOfShapeListOfShape& Generated();
Standard_EXPORT void Add (BRepFill_Evolved& Vevo, const TopoDS_Wire& Prof, BRepTools_Quilt& Glue);
Standard_EXPORT TopoDS_Shape& ChangeShape();
Standard_EXPORT void Transfert (BRepFill_Evolved& Vevo, const TopTools_DataMapOfShapeShape& MapProf, const TopTools_DataMapOfShapeShape& MapSpine, const TopLoc_Location& LS, const TopLoc_Location& InitLS, const TopLoc_Location& InitLP);
//! Prepare the profil as follow
//! - Project the profile in the yOz Plane
//! - Cut the profile at the extrema of distance from the
//! Profile to the Oz Axis.
//! - building the new wires with the cutting edges.
Standard_EXPORT void PrepareProfile (TopTools_ListOfShape& WorkProf, TopTools_DataMapOfShapeShape& MapProf) const;
//! Prepare the spine as follow
//! - Cut the spine-Edges at the extrema of curvature and
//! at the inflexion points.
Standard_EXPORT void PrepareSpine (TopoDS_Face& WorkSpine, TopTools_DataMapOfShapeShape& SpineProf) const;
Standard_EXPORT void MakePipe (const TopoDS_Edge& SpineEdge, const gp_Ax3& ProfRef);
Standard_EXPORT void MakeRevol (const TopoDS_Edge& SpineEdge, const TopoDS_Vertex& SpineVertex, const gp_Ax3& ProfRef);
//! Find the location transforming the planar shape <Shape>
//! in the plane xOy
//! if the Shape is not planar.
Standard_EXPORT TopLoc_Location FindLocation (const TopoDS_Face& Face) const;
//! Apply the Location <LS> to <mySpine> and <LP> to
//! <myProfil>
//! in order to set the Shapes in the work space.
Standard_EXPORT void TransformInitWork (const TopLoc_Location& LS, const TopLoc_Location& LP);
Standard_EXPORT void ContinuityOnOffsetEdge (const TopTools_ListOfShape& WorkProf);
Standard_EXPORT void AddTopAndBottom (BRepTools_Quilt& Glue);
Standard_EXPORT void MakeSolid();
TopoDS_Face mySpine;
TopoDS_Wire myProfile;
TopoDS_Shape myShape;
Standard_Boolean myIsDone;
Standard_Boolean mySpineType;
GeomAbs_JoinType myJoinType;
BRepFill_DataMapOfShapeDataMapOfShapeListOfShape myMap;
TopoDS_Shape myTop;
TopoDS_Shape myBottom;
};
#endif // _BRepFill_Evolved_HeaderFile

View File

@@ -1,44 +0,0 @@
-- Created on: 1998-09-03
-- Created by: Julia GERASIMOVA
-- 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.
private class FaceAndOrder from BRepFill
---Purpose: A structure containing Face and Order of constraint
uses
Face from TopoDS,
Shape from GeomAbs
is
Create returns FaceAndOrder from BRepFill;
Create( aFace : Face from TopoDS;
anOrder : Shape from GeomAbs )
returns FaceAndOrder from BRepFill;
--Face(me : in out) returns Face from TopoDS;
-- ---C++: return &
--Order(me : in out) returns Integer from Standard;
-- ---C++: return &
fields
myFace : Face from TopoDS;
myOrder : Shape from GeomAbs;
friends
class Filling from BRepFill
end FaceAndOrder;

View File

@@ -14,7 +14,10 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BRepFill_FaceAndOrder.ixx>
#include <BRepFill_FaceAndOrder.hxx>
#include <BRepFill_Filling.hxx>
#include <TopoDS_Face.hxx>
BRepFill_FaceAndOrder::BRepFill_FaceAndOrder()
{

View File

@@ -0,0 +1,68 @@
// Created on: 1998-09-03
// Created by: Julia GERASIMOVA
// 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 _BRepFill_FaceAndOrder_HeaderFile
#define _BRepFill_FaceAndOrder_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <TopoDS_Face.hxx>
#include <GeomAbs_Shape.hxx>
class BRepFill_Filling;
class TopoDS_Face;
//! A structure containing Face and Order of constraint
class BRepFill_FaceAndOrder
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT BRepFill_FaceAndOrder();
Standard_EXPORT BRepFill_FaceAndOrder(const TopoDS_Face& aFace, const GeomAbs_Shape anOrder);
friend class BRepFill_Filling;
protected:
private:
TopoDS_Face myFace;
GeomAbs_Shape myOrder;
};
#endif // _BRepFill_FaceAndOrder_HeaderFile

View File

@@ -1,275 +0,0 @@
-- Created on: 1998-08-26
-- Created by: Julia GERASIMOVA
-- 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 Filling from BRepFill
---Purpose: N-Side Filling
-- This algorithm avoids to build a face from:
-- * a set of edges defining the bounds of the face and some
-- constraints the surface support has to satisfy
-- * a set of edges and points defining some constraints
-- the support surface has to satisfy
-- * an initial surface to deform for satisfying the constraints
-- * a set of parameters to control the constraints.
--
-- The support surface of the face is computed by deformation
-- of the initial surface in order to satisfy the given constraints.
-- The set of bounding edges defines the wire of the face.
--
-- If no initial surface is given, the algorithm computes it
-- automatically.
-- If the set of edges is not connected (Free constraint)
-- missing edges are automatically computed.
--
-- Limitations:
-- * If some constraints are not compatible
-- The algorithm does not take them into account.
-- So the constraints will not be satisfyed in an area containing
-- the incompatibilitries.
-- * The constraints defining the bound of the face have to be
-- entered in order to have a continuous wire.
--
-- Other Applications:
-- * Deformation of a face to satisfy internal constraints
-- * Deformation of a face to improve Gi continuity with
-- connected faces
---Level: Advanced
uses
Shape from TopoDS,
Edge from TopoDS,
Face from TopoDS,
Pnt from gp,
Shape from GeomAbs,
BuildPlateSurface from GeomPlate,
SequenceOfEdgeFaceAndOrder from BRepFill,
SequenceOfFaceAndOrder from BRepFill,
SequenceOfPointConstraint from GeomPlate,
SequenceOfShape from TopTools,
ListOfShape from TopTools,
DataMapOfShapeListOfShape from TopTools,
SequenceOfPnt from TColgp
raises
NotDone,
OutOfRange,
ConstructionError
is
Create( Degree : Integer from Standard = 3;
NbPtsOnCur : Integer from Standard = 15;
NbIter : Integer from Standard = 2;
Anisotropie : Boolean from Standard = Standard_False;
Tol2d : Real from Standard = 0.00001;
Tol3d : Real from Standard = 0.0001;
TolAng : Real from Standard = 0.01;
TolCurv : Real from Standard = 0.1;
MaxDeg : Integer from Standard = 8;
MaxSegments : Integer from Standard = 9 )
---Purpose: Constructor
--
returns Filling from BRepFill;
SetConstrParam( me : in out; Tol2d : Real from Standard = 0.00001;
Tol3d : Real from Standard = 0.0001;
TolAng : Real from Standard = 0.01;
TolCurv : Real from Standard = 0.1 );
---Purpose: Sets the values of Tolerances used to control the constraint.
-- Tol2d:
-- Tol3d: it is the maximum distance allowed between the support surface
-- and the constraints
-- TolAng: it is the maximum angle allowed between the normal of the surface
-- and the constraints
-- TolCurv: it is the maximum difference of curvature allowed between
-- the surface and the constraint
SetResolParam( me : in out; Degree : Integer from Standard = 3;
NbPtsOnCur : Integer from Standard = 15;
NbIter : Integer from Standard = 2;
Anisotropie : Boolean from Standard = Standard_False );
---Purpose: Sets the parameters used for resolution.
-- The default values of these parameters have been chosen for a good
-- ratio quality/performance.
-- Degree: it is the order of energy criterion to minimize for computing
-- the deformation of the surface.
-- The default value is 3
-- The recommanded value is i+2 where i is the maximum order of the
-- constraints.
-- NbPtsOnCur: it is the average number of points for discretisation
-- of the edges.
-- NbIter: it is the maximum number of iterations of the process.
-- For each iteration the number of discretisation points is
-- increased.
-- Anisotropie:
SetApproxParam( me : in out; MaxDeg : Integer from Standard = 8;
MaxSegments : Integer from Standard = 9 );
---Purpose: Sets the parameters used for approximation of the surface
--
LoadInitSurface( me : in out; aFace : Face from TopoDS );
---Purpose: Loads the initial Surface
-- The initial surface must have orthogonal local coordinates,
-- i.e. partial derivatives dS/du and dS/dv must be orthogonal
-- at each point of surface.
-- If this condition breaks, distortions of resulting surface
-- are possible.
Add( me : in out; anEdge : Edge from TopoDS;
Order : Shape from GeomAbs;
IsBound : Boolean from Standard = Standard_True )
returns Integer from Standard
---Purpose: Adds a new constraint which also defines an edge of the wire
-- of the face
-- Order: Order of the constraint:
-- GeomAbs_C0 : the surface has to pass by 3D representation
-- of the edge
-- GeomAbs_G1 : the surface has to pass by 3D representation
-- of the edge and to respect tangency with the first
-- face of the edge
-- GeomAbs_G2 : the surface has to pass by 3D representation
-- of the edge and to respect tangency and curvature
-- with the first face of the edge.
raises ConstructionError from Standard;
-- if the edge has no representation on a face and Order is
-- GeomAbs_G1 or GeomAbs_G2.
Add( me : in out; anEdge : Edge from TopoDS;
Support : Face from TopoDS;
Order : Shape from GeomAbs;
IsBound : Boolean from Standard = Standard_True )
returns Integer from Standard
---Purpose: Adds a new constraint which also defines an edge of the wire
-- of the face
-- Order: Order of the constraint:
-- GeomAbs_C0 : the surface has to pass by 3D representation
-- of the edge
-- GeomAbs_G1 : the surface has to pass by 3D representation
-- of the edge and to respect tangency with the
-- given face
-- GeomAbs_G2 : the surface has to pass by 3D representation
-- of the edge and to respect tangency and curvature
-- with the given face.
raises ConstructionError from Standard;
-- if the edge has no 2d representation on the given face
Add( me : in out; Support : Face from TopoDS;
Order : Shape from GeomAbs )
returns Integer from Standard;
---Purpose: Adds a free constraint on a face. The corresponding edge has to
-- be automatically recomputed.
-- It is always a bound.
Add( me : in out; Point : Pnt from gp )
returns Integer from Standard;
---Purpose: Adds a punctual constraint
Add( me : in out; U, V : Real from Standard;
Support : Face from TopoDS;
Order : Shape from GeomAbs )
returns Integer from Standard;
---Purpose: Adds a punctual constraint.
AddConstraints( me : in out; SeqOfConstraints : SequenceOfEdgeFaceAndOrder from BRepFill )
---Purpose: Adds constraints to builder
is private;
BuildWires( me : in out; EdgeList : in out ListOfShape from TopTools;
WireList : out ListOfShape from TopTools )
---Purpose: Builds wires of maximum length
is private;
FindExtremitiesOfHoles( me; WireList : ListOfShape from TopTools;
VerSeq : out SequenceOfShape from TopTools )
---Purpose: Finds extremities of future edges to fix the holes between wires.
-- Can properly operate only with convex contour
is private;
Build( me : in out );
---Purpose: Builds the resulting faces
IsDone(me) returns Boolean from Standard;
Face(me) returns Face from TopoDS;
-- returns the resulting face
Generated (me: in out; S : Shape from TopoDS)
---Purpose: Returns the list of shapes generated from the
-- shape <S>.
---C++: return const &
---Level: Public
returns ListOfShape from TopTools;
G0Error(me) returns Real from Standard;
-- returns the max distance between the result and the constraints
G1Error(me) returns Real from Standard;
-- returns the max angle between the result and the constraints
G2Error(me) returns Real from Standard;
-- returns the max difference of curvature between the result and the constraints
G0Error( me : in out; Index : Integer from Standard ) returns Real from Standard;
-- returns the max distance between the result and the constraint Index
G1Error( me : in out; Index : Integer from Standard ) returns Real from Standard;
-- returns the max angle between the result and the constraint Index
G2Error( me : in out; Index : Integer from Standard ) returns Real from Standard;
-- returns the max difference of curvature between the result and the constraint Index
fields
myBuilder : BuildPlateSurface from GeomPlate;
myBoundary : SequenceOfEdgeFaceAndOrder from BRepFill;
myConstraints : SequenceOfEdgeFaceAndOrder from BRepFill;
myFreeConstraints : SequenceOfFaceAndOrder from BRepFill;
myPoints : SequenceOfPointConstraint from GeomPlate;
myOldNewMap : DataMapOfShapeListOfShape from TopTools;
myGenerated : ListOfShape from TopTools;
myFace : Face from TopoDS;
myInitFace : Face from TopoDS;
-- Tolerances
myTol2d : Real from Standard;
myTol3d : Real from Standard;
myTolAng : Real from Standard;
myTolCurv : Real from Standard;
-- Parameters of approximation
myMaxDeg : Integer from Standard;
myMaxSegments : Integer from Standard;
-- Parameters of resolution
myDegree : Integer from Standard;
myNbPtsOnCur : Integer from Standard;
myNbIter : Integer from Standard;
myAnisotropie : Boolean from Standard;
myIsInitFaceGiven : Boolean from Standard;
myIsDone : Boolean from Standard;
end Filling;

View File

@@ -14,57 +14,58 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BRepFill_Filling.ixx>
#include <BRepFill_EdgeFaceAndOrder.hxx>
#include <BRepFill_FaceAndOrder.hxx>
#include <BRepAdaptor_HSurface.hxx>
#include <BRepAdaptor_HCurve.hxx>
#include <BRepAdaptor_HCurve2d.hxx>
#include <BRepFill_CurveConstraint.hxx>
#include <Geom2dAdaptor_HCurve.hxx>
#include <GeomAdaptor_HSurface.hxx>
#include <Adaptor3d_CurveOnSurface.hxx>
#include <Adaptor3d_HCurveOnSurface.hxx>
#include <GeomPlate_MakeApprox.hxx>
#include <GeomPlate_CurveConstraint.hxx>
#include <GeomPlate_PointConstraint.hxx>
#include <BRepLib_MakeEdge.hxx>
#include <BRepLib_MakeEdge2d.hxx>
#include <BRepLib_MakeWire.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Wire.hxx>
#include <BRepLib_MakeFace.hxx>
#include <TColStd_HArray1OfReal.hxx>
#include <BRep_Builder.hxx>
#include <BRep_CurveRepresentation.hxx>
#include <BRep_ListIteratorOfListOfCurveRepresentation.hxx>
#include <BRep_TEdge.hxx>
#include <BRep_CurveRepresentation.hxx>
#include <TopExp.hxx>
#include <BRep_Tool.hxx>
#include <GeomAPI_ProjectPointOnSurf.hxx>
#include <TopoDS_Vertex.hxx>
#include <Precision.hxx>
#include <GeomProjLib.hxx>
#include <BRepTools.hxx>
#include <BRep_Builder.hxx>
#include <BRep_TVertex.hxx>
#include <BRepAdaptor_HCurve.hxx>
#include <BRepAdaptor_HCurve2d.hxx>
#include <BRepAdaptor_HSurface.hxx>
#include <BRepFill_CurveConstraint.hxx>
#include <BRepFill_EdgeFaceAndOrder.hxx>
#include <BRepFill_FaceAndOrder.hxx>
#include <BRepFill_Filling.hxx>
#include <BRepLib.hxx>
#include <TColgp_SequenceOfPnt.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <BRepLib_MakeEdge.hxx>
#include <BRepLib_MakeEdge2d.hxx>
#include <BRepLib_MakeFace.hxx>
#include <BRepLib_MakeWire.hxx>
#include <BRepTools.hxx>
#include <BRepTools_WireExplorer.hxx>
#include <TColgp_Array1OfPnt2d.hxx>
#include <TColGeom2d_HArray1OfCurve.hxx>
#include <Geom2d_BezierCurve.hxx>
#include <Geom2d_TrimmedCurve.hxx>
#include <Geom2dAdaptor_HCurve.hxx>
#include <Geom_BSplineSurface.hxx>
#include <TColgp_SequenceOfXY.hxx>
#include <GeomAdaptor_HSurface.hxx>
#include <GeomAPI_ProjectPointOnSurf.hxx>
#include <GeomPlate_CurveConstraint.hxx>
#include <GeomPlate_MakeApprox.hxx>
#include <GeomPlate_PlateG0Criterion.hxx>
#include <BRep_TVertex.hxx>
#include <GeomPlate_PointConstraint.hxx>
#include <GeomProjLib.hxx>
#include <gp_Pnt.hxx>
#include <Precision.hxx>
#include <Standard_ConstructionError.hxx>
#include <Standard_OutOfRange.hxx>
#include <StdFail_NotDone.hxx>
#include <TColGeom2d_HArray1OfCurve.hxx>
#include <TColgp_Array1OfPnt2d.hxx>
#include <TColgp_SequenceOfPnt.hxx>
#include <TColgp_SequenceOfXY.hxx>
#include <TColStd_HArray1OfReal.hxx>
#include <TopExp.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Wire.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
static gp_Vec MakeFinVec( const TopoDS_Wire aWire, const TopoDS_Vertex aVertex )
{

View File

@@ -0,0 +1,236 @@
// Created on: 1998-08-26
// Created by: Julia GERASIMOVA
// 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 _BRepFill_Filling_HeaderFile
#define _BRepFill_Filling_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <GeomPlate_BuildPlateSurface.hxx>
#include <BRepFill_SequenceOfEdgeFaceAndOrder.hxx>
#include <BRepFill_SequenceOfFaceAndOrder.hxx>
#include <GeomPlate_SequenceOfPointConstraint.hxx>
#include <TopTools_DataMapOfShapeListOfShape.hxx>
#include <TopTools_ListOfShape.hxx>
#include <TopoDS_Face.hxx>
#include <Standard_Real.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Boolean.hxx>
#include <GeomAbs_Shape.hxx>
#include <TopTools_SequenceOfShape.hxx>
class StdFail_NotDone;
class Standard_OutOfRange;
class Standard_ConstructionError;
class TopoDS_Face;
class TopoDS_Edge;
class gp_Pnt;
class TopoDS_Shape;
//! N-Side Filling
//! This algorithm avoids to build a face from:
//! * a set of edges defining the bounds of the face and some
//! constraints the surface support has to satisfy
//! * a set of edges and points defining some constraints
//! the support surface has to satisfy
//! * an initial surface to deform for satisfying the constraints
//! * a set of parameters to control the constraints.
//!
//! The support surface of the face is computed by deformation
//! of the initial surface in order to satisfy the given constraints.
//! The set of bounding edges defines the wire of the face.
//!
//! If no initial surface is given, the algorithm computes it
//! automatically.
//! If the set of edges is not connected (Free constraint)
//! missing edges are automatically computed.
//!
//! Limitations:
//! * If some constraints are not compatible
//! The algorithm does not take them into account.
//! So the constraints will not be satisfyed in an area containing
//! the incompatibilitries.
//! * The constraints defining the bound of the face have to be
//! entered in order to have a continuous wire.
//!
//! Other Applications:
//! * Deformation of a face to satisfy internal constraints
//! * Deformation of a face to improve Gi continuity with
//! connected faces
class BRepFill_Filling
{
public:
DEFINE_STANDARD_ALLOC
//! Constructor
Standard_EXPORT BRepFill_Filling(const Standard_Integer Degree = 3, const Standard_Integer NbPtsOnCur = 15, const Standard_Integer NbIter = 2, const Standard_Boolean Anisotropie = Standard_False, const Standard_Real Tol2d = 0.00001, const Standard_Real Tol3d = 0.0001, const Standard_Real TolAng = 0.01, const Standard_Real TolCurv = 0.1, const Standard_Integer MaxDeg = 8, const Standard_Integer MaxSegments = 9);
//! Sets the values of Tolerances used to control the constraint.
//! Tol2d:
//! Tol3d: it is the maximum distance allowed between the support surface
//! and the constraints
//! TolAng: it is the maximum angle allowed between the normal of the surface
//! and the constraints
//! TolCurv: it is the maximum difference of curvature allowed between
//! the surface and the constraint
Standard_EXPORT void SetConstrParam (const Standard_Real Tol2d = 0.00001, const Standard_Real Tol3d = 0.0001, const Standard_Real TolAng = 0.01, const Standard_Real TolCurv = 0.1);
//! Sets the parameters used for resolution.
//! The default values of these parameters have been chosen for a good
//! ratio quality/performance.
//! Degree: it is the order of energy criterion to minimize for computing
//! the deformation of the surface.
//! The default value is 3
//! The recommanded value is i+2 where i is the maximum order of the
//! constraints.
//! NbPtsOnCur: it is the average number of points for discretisation
//! of the edges.
//! NbIter: it is the maximum number of iterations of the process.
//! For each iteration the number of discretisation points is
//! increased.
//! Anisotropie:
Standard_EXPORT void SetResolParam (const Standard_Integer Degree = 3, const Standard_Integer NbPtsOnCur = 15, const Standard_Integer NbIter = 2, const Standard_Boolean Anisotropie = Standard_False);
//! Sets the parameters used for approximation of the surface
Standard_EXPORT void SetApproxParam (const Standard_Integer MaxDeg = 8, const Standard_Integer MaxSegments = 9);
//! Loads the initial Surface
//! The initial surface must have orthogonal local coordinates,
//! i.e. partial derivatives dS/du and dS/dv must be orthogonal
//! at each point of surface.
//! If this condition breaks, distortions of resulting surface
//! are possible.
Standard_EXPORT void LoadInitSurface (const TopoDS_Face& aFace);
//! Adds a new constraint which also defines an edge of the wire
//! of the face
//! Order: Order of the constraint:
//! GeomAbs_C0 : the surface has to pass by 3D representation
//! of the edge
//! GeomAbs_G1 : the surface has to pass by 3D representation
//! of the edge and to respect tangency with the first
//! face of the edge
//! GeomAbs_G2 : the surface has to pass by 3D representation
//! of the edge and to respect tangency and curvature
//! with the first face of the edge.
Standard_EXPORT Standard_Integer Add (const TopoDS_Edge& anEdge, const GeomAbs_Shape Order, const Standard_Boolean IsBound = Standard_True);
//! Adds a new constraint which also defines an edge of the wire
//! of the face
//! Order: Order of the constraint:
//! GeomAbs_C0 : the surface has to pass by 3D representation
//! of the edge
//! GeomAbs_G1 : the surface has to pass by 3D representation
//! of the edge and to respect tangency with the
//! given face
//! GeomAbs_G2 : the surface has to pass by 3D representation
//! of the edge and to respect tangency and curvature
//! with the given face.
Standard_EXPORT Standard_Integer Add (const TopoDS_Edge& anEdge, const TopoDS_Face& Support, const GeomAbs_Shape Order, const Standard_Boolean IsBound = Standard_True);
//! Adds a free constraint on a face. The corresponding edge has to
//! be automatically recomputed.
//! It is always a bound.
Standard_EXPORT Standard_Integer Add (const TopoDS_Face& Support, const GeomAbs_Shape Order);
//! Adds a punctual constraint
Standard_EXPORT Standard_Integer Add (const gp_Pnt& Point);
//! Adds a punctual constraint.
Standard_EXPORT Standard_Integer Add (const Standard_Real U, const Standard_Real V, const TopoDS_Face& Support, const GeomAbs_Shape Order);
//! Builds the resulting faces
Standard_EXPORT void Build();
Standard_EXPORT Standard_Boolean IsDone() const;
Standard_EXPORT TopoDS_Face Face() const;
//! Returns the list of shapes generated from the
//! shape <S>.
Standard_EXPORT const TopTools_ListOfShape& Generated (const TopoDS_Shape& S);
Standard_EXPORT Standard_Real G0Error() const;
Standard_EXPORT Standard_Real G1Error() const;
Standard_EXPORT Standard_Real G2Error() const;
Standard_EXPORT Standard_Real G0Error (const Standard_Integer Index);
Standard_EXPORT Standard_Real G1Error (const Standard_Integer Index);
Standard_EXPORT Standard_Real G2Error (const Standard_Integer Index);
protected:
private:
//! Adds constraints to builder
Standard_EXPORT void AddConstraints (const BRepFill_SequenceOfEdgeFaceAndOrder& SeqOfConstraints);
//! Builds wires of maximum length
Standard_EXPORT void BuildWires (TopTools_ListOfShape& EdgeList, TopTools_ListOfShape& WireList);
//! Finds extremities of future edges to fix the holes between wires.
//! Can properly operate only with convex contour
Standard_EXPORT void FindExtremitiesOfHoles (const TopTools_ListOfShape& WireList, TopTools_SequenceOfShape& VerSeq) const;
GeomPlate_BuildPlateSurface myBuilder;
BRepFill_SequenceOfEdgeFaceAndOrder myBoundary;
BRepFill_SequenceOfEdgeFaceAndOrder myConstraints;
BRepFill_SequenceOfFaceAndOrder myFreeConstraints;
GeomPlate_SequenceOfPointConstraint myPoints;
TopTools_DataMapOfShapeListOfShape myOldNewMap;
TopTools_ListOfShape myGenerated;
TopoDS_Face myFace;
TopoDS_Face myInitFace;
Standard_Real myTol2d;
Standard_Real myTol3d;
Standard_Real myTolAng;
Standard_Real myTolCurv;
Standard_Integer myMaxDeg;
Standard_Integer myMaxSegments;
Standard_Integer myDegree;
Standard_Integer myNbPtsOnCur;
Standard_Integer myNbIter;
Standard_Boolean myAnisotropie;
Standard_Boolean myIsInitFaceGiven;
Standard_Boolean myIsDone;
};
#endif // _BRepFill_Filling_HeaderFile

View File

@@ -1,87 +0,0 @@
-- Created on: 1994-03-07
-- Created by: Joelle CHAUVET
-- Copyright (c) 1994-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.
-- Modified: Thu Jul 2 16:47:35 1998
-- add methods Generated and GeneratedShapes
class Generator from BRepFill
---Purpose: Compute a topological surface ( a shell) using
-- generating wires. The face of the shell will be
-- ruled surfaces passing by the wires.
-- The wires must have the same number of edges.
uses
Wire from TopoDS,
Shell from TopoDS,
Shape from TopoDS,
SequenceOfShape from TopTools,
ListOfShape from TopTools,
DataMapOfShapeListOfShape from TopTools
is
Create returns Generator from BRepFill;
AddWire( me : in out;
Wire : in Wire from TopoDS)
is static;
Perform( me : in out)
---Purpose: Compute the shell.
is static;
Shell(me)
---C++: return const&
---C++: inline
returns Shell from TopoDS
is static;
Generated (me )
---Purpose: Returns all the shapes created
---C++ : return const &
returns DataMapOfShapeListOfShape from TopTools
is static;
GeneratedShapes (me ;
SSection : Shape from TopoDS)
---Purpose: Returns the shapes created from a subshape
-- <SSection> of a section.
--
---C++ : return const &
returns ListOfShape from TopTools
is static;
fields
myWires : SequenceOfShape from TopTools;
myShell : Shell from TopoDS;
myMap : DataMapOfShapeListOfShape from TopTools;
end Generator;

View File

@@ -14,61 +14,58 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BRepFill_Generator.ixx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Wire.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Vertex.hxx>
#include <BRep_Builder.hxx>
#include <TopLoc_Location.hxx>
#include <TopExp_Explorer.hxx>
#include <gp_Pnt2d.hxx>
#include <gp_Dir2d.hxx>
#include <BRep_Tool.hxx>
#include <BRepFill_Generator.hxx>
#include <BRepLib.hxx>
#include <BRepTools.hxx>
#include <BRepTools_WireExplorer.hxx>
#include <Geom2d_BezierCurve.hxx>
#include <Geom2d_Line.hxx>
#include <Geom_BezierCurve.hxx>
#include <Geom_BSplineCurve.hxx>
#include <Geom_Circle.hxx>
#include <Geom_ConicalSurface.hxx>
#include <Geom_Curve.hxx>
#include <Geom_CylindricalSurface.hxx>
#include <Geom_Line.hxx>
#include <Geom_Plane.hxx>
#include <Geom_RectangularTrimmedSurface.hxx>
#include <Geom_Surface.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <GeomAbs_Shape.hxx>
#include <GeomAdaptor_Curve.hxx>
#include <GeomConvert.hxx>
#include <GeomFill.hxx>
#include <GeomFill_Generator.hxx>
#include <gp_Ax1.hxx>
#include <gp_Ax3.hxx>
#include <gp_Circ.hxx>
#include <gp_Dir2d.hxx>
#include <gp_Lin.hxx>
#include <GeomAbs_Shape.hxx>
#include <GeomAdaptor_Curve.hxx>
#include <Geom_Circle.hxx>
#include <Geom_Line.hxx>
#include <Geom_Curve.hxx>
#include <Geom_BezierCurve.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <Geom_Surface.hxx>
#include <Geom_Plane.hxx>
#include <Geom_CylindricalSurface.hxx>
#include <Geom_ConicalSurface.hxx>
#include <Geom_RectangularTrimmedSurface.hxx>
#include <Geom2d_Line.hxx>
#include <Geom2d_BezierCurve.hxx>
#include <GeomFill_Generator.hxx>
#include <TopTools_DataMapOfShapeShape.hxx>
#include <GeomFill.hxx>
#include <BRep_Tool.hxx>
#include <TopoDS.hxx>
#include <TopExp.hxx>
#include <Precision.hxx>
#include <BRepLib.hxx>
#include <TColgp_Array1OfPnt.hxx>
#include <TColgp_Array1OfPnt2d.hxx>
#include <Geom_BSplineCurve.hxx>
#include <gp_Pnt2d.hxx>
#include <gp_Vec.hxx>
#include <GeomConvert.hxx>
#include <BRepTools_WireExplorer.hxx>
#include <BRepTools.hxx>
#include <Precision.hxx>
#include <Standard_NullObject.hxx>
#include <TColgp_Array1OfPnt.hxx>
#include <TColgp_Array1OfPnt2d.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_Shape.hxx>
#include <TopoDS_Shell.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Wire.hxx>
#include <TopTools_DataMapOfShapeShape.hxx>
//=======================================================================
//function : DetectKPart
//purpose :
//=======================================================================
Standard_Integer DetectKPart(const TopoDS_Edge& Edge1,
const TopoDS_Edge& Edge2)
{

View File

@@ -0,0 +1,87 @@
// Created on: 1994-03-07
// Created by: Joelle CHAUVET
// Copyright (c) 1994-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 _BRepFill_Generator_HeaderFile
#define _BRepFill_Generator_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <TopTools_SequenceOfShape.hxx>
#include <TopoDS_Shell.hxx>
#include <TopTools_DataMapOfShapeListOfShape.hxx>
#include <TopTools_ListOfShape.hxx>
class TopoDS_Wire;
class TopoDS_Shell;
class TopoDS_Shape;
//! Compute a topological surface ( a shell) using
//! generating wires. The face of the shell will be
//! ruled surfaces passing by the wires.
//! The wires must have the same number of edges.
class BRepFill_Generator
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT BRepFill_Generator();
Standard_EXPORT void AddWire (const TopoDS_Wire& Wire);
//! Compute the shell.
Standard_EXPORT void Perform();
const TopoDS_Shell& Shell() const;
//! Returns all the shapes created
Standard_EXPORT const TopTools_DataMapOfShapeListOfShape& Generated() const;
//! Returns the shapes created from a subshape
//! <SSection> of a section.
Standard_EXPORT const TopTools_ListOfShape& GeneratedShapes (const TopoDS_Shape& SSection) const;
protected:
private:
TopTools_SequenceOfShape myWires;
TopoDS_Shell myShell;
TopTools_DataMapOfShapeListOfShape myMap;
};
#include <BRepFill_Generator.lxx>
#endif // _BRepFill_Generator_HeaderFile

View File

@@ -1,173 +0,0 @@
-- Created on: 1998-01-14
-- Created by: Philippe MANGIN
-- 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.
deferred class LocationLaw from BRepFill inherits TShared from MMgt
---Purpose: Location Law on a Wire.
---Level: Advanced
uses
LocationLaw from GeomFill,
HArray1OfLocationLaw from GeomFill,
PipeError from GeomFill,
HArray1OfReal from TColStd,
Array1OfInteger from TColStd,
HArray1OfInteger from TColStd,
HArray1OfShape from TopTools,
Shape from TopoDS,
Wire from TopoDS,
Edge from TopoDS,
Vertex from TopoDS
raises
OutOfRange from Standard
is
Init (me : mutable; Path : Wire from TopoDS)
---Purpose: Initialize all the fields, this methode have to
-- be called by the constructors of Inherited class.
is protected;
GetStatus(me)
---Purpose: Return a error status, if the status is not PipeOk then
-- it exist a parameter tlike the law is not valuable for t.
returns PipeError from GeomFill;
TransformInG0Law(me : mutable)
---Purpose: Apply a linear transformation on each law, to have
-- continuity of the global law beetween the edges.
is virtual;
TransformInCompatibleLaw(me : mutable;
AngularTolerance : Real)
---Purpose: Apply a linear transformation on each law, to reduce
-- the dicontinuities of law at one rotation.
is virtual;
TangentIsMain(me : mutable)
---Purpose: To preseve if possible the Tangent in transformations
-- It is the default mode.
is protected;
NormalIsMain(me : mutable)
---Purpose: To preseve if possible the Normal in transformations
is protected;
BiNormalIsMain(me : mutable)
---Purpose: To preseve if possible the BiNormal in transformations
is protected;
DeleteTransform(me : mutable)
is static;
NbHoles(me: mutable; Tol : Real = 1.0e-7)
returns Integer;
Holes(me; Interval : out Array1OfInteger from TColStd);
NbLaw(me)
---Purpose: Return the number of elementary Law
returns Integer;
Law(me; Index : Integer)
---Purpose: Return the elementary Law of rank <Index>
-- <Index> have to be in [1, NbLaw()]
---C++: return const &
returns LocationLaw from GeomFill
raises OutOfRange;
Wire(me)
---Purpose: return the path
---C++: return const &
returns Wire from TopoDS;
Edge(me; Index : Integer)
---Purpose: Return the Edge of rank <Index> in the path
-- <Index> have to be in [1, NbLaw()]
---C++: return const &
returns Edge from TopoDS
raises OutOfRange;
Vertex(me; Index : Integer)
---Purpose: Return the vertex of rank <Index> in the path
-- <Index> have to be in [0, NbLaw()]
returns Vertex from TopoDS
raises OutOfRange;
PerformVertex(me; Index : Integer;
InputVertex : Vertex from TopoDS;
TolMin : Real;
OutputVertex : out Vertex;
Location : Integer = 0)
---Purpose: Compute <OutputVertex> like a transformation of
-- <InputVertex> the transformation is given by
-- evaluation of the location law in the vertex of
-- rank <Index>.
-- <Location> is used to manage discontinuities :
-- - -1 : The law before the vertex is used.
-- - 1 : The law after the vertex is used.
-- - 0 : Average of the both laws is used.
is static;
CurvilinearBounds(me; Index : Integer;
First, Last :out Real);
---Purpose:Return the Curvilinear Bounds of the <Index> Law
IsClosed(me) returns Boolean;
IsG1(me; Index : Integer;
SpatialTolerance : Real = 1.0e-7;
AngularTolerance : Real = 1.0e-4)
---Purpose: Compute the Law's continuity beetween 2 edges of the path
-- The result can be :
-- -1 : Case Not connex
-- 0 : It is connex (G0)
-- 1 : It is tangent (G1)
returns Integer;
D0(me:mutable; Abscissa :Real;
Section : in out Shape from TopoDS);
---Purpose: Apply the Law to a shape, for a given Curnilinear abscissa
Parameter(me:mutable; Abscissa :Real;
Index : out Integer;
Param : out Real);
---Purpose: Find the index Law and the parmaeter, for a given
-- Curnilinear abscissa
Abscissa(me:mutable; Index : Integer;
Param : Real)
---Purpose:Return the curvilinear abscissa corresponding to a point
-- of the path, defined by <Index> of Edge and a
-- parameter on the edge.
returns Real;
fields
myPath : Wire from TopoDS is protected;
myTol : Real is protected;
myLaws : HArray1OfLocationLaw from GeomFill is protected;
myLength : HArray1OfReal from TColStd is protected;
myEdges : HArray1OfShape from TopTools is protected;
myDisc : HArray1OfInteger from TColStd is protected;
myType : Integer;
end LocationLaw;

View File

@@ -15,36 +15,37 @@
// commercial license or contractual agreement.
#include <BRepFill_LocationLaw.ixx>
#include <BRepTools_WireExplorer.hxx>
#include <BRep_Tool.hxx>
#include <BRep_Builder.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <Adaptor3d_HCurve.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#include <TopExp.hxx>
#include <TopLoc_Location.hxx>
#include <GeomFill_LocationLaw.hxx>
#include <gp_Vec.hxx>
#include <gp_Mat.hxx>
#include <gp_XYZ.hxx>
#include <gp_Trsf.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <BRepBuilderAPI_Transform.hxx>
#include <BRepFill_LocationLaw.hxx>
#include <BRepTools_WireExplorer.hxx>
#include <GCPnts_AbscissaPoint.hxx>
#include <GeomFill_LocationLaw.hxx>
#include <gp_Mat.hxx>
#include <gp_Trsf.hxx>
#include <gp_Vec.hxx>
#include <gp_XYZ.hxx>
#include <Precision.hxx>
#include <Standard_OutOfRange.hxx>
#include <Standard_Type.hxx>
#include <TColgp_Array1OfPnt2d.hxx>
#include <TColgp_Array1OfVec2d.hxx>
#include <TColStd_SequenceOfInteger.hxx>
#include <Precision.hxx>
#include <BRepBuilderAPI_Transform.hxx>
#include <TopExp.hxx>
#include <TopLoc_Location.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Wire.hxx>
//=======================================================================
//function : Norm
//purpose : Norm of a Matrix
//=======================================================================
static Standard_Real Norm(const gp_Mat& M) {
Standard_Real R, Norme;
gp_XYZ Coord;

View File

@@ -0,0 +1,166 @@
// Created on: 1998-01-14
// Created by: Philippe MANGIN
// 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 _BRepFill_LocationLaw_HeaderFile
#define _BRepFill_LocationLaw_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <TopoDS_Wire.hxx>
#include <Standard_Real.hxx>
#include <GeomFill_HArray1OfLocationLaw.hxx>
#include <TColStd_HArray1OfReal.hxx>
#include <TopTools_HArray1OfShape.hxx>
#include <TColStd_HArray1OfInteger.hxx>
#include <Standard_Integer.hxx>
#include <MMgt_TShared.hxx>
#include <GeomFill_PipeError.hxx>
#include <TColStd_Array1OfInteger.hxx>
#include <Standard_Boolean.hxx>
class Standard_OutOfRange;
class TopoDS_Wire;
class GeomFill_LocationLaw;
class TopoDS_Edge;
class TopoDS_Vertex;
class TopoDS_Shape;
class BRepFill_LocationLaw;
DEFINE_STANDARD_HANDLE(BRepFill_LocationLaw, MMgt_TShared)
//! Location Law on a Wire.
class BRepFill_LocationLaw : public MMgt_TShared
{
public:
//! Return a error status, if the status is not PipeOk then
//! it exist a parameter tlike the law is not valuable for t.
Standard_EXPORT GeomFill_PipeError GetStatus() const;
//! Apply a linear transformation on each law, to have
//! continuity of the global law beetween the edges.
Standard_EXPORT virtual void TransformInG0Law();
//! Apply a linear transformation on each law, to reduce
//! the dicontinuities of law at one rotation.
Standard_EXPORT virtual void TransformInCompatibleLaw (const Standard_Real AngularTolerance);
Standard_EXPORT void DeleteTransform();
Standard_EXPORT Standard_Integer NbHoles (const Standard_Real Tol = 1.0e-7);
Standard_EXPORT void Holes (TColStd_Array1OfInteger& Interval) const;
//! Return the number of elementary Law
Standard_EXPORT Standard_Integer NbLaw() const;
//! Return the elementary Law of rank <Index>
//! <Index> have to be in [1, NbLaw()]
Standard_EXPORT const Handle(GeomFill_LocationLaw)& Law (const Standard_Integer Index) const;
//! return the path
Standard_EXPORT const TopoDS_Wire& Wire() const;
//! Return the Edge of rank <Index> in the path
//! <Index> have to be in [1, NbLaw()]
Standard_EXPORT const TopoDS_Edge& Edge (const Standard_Integer Index) const;
//! Return the vertex of rank <Index> in the path
//! <Index> have to be in [0, NbLaw()]
Standard_EXPORT TopoDS_Vertex Vertex (const Standard_Integer Index) const;
//! Compute <OutputVertex> like a transformation of
//! <InputVertex> the transformation is given by
//! evaluation of the location law in the vertex of
//! rank <Index>.
//! <Location> is used to manage discontinuities :
//! - -1 : The law before the vertex is used.
//! - 1 : The law after the vertex is used.
//! - 0 : Average of the both laws is used.
Standard_EXPORT void PerformVertex (const Standard_Integer Index, const TopoDS_Vertex& InputVertex, const Standard_Real TolMin, TopoDS_Vertex& OutputVertex, const Standard_Integer Location = 0) const;
//! Return the Curvilinear Bounds of the <Index> Law
Standard_EXPORT void CurvilinearBounds (const Standard_Integer Index, Standard_Real& First, Standard_Real& Last) const;
Standard_EXPORT Standard_Boolean IsClosed() const;
//! Compute the Law's continuity beetween 2 edges of the path
//! The result can be :
//! -1 : Case Not connex
//! 0 : It is connex (G0)
//! 1 : It is tangent (G1)
Standard_EXPORT Standard_Integer IsG1 (const Standard_Integer Index, const Standard_Real SpatialTolerance = 1.0e-7, const Standard_Real AngularTolerance = 1.0e-4) const;
//! Apply the Law to a shape, for a given Curnilinear abscissa
Standard_EXPORT void D0 (const Standard_Real Abscissa, TopoDS_Shape& Section);
//! Find the index Law and the parmaeter, for a given
//! Curnilinear abscissa
Standard_EXPORT void Parameter (const Standard_Real Abscissa, Standard_Integer& Index, Standard_Real& Param);
//! Return the curvilinear abscissa corresponding to a point
//! of the path, defined by <Index> of Edge and a
//! parameter on the edge.
Standard_EXPORT Standard_Real Abscissa (const Standard_Integer Index, const Standard_Real Param);
DEFINE_STANDARD_RTTI(BRepFill_LocationLaw,MMgt_TShared)
protected:
//! Initialize all the fields, this methode have to
//! be called by the constructors of Inherited class.
Standard_EXPORT void Init (const TopoDS_Wire& Path);
//! To preseve if possible the Tangent in transformations
//! It is the default mode.
Standard_EXPORT void TangentIsMain();
//! To preseve if possible the Normal in transformations
Standard_EXPORT void NormalIsMain();
//! To preseve if possible the BiNormal in transformations
Standard_EXPORT void BiNormalIsMain();
TopoDS_Wire myPath;
Standard_Real myTol;
Handle(GeomFill_HArray1OfLocationLaw) myLaws;
Handle(TColStd_HArray1OfReal) myLength;
Handle(TopTools_HArray1OfShape) myEdges;
Handle(TColStd_HArray1OfInteger) myDisc;
private:
Standard_Integer myType;
};
#endif // _BRepFill_LocationLaw_HeaderFile

View File

@@ -1,97 +0,0 @@
-- Created on: 1998-12-29
-- Created by: Joelle CHAUVET
-- 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 NSections from BRepFill inherits SectionLaw from BRepFill
---Purpose: Build Section Law, with N Sections
--
---Level: Advanced
uses
SectionLaw from GeomFill,
HArray1OfSectionLaw from GeomFill,
SequenceOfTrsf from GeomFill,
BSplineSurface from Geom,
HArray2OfShape from TopTools,
SequenceOfReal from TColStd,
SequenceOfShape from TopTools,
Shape from GeomAbs,
Vertex from TopoDS,
Wire from TopoDS,
Edge from TopoDS,
Shape from TopoDS,
Function from Law
is
Create (S:SequenceOfShape from TopTools;
Build : Boolean = Standard_True)
---Purpose: Construct
returns NSections from BRepFill;
Create (S : SequenceOfShape from TopTools;
Trsfs : SequenceOfTrsf from GeomFill;
P : SequenceOfReal from TColStd;
VF,VL : Real;
Build : Boolean = Standard_True)
---Purpose: Construct
returns NSections from BRepFill;
IsVertex(me)
---Purpose: Say if the input shape is a vertex.
returns Boolean
is redefined;
IsConstant(me)
---Purpose: Say if the Law is Constant.
returns Boolean
is redefined;
ConcatenedLaw(me)
---Purpose: Give the law build on a concatened section
returns SectionLaw from GeomFill
is redefined;
Continuity(me; Index : Integer;
TolAngular : Real)
returns Shape from GeomAbs
is redefined;
VertexTol(me; Index : Integer;
Param : Real)
returns Real
is redefined;
Vertex(me; Index : Integer;
Param : Real)
returns Vertex from TopoDS
is redefined;
D0(me:mutable; Param : Real;
S : out Shape from TopoDS)
is redefined;
Init(me : mutable; P : SequenceOfReal from TColStd;
B : Boolean from Standard ) is private;
fields
VFirst, VLast : Real;
myShapes: SequenceOfShape from TopTools;
myTrsfs: SequenceOfTrsf from GeomFill;
myParams: SequenceOfReal from TColStd;
myEdges: HArray2OfShape from TopTools;
mySurface: BSplineSurface from Geom;
end NSections;

View File

@@ -14,51 +14,49 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <stdio.h>
#include <BRepFill_NSections.ixx>
#include <BRepFill.hxx>
#include <BRepTools_WireExplorer.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <BRepLProp.hxx>
#include <BRepLib_MakeWire.hxx>
#include <BRepFill.hxx>
#include <BRepFill_NSections.hxx>
#include <BRepLib_MakeEdge.hxx>
#include <TopExp.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Wire.hxx>
#include <BRepLib_MakeWire.hxx>
#include <BRepLProp.hxx>
#include <BRepTools_WireExplorer.hxx>
#include <BSplCLib.hxx>
#include <Geom_BezierCurve.hxx>
#include <Geom_BSplineCurve.hxx>
#include <Geom_BSplineSurface.hxx>
#include <Geom_Conic.hxx>
#include <Geom_Curve.hxx>
#include <Geom_Line.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <Geom_BSplineCurve.hxx>
#include <Geom_Conic.hxx>
#include <GeomFill_UniformSection.hxx>
#include <GeomFill_EvolvedSection.hxx>
#include <GeomFill_HArray1OfSectionLaw.hxx>
#include <GeomFill_NSections.hxx>
#include <TColGeom_SequenceOfCurve.hxx>
#include <GeomFill_SectionGenerator.hxx>
#include <GeomFill_Line.hxx>
#include <GeomFill_AppSurf.hxx>
#include <GeomConvert.hxx>
#include <GeomConvert_ApproxCurve.hxx>
#include <GeomConvert_CompCurveToBSplineCurve.hxx>
#include <Geom_BSplineSurface.hxx>
#include <BSplCLib.hxx>
#include <GeomFill_AppSurf.hxx>
#include <GeomFill_EvolvedSection.hxx>
#include <GeomFill_HArray1OfSectionLaw.hxx>
#include <GeomFill_Line.hxx>
#include <GeomFill_NSections.hxx>
#include <GeomFill_SectionGenerator.hxx>
#include <GeomFill_SectionLaw.hxx>
#include <GeomFill_UniformSection.hxx>
#include <Precision.hxx>
#include <Standard_Type.hxx>
#include <TColGeom_SequenceOfCurve.hxx>
#include <TColgp_HArray1OfPnt.hxx>
#include <TColStd_HArray1OfReal.hxx>
#include <TColStd_HArray1OfInteger.hxx>
#include <Geom_BezierCurve.hxx>
#include <TColStd_HArray1OfReal.hxx>
#include <TopExp.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Wire.hxx>
#include <TopTools_Array1OfShape.hxx>
#include <Precision.hxx>
#include <stdio.h>
#ifdef OCCT_DEBUG
static Standard_Boolean Affich = 0;
#endif

View File

@@ -0,0 +1,103 @@
// Created on: 1998-12-29
// Created by: Joelle CHAUVET
// 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 _BRepFill_NSections_HeaderFile
#define _BRepFill_NSections_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Standard_Real.hxx>
#include <TopTools_SequenceOfShape.hxx>
#include <GeomFill_SequenceOfTrsf.hxx>
#include <TColStd_SequenceOfReal.hxx>
#include <TopTools_HArray2OfShape.hxx>
#include <BRepFill_SectionLaw.hxx>
#include <Standard_Boolean.hxx>
#include <GeomAbs_Shape.hxx>
#include <Standard_Integer.hxx>
class Geom_BSplineSurface;
class GeomFill_SectionLaw;
class TopoDS_Vertex;
class TopoDS_Shape;
class BRepFill_NSections;
DEFINE_STANDARD_HANDLE(BRepFill_NSections, BRepFill_SectionLaw)
//! Build Section Law, with N Sections
class BRepFill_NSections : public BRepFill_SectionLaw
{
public:
//! Construct
Standard_EXPORT BRepFill_NSections(const TopTools_SequenceOfShape& S, const Standard_Boolean Build = Standard_True);
//! Construct
Standard_EXPORT BRepFill_NSections(const TopTools_SequenceOfShape& S, const GeomFill_SequenceOfTrsf& Trsfs, const TColStd_SequenceOfReal& P, const Standard_Real VF, const Standard_Real VL, const Standard_Boolean Build = Standard_True);
//! Say if the input shape is a vertex.
Standard_EXPORT virtual Standard_Boolean IsVertex() const Standard_OVERRIDE;
//! Say if the Law is Constant.
Standard_EXPORT virtual Standard_Boolean IsConstant() const Standard_OVERRIDE;
//! Give the law build on a concatened section
Standard_EXPORT virtual Handle(GeomFill_SectionLaw) ConcatenedLaw() const Standard_OVERRIDE;
Standard_EXPORT virtual GeomAbs_Shape Continuity (const Standard_Integer Index, const Standard_Real TolAngular) const Standard_OVERRIDE;
Standard_EXPORT virtual Standard_Real VertexTol (const Standard_Integer Index, const Standard_Real Param) const Standard_OVERRIDE;
Standard_EXPORT virtual TopoDS_Vertex Vertex (const Standard_Integer Index, const Standard_Real Param) const Standard_OVERRIDE;
Standard_EXPORT virtual void D0 (const Standard_Real Param, TopoDS_Shape& S) Standard_OVERRIDE;
DEFINE_STANDARD_RTTI(BRepFill_NSections,BRepFill_SectionLaw)
protected:
private:
Standard_EXPORT void Init (const TColStd_SequenceOfReal& P, const Standard_Boolean B);
Standard_Real VFirst;
Standard_Real VLast;
TopTools_SequenceOfShape myShapes;
GeomFill_SequenceOfTrsf myTrsfs;
TColStd_SequenceOfReal myParams;
Handle(TopTools_HArray2OfShape) myEdges;
Handle(Geom_BSplineSurface) mySurface;
};
#endif // _BRepFill_NSections_HeaderFile

View File

@@ -1,63 +0,0 @@
-- Created on: 1995-09-01
-- Created by: Bruno DUMORTIER
-- Copyright (c) 1995-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 OffsetAncestors from BRepFill
---Purpose: this class is used to find the generating shapes
-- of an OffsetWire.
uses
OffsetWire from BRepFill,
Shape from TopoDS,
Edge from TopoDS,
DataMapOfShapeShape from TopTools
raises
NotDone from StdFail
is
Create returns OffsetAncestors from BRepFill;
Create ( Paral : in out OffsetWire from BRepFill)
returns OffsetAncestors from BRepFill;
Perform ( me : in out; Paral : in out OffsetWire from BRepFill)
is static;
IsDone( me)
returns Boolean from Standard
is static;
HasAncestor (me; S1 : Edge from TopoDS)
returns Boolean from Standard
is static;
Ancestor (me ; S1 : Edge from TopoDS)
---Purpose: may return a Null Shape if S1 is not a subShape
-- of <Paral>;
---C++: return const &
returns Shape from TopoDS
raises
NotDone from StdFail
---Purpose: if Perform is not done.
is static;
fields
myIsPerform : Boolean from Standard;
myMap : DataMapOfShapeShape from TopTools;
end OffsetAncestors;

View File

@@ -14,17 +14,20 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BRepFill_OffsetAncestors.ixx>
#include <BRepFill_OffsetAncestors.hxx>
#include <BRepFill_OffsetWire.hxx>
#include <StdFail_NotDone.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Shape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
//=======================================================================
//function : BRepFill_OffsetAncestors
//purpose :
//=======================================================================
BRepFill_OffsetAncestors::BRepFill_OffsetAncestors()
:myIsPerform(Standard_False)
{

View File

@@ -0,0 +1,81 @@
// Created on: 1995-09-01
// Created by: Bruno DUMORTIER
// Copyright (c) 1995-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 _BRepFill_OffsetAncestors_HeaderFile
#define _BRepFill_OffsetAncestors_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Boolean.hxx>
#include <TopTools_DataMapOfShapeShape.hxx>
class StdFail_NotDone;
class BRepFill_OffsetWire;
class TopoDS_Edge;
class TopoDS_Shape;
//! this class is used to find the generating shapes
//! of an OffsetWire.
class BRepFill_OffsetAncestors
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT BRepFill_OffsetAncestors();
Standard_EXPORT BRepFill_OffsetAncestors(BRepFill_OffsetWire& Paral);
Standard_EXPORT void Perform (BRepFill_OffsetWire& Paral);
Standard_EXPORT Standard_Boolean IsDone() const;
Standard_EXPORT Standard_Boolean HasAncestor (const TopoDS_Edge& S1) const;
//! may return a Null Shape if S1 is not a subShape
//! of <Paral>;
//! if Perform is not done.
Standard_EXPORT const TopoDS_Shape& Ancestor (const TopoDS_Edge& S1) const;
protected:
private:
Standard_Boolean myIsPerform;
TopTools_DataMapOfShapeShape myMap;
};
#endif // _BRepFill_OffsetAncestors_HeaderFile

View File

@@ -1,157 +0,0 @@
-- Created on: 1995-04-19
-- Created by: Yves FRICAUD
-- Copyright (c) 1995-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 OffsetWire from BRepFill
---Purpose: Constructs a Offset Wire to a spine (wire or face)
-- on the left of spine.
-- The Wire or the Face must be planar.
uses
Face from TopoDS,
Shape from TopoDS,
JoinType from GeomAbs,
ListOfShape from TopTools,
SequenceOfShape from TopTools,
SequenceOfPnt from TColgp,
DataMapOfShapeShape from TopTools,
IndexedDataMapOfOrientedShapeListOfShape from BRepFill,
DataMapOfOrientedShapeListOfShape from BRepFill,
BisectingLocus from BRepMAT2d,
LinkTopoBilo from BRepMAT2d,
Bisec from Bisector,
TrimEdgeTool from BRepFill
raises
ConstructionError from Standard,
NoSuchObject from Standard
is
Create returns OffsetWire from BRepFill;
Create ( Spine : Face from TopoDS;
Join : JoinType from GeomAbs = GeomAbs_Arc;
IsOpenResult : Boolean from Standard = Standard_False)
returns OffsetWire from BRepFill;
Init ( me : in out;
Spine : Face from TopoDS;
Join : JoinType from GeomAbs = GeomAbs_Arc;
IsOpenResult : Boolean from Standard = Standard_False)
---Purpose: Initialize the evaluation of Offseting.
raises
ConstructionError from Standard
is static;
Perform (me : in out;
Offset : Real from Standard;
Alt : Real from Standard = 0.0)
---Purpose: Performs an OffsetWire at an altitude <Alt> from
-- the face ( According to the orientation of the
-- face)
raises
ConstructionError from Standard
is static;
PerformWithBiLo (me : in out;
WSP : Face from TopoDS;
Offset : Real from Standard;
Locus : BisectingLocus from BRepMAT2d;
Link : in out LinkTopoBilo from BRepMAT2d;
Join : JoinType from GeomAbs = GeomAbs_Arc;
Alt : Real from Standard = 0.0)
---Purpose: Performs an OffsetWire
raises
ConstructionError from Standard
is static;
IsDone ( me)
returns Boolean from Standard
is static;
Spine(me)
returns Face from TopoDS
---C++: return const &
is static;
Shape(me) returns Shape from TopoDS
---Purpose: returns the generated shape.
---C++ : return const &
is static;
GeneratedShapes (me : in out ; SpineShape : Shape from TopoDS)
---Purpose: Returns the shapes created from a subshape
-- <SpineShape> of the spine.
-- Returns the last computed Offset.
--
---C++ : return const &
returns ListOfShape from TopTools
is static;
JoinType (me) returns JoinType from GeomAbs
is static;
Generated (me : in out )
---C++: return &
returns IndexedDataMapOfOrientedShapeListOfShape from BRepFill
is static private;
PrepareSpine (me : in out)
---Purpose: Prepare the spine as follow
-- - Cut the spine-Edges at the extrema of curvature and
-- at the inflexion points.
is static private;
Add(me : in out; Other : OffsetWire from BRepFill)
---Purpose: Add the OffsetWire <Other> to <me> and update <myMap>
is static private;
UpdateDetromp (me; Detromp : in out DataMapOfOrientedShapeListOfShape from BRepFill;
Shape1, Shape2 : Shape from TopoDS;
Vertices : SequenceOfShape from TopTools;
Params : SequenceOfPnt from TColgp;
Bisec : Bisec from Bisector;
SOnE : Boolean from Standard;
EOnE : Boolean from Standard;
Trim : TrimEdgeTool from BRepFill)
is static private;
MakeWires (me : in out)
---Purpose: Constructs the wires with the trimmed offset edges.
is static private;
FixHoles (me : in out)
---Purpose: Fix holes between open wires where it is possible
is static private;
fields
mySpine : Face from TopoDS;
myWorkSpine : Face from TopoDS;
myOffset : Real from Standard; -- >0 ;
myIsOpenResult : Boolean from Standard;
myShape : Shape from TopoDS;
myIsDone : Boolean from Standard;
myJoinType : JoinType from GeomAbs;
myMap : IndexedDataMapOfOrientedShapeListOfShape from BRepFill;
myBilo : BisectingLocus from BRepMAT2d;
myLink : LinkTopoBilo from BRepMAT2d;
myMapSpine : DataMapOfShapeShape from TopTools;
myCallGen : Boolean from Standard;
end OffsetWire;

View File

@@ -16,90 +16,92 @@
// Modified by skv - Fri Jul 8 11:21:38 2005 OCC9145
#include <stdio.h>
#include <BRepFill_OffsetWire.ixx>
#include <BRepAdaptor_Curve.hxx>
#include <BRepAdaptor_Surface.hxx>
#include <BRepFill_DataMapOfNodeShape.hxx>
#include <BRepFill_DataMapOfShapeSequenceOfPnt.hxx>
#include <BRepFill_DataMapOfShapeSequenceOfReal.hxx>
#include <BRepFill_DataMapOfOrientedShapeListOfShape.hxx>
#include <BRepFill_TrimEdgeTool.hxx>
#include <BRepLib.hxx>
#include <BRepLib_MakeVertex.hxx>
#include <BRepLib_MakeFace.hxx>
#include <BRepLib_MakeWire.hxx>
#include <BRepLib_MakeEdge.hxx>
#include <BRepTools.hxx>
#include <Adaptor3d_Curve.hxx>
#include <Adaptor3d_OffsetCurve.hxx>
#include <Bisector_Bisec.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <BRep_TEdge.hxx>
#include <BRep_CurveRepresentation.hxx>
#include <BRep_GCurve.hxx>
#include <BRepTools_WireExplorer.hxx>
#include <BRep_TEdge.hxx>
#include <BRep_Tool.hxx>
#include <BRep_TVertex.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <BRepAdaptor_Surface.hxx>
#include <BRepFill_DataMapOfNodeShape.hxx>
#include <BRepFill_DataMapOfOrientedShapeListOfShape.hxx>
#include <BRepFill_DataMapOfShapeSequenceOfPnt.hxx>
#include <BRepFill_DataMapOfShapeSequenceOfReal.hxx>
#include <BRepFill_OffsetWire.hxx>
#include <BRepFill_TrimEdgeTool.hxx>
#include <BRepLib.hxx>
#include <BRepLib_MakeEdge.hxx>
#include <BRepLib_MakeFace.hxx>
#include <BRepLib_MakeVertex.hxx>
#include <BRepLib_MakeWire.hxx>
#include <BRepMAT2d_BisectingLocus.hxx>
#include <BRepMAT2d_Explorer.hxx>
#include <BRepMAT2d_LinkTopoBilo.hxx>
#include <BRepTools.hxx>
#include <BRepTools_Substitution.hxx>
#include <BRepTools_WireExplorer.hxx>
#include <Geom2d_BSplineCurve.hxx>
#include <Geom2d_Circle.hxx>
#include <Geom2d_Curve.hxx>
#include <Geom2d_Line.hxx>
#include <Geom2d_OffsetCurve.hxx>
#include <Geom2d_TrimmedCurve.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom2dAdaptor_HCurve.hxx>
#include <Adaptor3d_OffsetCurve.hxx>
#include <Adaptor3d_Curve.hxx>
#include <Geom_Surface.hxx>
#include <Geom_Plane.hxx>
#include <Geom2d_Curve.hxx>
#include <Geom2d_Circle.hxx>
#include <Geom2d_Line.hxx>
#include <Geom2d_TrimmedCurve.hxx>
#include <Geom2d_OffsetCurve.hxx>
#include <GeomAPI.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <Geom2dConvert_CompCurveToBSplineCurve.hxx>
#include <Geom2dLProp_CLProps2d.hxx>
#include <Geom_Circle.hxx>
#include <Geom_Line.hxx>
#include <Geom_OffsetCurve.hxx>
#include <MAT_Arc.hxx>
#include <MAT_Node.hxx>
#include <MAT_Graph.hxx>
#include <Geom_Plane.hxx>
#include <Geom_Surface.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <GeomAPI.hxx>
#include <gp.hxx>
#include <gp_Ax2.hxx>
#include <gp_Dir2d.hxx>
#include <gp_Pln.hxx>
#include <gp_Vec.hxx>
#include <MAT2d_CutCurve.hxx>
#include <MAT_Arc.hxx>
#include <MAT_Graph.hxx>
#include <MAT_Node.hxx>
#include <Precision.hxx>
#include <Standard_ConstructionError.hxx>
#include <Standard_ErrorHandler.hxx>
#include <Standard_NoSuchObject.hxx>
#include <Standard_NotImplemented.hxx>
#include <TColgp_Array1OfPnt2d.hxx>
#include <TColgp_SequenceOfPnt.hxx>
#include <TColStd_SequenceOfReal.hxx>
#include <TopAbs.hxx>
#include <TColStd_Array1OfInteger.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <TColStd_SequenceOfReal.hxx>
#include <TopAbs.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Wire.hxx>
#include <TopoDS_Compound.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopTools_MapOfShape.hxx>
#include <TopTools_MapIteratorOfMapOfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_DataMapOfShapeListOfShape.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Wire.hxx>
#include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
#include <TopTools_DataMapIteratorOfDataMapOfShapeShape.hxx>
#include <TopTools_SequenceOfShape.hxx>
#include <TopTools_ListOfShape.hxx>
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
#include <TopTools_DataMapOfShapeListOfShape.hxx>
#include <TopTools_DataMapOfShapeSequenceOfShape.hxx>
#include <gp.hxx>
#include <gp_Vec.hxx>
#include <gp_Ax2.hxx>
#include <gp_Pln.hxx>
#include <gp_Dir2d.hxx>
#include <BRep_TVertex.hxx>
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <Geom2d_BSplineCurve.hxx>
#include <TColgp_Array1OfPnt2d.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <TColStd_Array1OfInteger.hxx>
#include <BRepTools_Substitution.hxx>
#include <BRepLib_MakeVertex.hxx>
#include <Geom2dLProp_CLProps2d.hxx>
#include <Geom2dConvert_CompCurveToBSplineCurve.hxx>
#include <Standard_ErrorHandler.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_ListOfShape.hxx>
#include <TopTools_MapIteratorOfMapOfShape.hxx>
#include <TopTools_MapOfShape.hxx>
#include <TopTools_SequenceOfShape.hxx>
#include <stdio.h>
#ifdef OCCT_DEBUG
//#define DRAW
#ifdef DRAW

View File

@@ -0,0 +1,139 @@
// Created on: 1995-04-19
// Created by: Yves FRICAUD
// Copyright (c) 1995-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 _BRepFill_OffsetWire_HeaderFile
#define _BRepFill_OffsetWire_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <TopoDS_Face.hxx>
#include <Standard_Real.hxx>
#include <Standard_Boolean.hxx>
#include <TopoDS_Shape.hxx>
#include <GeomAbs_JoinType.hxx>
#include <BRepFill_IndexedDataMapOfOrientedShapeListOfShape.hxx>
#include <BRepMAT2d_BisectingLocus.hxx>
#include <BRepMAT2d_LinkTopoBilo.hxx>
#include <TopTools_DataMapOfShapeShape.hxx>
#include <TopTools_ListOfShape.hxx>
#include <BRepFill_DataMapOfOrientedShapeListOfShape.hxx>
#include <TopTools_SequenceOfShape.hxx>
#include <TColgp_SequenceOfPnt.hxx>
class Standard_ConstructionError;
class Standard_NoSuchObject;
class TopoDS_Face;
class BRepMAT2d_BisectingLocus;
class BRepMAT2d_LinkTopoBilo;
class TopoDS_Shape;
class Bisector_Bisec;
class BRepFill_TrimEdgeTool;
//! Constructs a Offset Wire to a spine (wire or face)
//! on the left of spine.
//! The Wire or the Face must be planar.
class BRepFill_OffsetWire
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT BRepFill_OffsetWire();
Standard_EXPORT BRepFill_OffsetWire(const TopoDS_Face& Spine, const GeomAbs_JoinType Join = GeomAbs_Arc, const Standard_Boolean IsOpenResult = Standard_False);
//! Initialize the evaluation of Offseting.
Standard_EXPORT void Init (const TopoDS_Face& Spine, const GeomAbs_JoinType Join = GeomAbs_Arc, const Standard_Boolean IsOpenResult = Standard_False);
//! Performs an OffsetWire at an altitude <Alt> from
//! the face ( According to the orientation of the
//! face)
Standard_EXPORT void Perform (const Standard_Real Offset, const Standard_Real Alt = 0.0);
//! Performs an OffsetWire
Standard_EXPORT void PerformWithBiLo (const TopoDS_Face& WSP, const Standard_Real Offset, const BRepMAT2d_BisectingLocus& Locus, BRepMAT2d_LinkTopoBilo& Link, const GeomAbs_JoinType Join = GeomAbs_Arc, const Standard_Real Alt = 0.0);
Standard_EXPORT Standard_Boolean IsDone() const;
Standard_EXPORT const TopoDS_Face& Spine() const;
//! returns the generated shape.
Standard_EXPORT const TopoDS_Shape& Shape() const;
//! Returns the shapes created from a subshape
//! <SpineShape> of the spine.
//! Returns the last computed Offset.
Standard_EXPORT const TopTools_ListOfShape& GeneratedShapes (const TopoDS_Shape& SpineShape);
Standard_EXPORT GeomAbs_JoinType JoinType() const;
protected:
private:
Standard_EXPORT BRepFill_IndexedDataMapOfOrientedShapeListOfShape& Generated();
//! Prepare the spine as follow
//! - Cut the spine-Edges at the extrema of curvature and
//! at the inflexion points.
Standard_EXPORT void PrepareSpine();
//! Add the OffsetWire <Other> to <me> and update <myMap>
Standard_EXPORT void Add (const BRepFill_OffsetWire& Other);
Standard_EXPORT void UpdateDetromp (BRepFill_DataMapOfOrientedShapeListOfShape& Detromp, const TopoDS_Shape& Shape1, const TopoDS_Shape& Shape2, const TopTools_SequenceOfShape& Vertices, const TColgp_SequenceOfPnt& Params, const Bisector_Bisec& Bisec, const Standard_Boolean SOnE, const Standard_Boolean EOnE, const BRepFill_TrimEdgeTool& Trim) const;
//! Constructs the wires with the trimmed offset edges.
Standard_EXPORT void MakeWires();
//! Fix holes between open wires where it is possible
Standard_EXPORT void FixHoles();
TopoDS_Face mySpine;
TopoDS_Face myWorkSpine;
Standard_Real myOffset;
Standard_Boolean myIsOpenResult;
TopoDS_Shape myShape;
Standard_Boolean myIsDone;
GeomAbs_JoinType myJoinType;
BRepFill_IndexedDataMapOfOrientedShapeListOfShape myMap;
BRepMAT2d_BisectingLocus myBilo;
BRepMAT2d_LinkTopoBilo myLink;
TopTools_DataMapOfShapeShape myMapSpine;
Standard_Boolean myCallGen;
};
#endif // _BRepFill_OffsetWire_HeaderFile

View File

@@ -1,193 +0,0 @@
-- Created on: 1994-06-07
-- Created by: Bruno DUMORTIER
-- Copyright (c) 1994-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 Pipe from BRepFill
---Purpose: Create a shape by sweeping a shape (the profile)
-- along a wire (the spine).
--
-- For each edge or vertex from the spine the user
-- may ask for the shape generated from each subshape
-- of the profile.
uses
HArray2OfShape from TopTools,
MapOfShape from TopTools,
DataMapOfShapeHArray2OfShape from BRepFill,
LocationLaw from BRepFill,
Shape from TopoDS,
Face from TopoDS,
Wire from TopoDS,
Edge from TopoDS,
Vertex from TopoDS,
Pnt from gp,
Trsf from gp,
Shape from GeomAbs,
Trihedron from GeomFill
raises
DomainError from Standard,
NotDone from StdFail
is
Create returns Pipe from BRepFill;
Create ( Spine : Wire from TopoDS;
Profile : Shape from TopoDS;
aMode : Trihedron from GeomFill = GeomFill_IsCorrectedFrenet;
ForceApproxC1 : Boolean from Standard = Standard_False;
GeneratePartCase : Boolean from Standard = Standard_False)
returns Pipe from BRepFill;
Perform (me : in out; Spine : Wire from TopoDS;
Profile : Shape from TopoDS;
GeneratePartCase : Boolean from Standard = Standard_False)
is static;
Spine(me) returns Shape from TopoDS
---C++ : return const &
is static;
Profile(me) returns Shape from TopoDS
---C++ : return const &
is static;
Shape(me) returns Shape from TopoDS
---C++ : return const &
is static;
ErrorOnSurface (me)
returns Real from Standard;
FirstShape(me) returns Shape from TopoDS
---C++ : return const &
is static;
LastShape(me) returns Shape from TopoDS
---C++ : return const &
is static;
Face(me : in out; ESpine, EProfile : Edge from TopoDS)
returns Face from TopoDS
---Purpose: Returns the face created from an edge of the spine
-- and an edge of the profile.
raises
DomainError from Standard
---Purpose: if the edges are not in the spine or the profile
is static;
Edge(me : in out; ESpine : Edge from TopoDS; VProfile : Vertex from TopoDS)
returns Edge from TopoDS
---Purpose: Returns the edge created from an edge of the spine
-- and a vertex of the profile.
raises
DomainError from Standard
---Purpose: if the edge or the vertex are not in the spine or
-- the profile.
is static;
Section(me; VSpine : Vertex from TopoDS)
returns Shape from TopoDS
---Purpose: Returns the shape created from the profile at the
-- position of the vertex VSpine.
raises
DomainError from Standard
---Purpose: if the vertex is not in the Spine
is static;
PipeLine(me : in out; Point : Pnt from gp)
---Purpose: Create a Wire by sweeping the Point along the <spine>
returns Wire from TopoDS
raises
DomainError from Standard
---Purpose: if the <Spine> is undefined
is static;
--
-- Private methods
--
MakeShape(me : in out; S : Shape from TopoDS;
FirstShape, LastShape : Shape from TopoDS)
returns Shape from TopoDS
---Purpose: Auxiliary recursive method used to build the
-- result.
is static private;
FindEdge(me; S : Shape from TopoDS;
E : Edge from TopoDS;
Init : in out Integer)
---Purpose: Auxiliary recursive method used to find the edge's index
returns Integer
is static private;
FindVertex(me; S : Shape from TopoDS;
V : Vertex from TopoDS;
Init : in out Integer)
returns Integer
is static private;
DefineRealSegmax(me : in out)
is static private;
RebuildTopOrBottomFace(me; aFace: Shape from TopoDS;
IsTop: Boolean from Standard)
is static private;
ShareFaces(me: in out; theShape: Shape from TopoDS;
theInitialFacesLen: Integer;
theInitialEdgesLen: Integer;
theInitialSectionsLen: Integer)
---Purpose: Performs sharing coincident faces in theShape. Also modifies
-- myFaces, mySections and myEdges to contain shared shapes.
-- Returns the shared shape. If theShape is not modified this
-- method returns it.
returns Shape from TopoDS
is static private;
fields
mySpine : Wire from TopoDS;
myProfile : Shape from TopoDS;
myShape : Shape from TopoDS;
myTrsf : Trsf from gp;
myLoc : LocationLaw from BRepFill;
mySections: HArray2OfShape from TopTools;
myFaces : HArray2OfShape from TopTools;
myEdges : HArray2OfShape from TopTools;
myReversedEdges : MapOfShape from TopTools;
myTapes : DataMapOfShapeHArray2OfShape from BRepFill;
myRails : DataMapOfShapeHArray2OfShape from BRepFill;
myCurIndexOfSectionEdge : Integer from Standard;
myFirst : Shape from TopoDS;
myLast : Shape from TopoDS;
myDegmax : Integer from Standard;
mySegmax : Integer from Standard;
myContinuity : Shape from GeomAbs;
myMode : Trihedron from GeomFill;
myForceApproxC1 : Boolean from Standard;
myErrorOnSurf : Real from Standard;
end Pipe;

View File

@@ -14,55 +14,56 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BRepFill_Pipe.ixx>
#include <Standard_ErrorHandler.hxx>
#include <BRep_Tool.hxx>
#include <Adaptor3d_CurveOnSurface.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <BRepBuilderAPI_Copy.hxx>
#include <BRepBuilderAPI_Transform.hxx>
#include <BRepClass3d_SolidClassifier.hxx>
#include <BRepLib_MakeVertex.hxx>
#include <BRepTools_Substitution.hxx>
#include <GeomFill_CorrectedFrenet.hxx>
#include <GeomFill_Frenet.hxx>
#include <GeomFill_DiscreteTrihedron.hxx>
#include <GeomFill_CurveAndTrihedron.hxx>
#include <BRepFill_Edge3DLaw.hxx>
#include <BRepFill_LocationLaw.hxx>
#include <BRepFill_Pipe.hxx>
#include <BRepFill_SectionPlacement.hxx>
#include <BRepFill_ShapeLaw.hxx>
#include <BRepFill_Edge3DLaw.hxx>
#include <BRepFill_Sweep.hxx>
#include <BRepLib.hxx>
#include <BRepLib_MakeVertex.hxx>
#include <BRepTools_Substitution.hxx>
#include <Geom2dAdaptor_HCurve.hxx>
#include <Geom_BSplineCurve.hxx>
#include <Geom_OffsetCurve.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <GeomAbs_Shape.hxx>
#include <TopExp.hxx>
#include <GeomAdaptor_HSurface.hxx>
#include <GeomFill_CorrectedFrenet.hxx>
#include <GeomFill_CurveAndTrihedron.hxx>
#include <GeomFill_DiscreteTrihedron.hxx>
#include <GeomFill_Frenet.hxx>
#include <gp_Pnt.hxx>
#include <Precision.hxx>
#include <ShapeUpgrade_RemoveLocations.hxx>
#include <Standard_DomainError.hxx>
#include <Standard_ErrorHandler.hxx>
#include <Standard_NotImplemented.hxx>
#include <StdFail_NotDone.hxx>
#include <TColStd_DataMapIteratorOfDataMapOfIntegerInteger.hxx>
#include <TColStd_DataMapOfIntegerInteger.hxx>
#include <TopAbs_ShapeEnum.hxx>
#include <TopExp.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Compound.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Shell.hxx>
#include <TopoDS_Solid.hxx>
#include <TopoDS_Compound.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Wire.hxx>
#include <TopTools_DataMapOfShapeInteger.hxx>
#include <TColStd_DataMapOfIntegerInteger.hxx>
#include <TColStd_DataMapIteratorOfDataMapOfIntegerInteger.hxx>
#include <Precision.hxx>
#include <Standard_NotImplemented.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <Geom_OffsetCurve.hxx>
#include <Geom_BSplineCurve.hxx>
#include <BRepBuilderAPI_Transform.hxx>
#include <BRepBuilderAPI_Copy.hxx>
#include <TopTools_SequenceOfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <BRepLib.hxx>
#include <Geom2dAdaptor_HCurve.hxx>
#include <GeomAdaptor_HSurface.hxx>
#include <Adaptor3d_CurveOnSurface.hxx>
#include <ShapeUpgrade_RemoveLocations.hxx>
#include <TopTools_SequenceOfShape.hxx>
#ifdef DRAW
#include <DBRep.hxx>

View File

@@ -0,0 +1,159 @@
// Created on: 1994-06-07
// Created by: Bruno DUMORTIER
// Copyright (c) 1994-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 _BRepFill_Pipe_HeaderFile
#define _BRepFill_Pipe_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <TopoDS_Wire.hxx>
#include <TopoDS_Shape.hxx>
#include <gp_Trsf.hxx>
#include <TopTools_HArray2OfShape.hxx>
#include <TopTools_MapOfShape.hxx>
#include <BRepFill_DataMapOfShapeHArray2OfShape.hxx>
#include <Standard_Integer.hxx>
#include <GeomAbs_Shape.hxx>
#include <GeomFill_Trihedron.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Real.hxx>
class BRepFill_LocationLaw;
class Standard_DomainError;
class StdFail_NotDone;
class TopoDS_Wire;
class TopoDS_Shape;
class TopoDS_Face;
class TopoDS_Edge;
class TopoDS_Vertex;
class gp_Pnt;
//! Create a shape by sweeping a shape (the profile)
//! along a wire (the spine).
//!
//! For each edge or vertex from the spine the user
//! may ask for the shape generated from each subshape
//! of the profile.
class BRepFill_Pipe
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT BRepFill_Pipe();
Standard_EXPORT BRepFill_Pipe(const TopoDS_Wire& Spine, const TopoDS_Shape& Profile, const GeomFill_Trihedron aMode = GeomFill_IsCorrectedFrenet, const Standard_Boolean ForceApproxC1 = Standard_False, const Standard_Boolean GeneratePartCase = Standard_False);
Standard_EXPORT void Perform (const TopoDS_Wire& Spine, const TopoDS_Shape& Profile, const Standard_Boolean GeneratePartCase = Standard_False);
Standard_EXPORT const TopoDS_Shape& Spine() const;
Standard_EXPORT const TopoDS_Shape& Profile() const;
Standard_EXPORT const TopoDS_Shape& Shape() const;
Standard_EXPORT Standard_Real ErrorOnSurface() const;
Standard_EXPORT const TopoDS_Shape& FirstShape() const;
Standard_EXPORT const TopoDS_Shape& LastShape() const;
//! Returns the face created from an edge of the spine
//! and an edge of the profile.
//! if the edges are not in the spine or the profile
Standard_EXPORT TopoDS_Face Face (const TopoDS_Edge& ESpine, const TopoDS_Edge& EProfile);
//! Returns the edge created from an edge of the spine
//! and a vertex of the profile.
//! if the edge or the vertex are not in the spine or
//! the profile.
Standard_EXPORT TopoDS_Edge Edge (const TopoDS_Edge& ESpine, const TopoDS_Vertex& VProfile);
//! Returns the shape created from the profile at the
//! position of the vertex VSpine.
//! if the vertex is not in the Spine
Standard_EXPORT TopoDS_Shape Section (const TopoDS_Vertex& VSpine) const;
//! Create a Wire by sweeping the Point along the <spine>
//! if the <Spine> is undefined
Standard_EXPORT TopoDS_Wire PipeLine (const gp_Pnt& Point);
protected:
private:
//! Auxiliary recursive method used to build the
//! result.
Standard_EXPORT TopoDS_Shape MakeShape (const TopoDS_Shape& S, const TopoDS_Shape& FirstShape, const TopoDS_Shape& LastShape);
//! Auxiliary recursive method used to find the edge's index
Standard_EXPORT Standard_Integer FindEdge (const TopoDS_Shape& S, const TopoDS_Edge& E, Standard_Integer& Init) const;
Standard_EXPORT Standard_Integer FindVertex (const TopoDS_Shape& S, const TopoDS_Vertex& V, Standard_Integer& Init) const;
Standard_EXPORT void DefineRealSegmax();
Standard_EXPORT void RebuildTopOrBottomFace (const TopoDS_Shape& aFace, const Standard_Boolean IsTop) const;
//! Performs sharing coincident faces in theShape. Also modifies
//! myFaces, mySections and myEdges to contain shared shapes.
//! Returns the shared shape. If theShape is not modified this
//! method returns it.
Standard_EXPORT TopoDS_Shape ShareFaces (const TopoDS_Shape& theShape, const Standard_Integer theInitialFacesLen, const Standard_Integer theInitialEdgesLen, const Standard_Integer theInitialSectionsLen);
TopoDS_Wire mySpine;
TopoDS_Shape myProfile;
TopoDS_Shape myShape;
gp_Trsf myTrsf;
Handle(BRepFill_LocationLaw) myLoc;
Handle(TopTools_HArray2OfShape) mySections;
Handle(TopTools_HArray2OfShape) myFaces;
Handle(TopTools_HArray2OfShape) myEdges;
TopTools_MapOfShape myReversedEdges;
BRepFill_DataMapOfShapeHArray2OfShape myTapes;
BRepFill_DataMapOfShapeHArray2OfShape myRails;
Standard_Integer myCurIndexOfSectionEdge;
TopoDS_Shape myFirst;
TopoDS_Shape myLast;
Standard_Integer myDegmax;
Standard_Integer mySegmax;
GeomAbs_Shape myContinuity;
GeomFill_Trihedron myMode;
Standard_Boolean myForceApproxC1;
Standard_Real myErrorOnSurf;
};
#endif // _BRepFill_Pipe_HeaderFile

View File

@@ -1,329 +0,0 @@
-- Created on: 1998-07-22
-- Created by: Philippe MANGIN
-- 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 PipeShell from BRepFill inherits TShared from MMgt
---Purpose: Computes a topological shell using some wires
-- (spines and profiles) and diplacement option
-- Perform general sweeping construction
uses
Dir from gp,
Ax2 from gp,
Trsf from gp,
Function from Law,
ListOfShape from TopTools,
HArray2OfShape from TopTools,
Shape from TopoDS,
Wire from TopoDS,
Vertex from TopoDS,
TransitionStyle from BRepFill,
Trihedron from GeomFill,
PipeError from GeomFill,
LocationLaw from BRepFill,
SectionLaw from BRepFill,
Section from BRepFill,
Sweep from BRepFill,
DataMapOfShapeListOfShape from TopTools,
SequenceOfSection from BRepFill,
TypeOfContact from BRepFill
raises
DomainError from Standard,
NotDone from StdFail
is
Create( Spine : Wire from TopoDS)
---Level: Public
returns PipeShell from BRepFill;
-- =================================
-- Methodes Set
-- =================================
---Purpose: Set an sweep's mode
-- If no mode are setted, the mode use in MakePipe is used
---See Also: GeomFill_IsCorrectedFrenet
Set(me : mutable; Frenet : Boolean = Standard_False);
---Purpose: Set an Frenet or an CorrectedFrenet trihedron
-- to perform the sweeping
---Level: Public
---See Also:GeomFill_IsCorrectedFrenet
SetDiscrete(me : mutable);
---Purpose: Set a Discrete trihedron
-- to perform the sweeping
---Level: Public
---See Also:GeomFill_IsDiscreteTrihedron
Set(me : mutable; Axe : Ax2 from gp);
---Purpose: Set an fixed trihedron to perform the sweeping
-- all sections will be parallel.
---Level: Public
---See Also: GeomFill_IsFixed
Set(me : mutable; BiNormal : Dir from gp);
---Purpose: Set an fixed BiNormal direction to perform
-- the sweeping
---Level: Public
---See Also: GeomFill_IsConstantNormal
Set(me : mutable; SpineSupport : Shape from TopoDS)
---Purpose: Set support to the spine to define the BiNormal
-- at the spine, like the normal the surfaces.
-- Warning: To be effective, Each edge of the <spine> must
-- have an representaion on one face of<SpineSupport>
---Level: Public
---See Also: GeomFill_IsDarboux
returns Boolean;
Set(me : mutable;
AuxiliarySpine : Wire from TopoDS;
CurvilinearEquivalence : Boolean = Standard_True;
KeepContact : TypeOfContact from BRepFill = BRepFill_NoContact );
---Purpose: Set an auxiliary spine to define the Normal
-- For each Point of the Spine P, an Point Q is evalued
-- on <AuxiliarySpine>
-- If <CurvilinearEquivalence>
-- Q split <AuxiliarySpine> with the same length ratio
-- than P split <Spline>.
-- Else the plan define by P and the tangent to the <Spine>
-- intersect <AuxiliarySpine> in Q.
-- If <KeepContact> equals BRepFill_NoContact: The Normal is defined
-- by the vector PQ.
-- If <KeepContact> equals BRepFill_Contact: The Normal is defined to
-- achieve that the sweeped section is in contact to the
-- auxiliarySpine. The width of section is constant all along the path.
-- In other words, the auxiliary spine lies on the swept surface,
-- but not necessarily is a boundary of this surface. However,
-- the auxiliary spine has to be close enough to the main spine
-- to provide intersection with any section all along the path.
-- If <KeepContact> equals BRepFill_ContactOnBorder: The auxiliary spine
-- becomes a boundary of the swept surface and the width of section varies
-- along the path.
---Level: Public
-- ============================================
-- Methods to set parameters for approximation
-- ============================================
SetMaxDegree(me : mutable;
NewMaxDegree : Integer from Standard);
---Purpose: Define the maximum V degree of resulting surface
SetMaxSegments(me : mutable;
NewMaxSegments : Integer from Standard);
---Purpose: Define the maximum number of spans in V-direction
-- on resulting surface
SetForceApproxC1(me : mutable;
ForceApproxC1 : Boolean from Standard);
---Purpose: Set the flag that indicates attempt to approximate
-- a C1-continuous surface if a swept surface proved
-- to be C0.
-- =================================
-- Methodes to define section(s)
-- =================================
---Purpose: Give section to sweep.
-- Possibilities are :
-- - Give one or sevral profile
-- - Give one profile and an homotetic law.
-- - Automatic compute of correspondance beetween profile, and section
-- on the sweeped shape
-- - correspondance beetween profile, and section on the sweeped shape
-- defined by a vertex of the spine
-- -"WithCorrection" The profile is rotated to have a Normal --
-- parallel to the trihedron's normal and have tangent
-- perpendicular to the trihedron's tangent.
Add(me:mutable;
Profile : Shape from TopoDS;
WithContact : Boolean = Standard_False;
WithCorrection : Boolean = Standard_False );
---Purpose: Set an section. The corespondance with the spine, will
-- be automaticaly performed.
---Level: Public
Add(me:mutable;
Profile : Shape from TopoDS;
Location : Vertex from TopoDS;
WithContact : Boolean = Standard_False;
WithCorrection : Boolean = Standard_False)
---Purpose: Set an section. The corespondance with the spine, is
-- given by <Location>
---Level: Public
raises DomainError; -- if the <Spine> do not contain <Location>
SetLaw(me :mutable;
Profile : Shape from TopoDS;
L : Function from Law;
WithContact : Boolean = Standard_False;
WithCorrection : Boolean = Standard_False);
---Purpose: Set an section and an homotetic law.
-- The homotetie's centers is given by point on the <Spine>.
---Level: Public
SetLaw(me :mutable;
Profile : Shape from TopoDS;
L : Function from Law;
Location : Vertex from TopoDS;
WithContact : Boolean = Standard_False;
WithCorrection : Boolean = Standard_False);
---Purpose: Set an section and an homotetic law.
-- The homotetie center is given by point on the <Spine>
---Level: Public
Delete(me : mutable; Profile : Shape from TopoDS);
---Purpose: Delete an section.
---Level: Public
-- ========================================
-- Methodes to perform and read shape
-- ========================================
IsReady(me)
---Purpose: Say if <me> is ready to build the shape
-- return False if <me> do not have section definition
returns Boolean;
GetStatus(me)
---Purpose: Get a status, when Simulate or Build failed.
returns PipeError from GeomFill;
SetTolerance(me : mutable;
Tol3d : Real = 1.0e-4;
BoundTol : Real = 1.0e-4;
TolAngular : Real = 1.0e-2);
SetTransition(me : mutable;
Mode :TransitionStyle from BRepFill
= BRepFill_Modified;
Angmin : Real = 1.0e-2;
Angmax : Real = 6.0)
---Purpose: Set the Transition Mode to manage discontinuities
-- on the sweep.
---Level: Public
is static;
Simulate(me : mutable;
NumberOfSection : Integer;
Sections : out ListOfShape from TopTools)
---Purpose: Perform simulation of the sweep :
-- Somes Section are returned.
---Level: Public
raises NotDone; -- If <me> it is not Ready
Build(me : mutable)
---Purpose: Builds the resulting shape (redefined from MakeShape).
---Level: Public
returns Boolean
raises NotDone -- If <me> it is not Ready
is static;
MakeSolid(me : mutable)
---Purpose: Transform the sweeping Shell in Solid.
-- If the section are not closed returns False
---Level: Public
returns Boolean
raises NotDone; -- If <me> is not Builded;
Shape (me)
---Purpose: Returns the result Shape.
---C++: return const &
---Level: Public
returns Shape from TopoDS
is static;
ErrorOnSurface (me)
returns Real from Standard;
FirstShape (me)
---Purpose: Returns the TopoDS Shape of the bottom of the sweep.
---C++: return const &
---Level: Public
returns Shape from TopoDS
is static;
LastShape (me)
---Purpose: Returns the TopoDS Shape of the top of the sweep.
---C++: return const &
---Level: Public
returns Shape from TopoDS
is static;
Generated (me: mutable;
S : Shape from TopoDS;
L : out ListOfShape from TopTools)
---Purpose: Returns the list of shapes generated from the
-- shape <S>.
---Level: Public
is static;
Prepare(me: mutable) is private;
Place(me : mutable;
Sec : Section from BRepFill;
W : out Wire from TopoDS;
Trsf : out Trsf from gp;
param : out Real from Standard) is private;
ResetLoc(me : mutable) is private;
BuildHistory(me: mutable; theSweep: Sweep from BRepFill)
is private;
fields
mySpine : Wire from TopoDS;
myFirst : Shape from TopoDS;
myLast : Shape from TopoDS;
myShape : Shape from TopoDS;
mySeq : SequenceOfSection from BRepFill;
myGenMap : DataMapOfShapeListOfShape from TopTools;
myTol3d : Real;
myBoundTol : Real;
myTolAngular : Real;
angmin, angmax : Real;
myMaxDegree : Integer;
myMaxSegments : Integer;
myForceApproxC1 : Boolean;
myLaw : Function from Law;
myIsAutomaticLaw : Boolean from Standard;
myLocation : LocationLaw from BRepFill;
mySection : SectionLaw from BRepFill;
myFaces : HArray2OfShape from TopTools;
myTrihedron : Trihedron from GeomFill;
myTransition : TransitionStyle from BRepFill;
myStatus : PipeError from GeomFill;
myErrorOnSurf : Real from Standard;
end PipeShell;

View File

@@ -14,72 +14,73 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <stdio.h>
#include <BRepFill_PipeShell.ixx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <TopExp.hxx>
#include <TopTools_SequenceOfShape.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Shell.hxx>
#include <TopoDS_Solid.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopLoc_Location.hxx>
#include <BRepAdaptor_HCompCurve.hxx>
#include <BRepBuilderAPI_Copy.hxx>
#include <BRepBuilderAPI_Transform.hxx>
#include <BRepClass3d_SolidClassifier.hxx>
#include <BRepFill.hxx>
#include <BRepFill_ACRLaw.hxx>
#include <BRepFill_CompatibleWires.hxx>
#include <BRepFill_DataMapOfShapeHArray2OfShape.hxx>
#include <BRepFill_Edge3DLaw.hxx>
#include <BRepFill_EdgeOnSurfLaw.hxx>
#include <BRepFill_LocationLaw.hxx>
#include <BRepFill_NSections.hxx>
#include <BRepFill_PipeShell.hxx>
#include <BRepFill_Section.hxx>
#include <BRepFill_SectionLaw.hxx>
#include <BRepFill_SectionPlacement.hxx>
#include <BRepFill_ShapeLaw.hxx>
#include <BRepFill_Sweep.hxx>
#include <BRepGProp.hxx>
#include <BRepLib_MakeEdge.hxx>
#include <BRepLib_MakeFace.hxx>
#include <BRepAdaptor_HCompCurve.hxx>
#include <BRepClass3d_SolidClassifier.hxx>
#include <BRepFill.hxx>
#include <BRepFill_Sweep.hxx>
#include <BRepFill_SectionPlacement.hxx>
#include <BRepFill_Edge3DLaw.hxx>
#include <BRepFill_ACRLaw.hxx>
#include <BRepFill_EdgeOnSurfLaw.hxx>
#include <BRepFill_ShapeLaw.hxx>
#include <BRepFill_CompatibleWires.hxx>
#include <BRepFill_NSections.hxx>
#include <BRepFill_DataMapOfShapeHArray2OfShape.hxx>
#include <TColStd_HArray1OfReal.hxx>
#include <GeomFill_TrihedronLaw.hxx>
#include <GeomAdaptor_HCurve.hxx>
#include <GeomAdaptor_HSurface.hxx>
#include <GeomFill_ConstantBiNormal.hxx>
#include <GeomFill_CorrectedFrenet.hxx>
#include <GeomFill_Frenet.hxx>
#include <GeomFill_CurveAndTrihedron.hxx>
#include <GeomFill_DiscreteTrihedron.hxx>
#include <GeomFill_Fixed.hxx>
#include <GeomFill_ConstantBiNormal.hxx>
#include <GeomFill_SectionLaw.hxx>
#include <GeomFill_CurveAndTrihedron.hxx>
#include <GeomFill_Frenet.hxx>
#include <GeomFill_GuideTrihedronAC.hxx>
#include <GeomFill_GuideTrihedronPlan.hxx>
#include <GeomFill_LocationGuide.hxx>
//Specification Guide
#include <GeomAdaptor_HCurve.hxx>
#include <gp_Trsf.hxx>
#include <GeomFill_SectionLaw.hxx>
#include <GeomFill_TrihedronLaw.hxx>
#include <gp_Ax2.hxx>
#include <gp_Dir.hxx>
#include <gp_Trsf.hxx>
#include <gp_Vec.hxx>
#include <Precision.hxx>
#include <Standard_NotImplemented.hxx>
#include <Standard_ConstructionError.hxx>
#include <StdFail_NotDone.hxx>
#include <BRepBuilderAPI_Copy.hxx>
#include <BRepBuilderAPI_Transform.hxx>
#include <GProp_GProps.hxx>
#include <BRepGProp.hxx>
#include <GeomAdaptor_HSurface.hxx>
#include <IntCurveSurface_HInter.hxx>
#include <IntCurveSurface_IntersectionPoint.hxx>
#include <TColgp_HArray1OfPnt2d.hxx>
#include <Law_Function.hxx>
#include <Law_Interpol.hxx>
#include <Precision.hxx>
#include <Standard_ConstructionError.hxx>
#include <Standard_DomainError.hxx>
#include <Standard_NotImplemented.hxx>
#include <Standard_Type.hxx>
#include <StdFail_NotDone.hxx>
#include <TColgp_HArray1OfPnt2d.hxx>
#include <TColStd_HArray1OfReal.hxx>
#include <TopExp.hxx>
#include <TopLoc_Location.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Shell.hxx>
#include <TopoDS_Solid.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Wire.hxx>
#include <TopTools_SequenceOfShape.hxx>
#include <stdio.h>
//Specification Guide
#ifdef DRAW
#include <Draw.hxx>
#include <DrawTrSurf.hxx>

View File

@@ -0,0 +1,244 @@
// Created on: 1998-07-22
// Created by: Philippe MANGIN
// 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 _BRepFill_PipeShell_HeaderFile
#define _BRepFill_PipeShell_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <TopoDS_Wire.hxx>
#include <TopoDS_Shape.hxx>
#include <BRepFill_SequenceOfSection.hxx>
#include <TopTools_DataMapOfShapeListOfShape.hxx>
#include <Standard_Real.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Boolean.hxx>
#include <TopTools_HArray2OfShape.hxx>
#include <GeomFill_Trihedron.hxx>
#include <BRepFill_TransitionStyle.hxx>
#include <GeomFill_PipeError.hxx>
#include <MMgt_TShared.hxx>
#include <BRepFill_TypeOfContact.hxx>
#include <TopTools_ListOfShape.hxx>
class Law_Function;
class BRepFill_LocationLaw;
class BRepFill_SectionLaw;
class Standard_DomainError;
class StdFail_NotDone;
class TopoDS_Wire;
class gp_Ax2;
class gp_Dir;
class TopoDS_Shape;
class TopoDS_Vertex;
class BRepFill_Section;
class gp_Trsf;
class BRepFill_Sweep;
class BRepFill_PipeShell;
DEFINE_STANDARD_HANDLE(BRepFill_PipeShell, MMgt_TShared)
//! Computes a topological shell using some wires
//! (spines and profiles) and diplacement option
//! Perform general sweeping construction
class BRepFill_PipeShell : public MMgt_TShared
{
public:
//! Set an sweep's mode
//! If no mode are setted, the mode use in MakePipe is used
Standard_EXPORT BRepFill_PipeShell(const TopoDS_Wire& Spine);
//! Set an Frenet or an CorrectedFrenet trihedron
//! to perform the sweeping
Standard_EXPORT void Set (const Standard_Boolean Frenet = Standard_False);
//! Set a Discrete trihedron
//! to perform the sweeping
Standard_EXPORT void SetDiscrete();
//! Set an fixed trihedron to perform the sweeping
//! all sections will be parallel.
Standard_EXPORT void Set (const gp_Ax2& Axe);
//! Set an fixed BiNormal direction to perform
//! the sweeping
Standard_EXPORT void Set (const gp_Dir& BiNormal);
//! Set support to the spine to define the BiNormal
//! at the spine, like the normal the surfaces.
//! Warning: To be effective, Each edge of the <spine> must
//! have an representaion on one face of<SpineSupport>
Standard_EXPORT Standard_Boolean Set (const TopoDS_Shape& SpineSupport);
//! Set an auxiliary spine to define the Normal
//! For each Point of the Spine P, an Point Q is evalued
//! on <AuxiliarySpine>
//! If <CurvilinearEquivalence>
//! Q split <AuxiliarySpine> with the same length ratio
//! than P split <Spline>.
//! Else the plan define by P and the tangent to the <Spine>
//! intersect <AuxiliarySpine> in Q.
//! If <KeepContact> equals BRepFill_NoContact: The Normal is defined
//! by the vector PQ.
//! If <KeepContact> equals BRepFill_Contact: The Normal is defined to
//! achieve that the sweeped section is in contact to the
//! auxiliarySpine. The width of section is constant all along the path.
//! In other words, the auxiliary spine lies on the swept surface,
//! but not necessarily is a boundary of this surface. However,
//! the auxiliary spine has to be close enough to the main spine
//! to provide intersection with any section all along the path.
//! If <KeepContact> equals BRepFill_ContactOnBorder: The auxiliary spine
//! becomes a boundary of the swept surface and the width of section varies
//! along the path.
Standard_EXPORT void Set (const TopoDS_Wire& AuxiliarySpine, const Standard_Boolean CurvilinearEquivalence = Standard_True, const BRepFill_TypeOfContact KeepContact = BRepFill_NoContact);
//! Define the maximum V degree of resulting surface
Standard_EXPORT void SetMaxDegree (const Standard_Integer NewMaxDegree);
//! Define the maximum number of spans in V-direction
//! on resulting surface
Standard_EXPORT void SetMaxSegments (const Standard_Integer NewMaxSegments);
//! Set the flag that indicates attempt to approximate
//! a C1-continuous surface if a swept surface proved
//! to be C0.
//! Give section to sweep.
//! Possibilities are :
//! - Give one or sevral profile
//! - Give one profile and an homotetic law.
//! - Automatic compute of correspondance beetween profile, and section
//! on the sweeped shape
//! - correspondance beetween profile, and section on the sweeped shape
//! defined by a vertex of the spine
Standard_EXPORT void SetForceApproxC1 (const Standard_Boolean ForceApproxC1);
//! Set an section. The corespondance with the spine, will
//! be automaticaly performed.
Standard_EXPORT void Add (const TopoDS_Shape& Profile, const Standard_Boolean WithContact = Standard_False, const Standard_Boolean WithCorrection = Standard_False);
//! Set an section. The corespondance with the spine, is
//! given by <Location>
Standard_EXPORT void Add (const TopoDS_Shape& Profile, const TopoDS_Vertex& Location, const Standard_Boolean WithContact = Standard_False, const Standard_Boolean WithCorrection = Standard_False);
//! Set an section and an homotetic law.
//! The homotetie's centers is given by point on the <Spine>.
Standard_EXPORT void SetLaw (const TopoDS_Shape& Profile, const Handle(Law_Function)& L, const Standard_Boolean WithContact = Standard_False, const Standard_Boolean WithCorrection = Standard_False);
//! Set an section and an homotetic law.
//! The homotetie center is given by point on the <Spine>
Standard_EXPORT void SetLaw (const TopoDS_Shape& Profile, const Handle(Law_Function)& L, const TopoDS_Vertex& Location, const Standard_Boolean WithContact = Standard_False, const Standard_Boolean WithCorrection = Standard_False);
//! Delete an section.
Standard_EXPORT void Delete (const TopoDS_Shape& Profile);
//! Say if <me> is ready to build the shape
//! return False if <me> do not have section definition
Standard_EXPORT Standard_Boolean IsReady() const;
//! Get a status, when Simulate or Build failed.
Standard_EXPORT GeomFill_PipeError GetStatus() const;
Standard_EXPORT void SetTolerance (const Standard_Real Tol3d = 1.0e-4, const Standard_Real BoundTol = 1.0e-4, const Standard_Real TolAngular = 1.0e-2);
//! Set the Transition Mode to manage discontinuities
//! on the sweep.
Standard_EXPORT void SetTransition (const BRepFill_TransitionStyle Mode = BRepFill_Modified, const Standard_Real Angmin = 1.0e-2, const Standard_Real Angmax = 6.0);
//! Perform simulation of the sweep :
//! Somes Section are returned.
Standard_EXPORT void Simulate (const Standard_Integer NumberOfSection, TopTools_ListOfShape& Sections);
//! Builds the resulting shape (redefined from MakeShape).
Standard_EXPORT Standard_Boolean Build();
//! Transform the sweeping Shell in Solid.
//! If the section are not closed returns False
Standard_EXPORT Standard_Boolean MakeSolid();
//! Returns the result Shape.
Standard_EXPORT const TopoDS_Shape& Shape() const;
Standard_EXPORT Standard_Real ErrorOnSurface() const;
//! Returns the TopoDS Shape of the bottom of the sweep.
Standard_EXPORT const TopoDS_Shape& FirstShape() const;
//! Returns the TopoDS Shape of the top of the sweep.
Standard_EXPORT const TopoDS_Shape& LastShape() const;
//! Returns the list of shapes generated from the
//! shape <S>.
Standard_EXPORT void Generated (const TopoDS_Shape& S, TopTools_ListOfShape& L);
DEFINE_STANDARD_RTTI(BRepFill_PipeShell,MMgt_TShared)
protected:
private:
Standard_EXPORT void Prepare();
Standard_EXPORT void Place (const BRepFill_Section& Sec, TopoDS_Wire& W, gp_Trsf& Trsf, Standard_Real& param);
Standard_EXPORT void ResetLoc();
Standard_EXPORT void BuildHistory (const BRepFill_Sweep& theSweep);
TopoDS_Wire mySpine;
TopoDS_Shape myFirst;
TopoDS_Shape myLast;
TopoDS_Shape myShape;
BRepFill_SequenceOfSection mySeq;
TopTools_DataMapOfShapeListOfShape myGenMap;
Standard_Real myTol3d;
Standard_Real myBoundTol;
Standard_Real myTolAngular;
Standard_Real angmin;
Standard_Real angmax;
Standard_Integer myMaxDegree;
Standard_Integer myMaxSegments;
Standard_Boolean myForceApproxC1;
Handle(Law_Function) myLaw;
Standard_Boolean myIsAutomaticLaw;
Handle(BRepFill_LocationLaw) myLocation;
Handle(BRepFill_SectionLaw) mySection;
Handle(TopTools_HArray2OfShape) myFaces;
GeomFill_Trihedron myTrihedron;
BRepFill_TransitionStyle myTransition;
GeomFill_PipeError myStatus;
Standard_Real myErrorOnSurf;
};
#endif // _BRepFill_PipeShell_HeaderFile

View File

@@ -1,66 +0,0 @@
-- Created on: 1998-07-22
-- Created by: Philippe MANGIN
-- 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.
private class Section from BRepFill
---Purpose: To store section definition
uses
Shape from TopoDS,
Wire from TopoDS,
Vertex from TopoDS
is
Create returns Section from BRepFill;
Create (Profile : Shape from TopoDS;
V : Vertex from TopoDS;
WithContact : Boolean ;
WithCorrection : Boolean)
returns Section from BRepFill;
Set(me : in out; IsLaw : Boolean);
Wire(me)
---C++: return const &
---C++: inline
returns Wire from TopoDS;
Vertex(me)
---C++: return const &
---C++: inline
returns Vertex from TopoDS;
IsLaw(me)
---C++: inline
returns Boolean;
WithContact(me)
---C++: inline
returns Boolean;
WithCorrection(me)
---C++: inline
returns Boolean;
fields
wire : Wire from TopoDS;
vertex : Vertex from TopoDS;
islaw : Boolean;
contact : Boolean;
correction:Boolean;
end Section;

View File

@@ -14,12 +14,14 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BRepFill_Section.ixx>
#include <TopoDS.hxx>
#include <BRep_Builder.hxx>
#include <BRepFill_Section.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Wire.hxx>
BRepFill_Section::BRepFill_Section() :islaw(0), contact(0), correction(0)
{

View File

@@ -0,0 +1,85 @@
// Created on: 1998-07-22
// Created by: Philippe MANGIN
// 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 _BRepFill_Section_HeaderFile
#define _BRepFill_Section_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <TopoDS_Wire.hxx>
#include <TopoDS_Vertex.hxx>
#include <Standard_Boolean.hxx>
class TopoDS_Shape;
class TopoDS_Vertex;
class TopoDS_Wire;
//! To store section definition
class BRepFill_Section
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT BRepFill_Section();
Standard_EXPORT BRepFill_Section(const TopoDS_Shape& Profile, const TopoDS_Vertex& V, const Standard_Boolean WithContact, const Standard_Boolean WithCorrection);
Standard_EXPORT void Set (const Standard_Boolean IsLaw);
const TopoDS_Wire& Wire() const;
const TopoDS_Vertex& Vertex() const;
Standard_Boolean IsLaw() const;
Standard_Boolean WithContact() const;
Standard_Boolean WithCorrection() const;
protected:
private:
TopoDS_Wire wire;
TopoDS_Vertex vertex;
Standard_Boolean islaw;
Standard_Boolean contact;
Standard_Boolean correction;
};
#include <BRepFill_Section.lxx>
#endif // _BRepFill_Section_HeaderFile

View File

@@ -1,86 +0,0 @@
-- Created on: 1998-01-07
-- Created by: Philippe MANGIN
-- 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.
deferred class SectionLaw from BRepFill inherits TShared from MMgt
---Purpose: Build Section Law, with an Vertex, or an Wire
---Level: Advanced
uses
SectionLaw from GeomFill,
HArray1OfSectionLaw from GeomFill,
Shape from GeomAbs,
Shape from TopoDS,
Wire from TopoDS,
Edge from TopoDS,
Vertex from TopoDS,
WireExplorer from BRepTools
is
NbLaw(me) returns Integer;
Law(me; Index : Integer)
---C++: return const &
returns SectionLaw from GeomFill;
IsConstant(me) returns Boolean
is deferred;
IsUClosed(me) returns Boolean;
IsVClosed(me) returns Boolean;
IsVertex(me)
---Purpose: Say if the input sahpe is a vertex.
returns Boolean
is deferred;
ConcatenedLaw(me)
returns SectionLaw from GeomFill
is deferred;
Continuity(me; Index : Integer;
TolAngular : Real)
returns Shape from GeomAbs
is deferred;
VertexTol(me; Index : Integer;
Param : Real)
returns Real
is deferred;
Vertex(me; Index : Integer;
Param : Real)
returns Vertex from TopoDS
is deferred;
D0(me:mutable; U : Real;
S : out Shape from TopoDS)
is deferred;
Init(me: mutable; W : Wire from TopoDS);
CurrentEdge(me : mutable)
returns Edge from TopoDS;
fields
myLaws : HArray1OfSectionLaw from GeomFill is protected;
uclosed : Boolean from Standard is protected;
vclosed : Boolean from Standard is protected;
myIterator : WireExplorer from BRepTools;
end SectionLaw;

View File

@@ -14,29 +14,29 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BRepFill_SectionLaw.ixx>
#include <BRepTools_WireExplorer.hxx>
#include <BRep_Tool.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <BRepFill_SectionLaw.hxx>
#include <BRepLProp.hxx>
#include <TopExp.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Vertex.hxx>
#include <BRepTools_WireExplorer.hxx>
#include <Geom_BSplineCurve.hxx>
#include <Geom_Curve.hxx>
#include <Geom_Line.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <Geom_BSplineCurve.hxx>
#include <GeomFill_SectionLaw.hxx>
#include <GeomFill_UniformSection.hxx>
#include <TColgp_HArray1OfPnt.hxx>
#include <TColStd_HArray1OfReal.hxx>
#include <TColStd_HArray1OfInteger.hxx>
#include <Precision.hxx>
#include <Standard_Type.hxx>
#include <TColgp_HArray1OfPnt.hxx>
#include <TColStd_HArray1OfInteger.hxx>
#include <TColStd_HArray1OfReal.hxx>
#include <TopExp.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Wire.hxx>
//=======================================================================
//function : NbLaw

View File

@@ -0,0 +1,101 @@
// Created on: 1998-01-07
// Created by: Philippe MANGIN
// 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 _BRepFill_SectionLaw_HeaderFile
#define _BRepFill_SectionLaw_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <GeomFill_HArray1OfSectionLaw.hxx>
#include <Standard_Boolean.hxx>
#include <BRepTools_WireExplorer.hxx>
#include <MMgt_TShared.hxx>
#include <Standard_Integer.hxx>
#include <GeomAbs_Shape.hxx>
#include <Standard_Real.hxx>
class GeomFill_SectionLaw;
class TopoDS_Vertex;
class TopoDS_Shape;
class TopoDS_Wire;
class TopoDS_Edge;
class BRepFill_SectionLaw;
DEFINE_STANDARD_HANDLE(BRepFill_SectionLaw, MMgt_TShared)
//! Build Section Law, with an Vertex, or an Wire
class BRepFill_SectionLaw : public MMgt_TShared
{
public:
Standard_EXPORT Standard_Integer NbLaw() const;
Standard_EXPORT const Handle(GeomFill_SectionLaw)& Law (const Standard_Integer Index) const;
Standard_EXPORT virtual Standard_Boolean IsConstant() const = 0;
Standard_EXPORT Standard_Boolean IsUClosed() const;
Standard_EXPORT Standard_Boolean IsVClosed() const;
//! Say if the input sahpe is a vertex.
Standard_EXPORT virtual Standard_Boolean IsVertex() const = 0;
Standard_EXPORT virtual Handle(GeomFill_SectionLaw) ConcatenedLaw() const = 0;
Standard_EXPORT virtual GeomAbs_Shape Continuity (const Standard_Integer Index, const Standard_Real TolAngular) const = 0;
Standard_EXPORT virtual Standard_Real VertexTol (const Standard_Integer Index, const Standard_Real Param) const = 0;
Standard_EXPORT virtual TopoDS_Vertex Vertex (const Standard_Integer Index, const Standard_Real Param) const = 0;
Standard_EXPORT virtual void D0 (const Standard_Real U, TopoDS_Shape& S) = 0;
Standard_EXPORT void Init (const TopoDS_Wire& W);
Standard_EXPORT TopoDS_Edge CurrentEdge();
DEFINE_STANDARD_RTTI(BRepFill_SectionLaw,MMgt_TShared)
protected:
Handle(GeomFill_HArray1OfSectionLaw) myLaws;
Standard_Boolean uclosed;
Standard_Boolean vclosed;
private:
BRepTools_WireExplorer myIterator;
};
#endif // _BRepFill_SectionLaw_HeaderFile

View File

@@ -1,61 +0,0 @@
-- Created on: 1998-02-11
-- Created by: Philippe MANGIN
-- 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.
private class SectionPlacement from BRepFill
---Purpose: Place a shape in a local axis coordinate
uses
LocationLaw from BRepFill,
Shape from TopoDS,
Trsf from gp
is
Create(Law : LocationLaw from BRepFill;
Section : Shape from TopoDS;
WithContact : Boolean = Standard_False;
WithCorrection : Boolean = Standard_False)
---Purpose: Automatic placement
returns SectionPlacement from BRepFill;
Create(Law : LocationLaw from BRepFill;
Section : Shape from TopoDS;
Vertex : Shape from TopoDS;
WithContact : Boolean = Standard_False;
WithCorrection : Boolean = Standard_False)
---Purpose: Placement on vertex
returns SectionPlacement from BRepFill;
Perform(me:in out;
WithContact : Boolean;
WithCorrection : Boolean;
Vertex : Shape from TopoDS)
is private;
Transformation(me)
---C++: return const &
returns Trsf from gp;
AbscissaOnPath(me:in out)
returns Real;
fields
myLaw : LocationLaw from BRepFill;
mySection : Shape from TopoDS;
myTrsf : Trsf from gp;
myParam : Real;
myIndex : Integer;
end SectionPlacement;

View File

@@ -14,35 +14,36 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BRepFill_SectionPlacement.ixx>
#include <TopExp_Explorer.hxx>
#include <TopExp.hxx>
#include <TopAbs_ShapeEnum.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopoDS.hxx>
#include <BRep_Tool.hxx>
#include <BRepAdaptor_HCurve.hxx>
#include <BRepAdaptor_HCompCurve.hxx>
#include <BRepAdaptor_HCurve.hxx>
#include <BRepExtrema_DistShapeShape.hxx>
#include <BRepExtrema_SupportType.hxx>
#include <Geom_Curve.hxx>
#include <Geom_CartesianPoint.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <Geom_Line.hxx>
#include <BRepFill_LocationLaw.hxx>
#include <BRepFill_SectionPlacement.hxx>
#include <Geom_BSplineCurve.hxx>
#include <GeomConvert_CompCurveToBSplineCurve.hxx>
#include <Geom_CartesianPoint.hxx>
#include <Geom_Curve.hxx>
#include <Geom_Line.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <GeomAdaptor_HCurve.hxx>
#include <GeomFill_SectionPlacement.hxx>
#include <GeomConvert_CompCurveToBSplineCurve.hxx>
#include <GeomFill_LocationLaw.hxx>
#include <GeomFill_SectionPlacement.hxx>
#include <gp_Trsf.hxx>
#include <Precision.hxx>
#include <Standard_ConstructionError.hxx>
#include <Standard_NotImplemented.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <TColStd_Array1OfInteger.hxx>
#include <Precision.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <TopAbs_ShapeEnum.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Vertex.hxx>
#ifdef OCCT_DEBUG
static Standard_Boolean myDebug = Standard_False;

View File

@@ -0,0 +1,82 @@
// Created on: 1998-02-11
// Created by: Philippe MANGIN
// 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 _BRepFill_SectionPlacement_HeaderFile
#define _BRepFill_SectionPlacement_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <TopoDS_Shape.hxx>
#include <gp_Trsf.hxx>
#include <Standard_Real.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Boolean.hxx>
class BRepFill_LocationLaw;
class TopoDS_Shape;
class gp_Trsf;
//! Place a shape in a local axis coordinate
class BRepFill_SectionPlacement
{
public:
DEFINE_STANDARD_ALLOC
//! Automatic placement
Standard_EXPORT BRepFill_SectionPlacement(const Handle(BRepFill_LocationLaw)& Law, const TopoDS_Shape& Section, const Standard_Boolean WithContact = Standard_False, const Standard_Boolean WithCorrection = Standard_False);
//! Placement on vertex
Standard_EXPORT BRepFill_SectionPlacement(const Handle(BRepFill_LocationLaw)& Law, const TopoDS_Shape& Section, const TopoDS_Shape& Vertex, const Standard_Boolean WithContact = Standard_False, const Standard_Boolean WithCorrection = Standard_False);
Standard_EXPORT const gp_Trsf& Transformation() const;
Standard_EXPORT Standard_Real AbscissaOnPath();
protected:
private:
Standard_EXPORT void Perform (const Standard_Boolean WithContact, const Standard_Boolean WithCorrection, const TopoDS_Shape& Vertex);
Handle(BRepFill_LocationLaw) myLaw;
TopoDS_Shape mySection;
gp_Trsf myTrsf;
Standard_Real myParam;
Standard_Integer myIndex;
};
#endif // _BRepFill_SectionPlacement_HeaderFile

View File

@@ -1,96 +0,0 @@
-- Created on: 1998-08-17
-- Created by: Philippe MANGIN
-- 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 ShapeLaw from BRepFill inherits SectionLaw from BRepFill
---Purpose: Build Section Law, with an Vertex, or an Wire
---Level: Advanced
uses
SectionLaw from GeomFill,
HArray1OfSectionLaw from GeomFill,
HArray1OfShape from TopTools,
Shape from GeomAbs,
Vertex from TopoDS,
Wire from TopoDS,
Edge from TopoDS,
Shape from TopoDS,
Function from Law
is
Create (V: Vertex from TopoDS;
Build : Boolean = Standard_True )
---Purpose: Construct an constant Law
returns ShapeLaw from BRepFill;
Create (W:Wire from TopoDS;
Build : Boolean = Standard_True)
---Purpose: Construct an constant Law
returns ShapeLaw from BRepFill;
Create (W: Wire from TopoDS;
L: Function from Law;
Build : Boolean = Standard_True)
---Purpose: Construct an evolutive Law
returns ShapeLaw from BRepFill;
IsVertex(me)
---Purpose: Say if the input shape is a vertex.
returns Boolean
is redefined;
IsConstant(me)
---Purpose: Say if the Law is Constant.
returns Boolean
is redefined;
ConcatenedLaw(me)
---Purpose: Give the law build on a concaneted section
returns SectionLaw from GeomFill
is redefined;
Continuity(me; Index : Integer;
TolAngular : Real)
returns Shape from GeomAbs
is redefined;
VertexTol(me; Index : Integer;
Param : Real)
returns Real
is redefined;
Vertex(me; Index : Integer;
Param : Real)
returns Vertex from TopoDS
is redefined;
D0(me:mutable; Param : Real;
S : out Shape from TopoDS)
is redefined;
Edge(me; Index : Integer)
---C++: return const &
---C++: inline
returns Edge from TopoDS;
Init(me : mutable; B : Boolean) is private;
fields
myShape: Shape from TopoDS;
myEdges: HArray1OfShape from TopTools;
TheLaw : Function from Law;
vertex : Boolean from Standard is protected;
end ShapeLaw;

View File

@@ -14,32 +14,34 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BRepFill_ShapeLaw.ixx>
#include <BRepTools_WireExplorer.hxx>
#include <BRep_Tool.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <BRepBuilderAPI_Transform.hxx>
#include <BRepFill_ShapeLaw.hxx>
#include <BRepLProp.hxx>
#include <TopExp.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Vertex.hxx>
#include <BRepTools_WireExplorer.hxx>
#include <Geom_BSplineCurve.hxx>
#include <Geom_Curve.hxx>
#include <Geom_Line.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <Geom_BSplineCurve.hxx>
#include <GeomFill_UniformSection.hxx>
#include <GeomConvert_CompCurveToBSplineCurve.hxx>
#include <GeomFill_EvolvedSection.hxx>
#include <GeomFill_HArray1OfSectionLaw.hxx>
#include <GeomConvert_CompCurveToBSplineCurve.hxx>
#include <TColgp_HArray1OfPnt.hxx>
#include <TColStd_HArray1OfReal.hxx>
#include <TColStd_HArray1OfInteger.hxx>
#include <GeomFill_SectionLaw.hxx>
#include <GeomFill_UniformSection.hxx>
#include <Law_Function.hxx>
#include <Precision.hxx>
#include <BRepBuilderAPI_Transform.hxx>
#include <Standard_Type.hxx>
#include <TColgp_HArray1OfPnt.hxx>
#include <TColStd_HArray1OfInteger.hxx>
#include <TColStd_HArray1OfReal.hxx>
#include <TopExp.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Wire.hxx>
//=======================================================================
//function : Create

View File

@@ -0,0 +1,106 @@
// Created on: 1998-08-17
// Created by: Philippe MANGIN
// 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 _BRepFill_ShapeLaw_HeaderFile
#define _BRepFill_ShapeLaw_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <TopoDS_Shape.hxx>
#include <TopTools_HArray1OfShape.hxx>
#include <Standard_Boolean.hxx>
#include <BRepFill_SectionLaw.hxx>
#include <GeomAbs_Shape.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Real.hxx>
class Law_Function;
class TopoDS_Vertex;
class TopoDS_Wire;
class GeomFill_SectionLaw;
class TopoDS_Shape;
class TopoDS_Edge;
class BRepFill_ShapeLaw;
DEFINE_STANDARD_HANDLE(BRepFill_ShapeLaw, BRepFill_SectionLaw)
//! Build Section Law, with an Vertex, or an Wire
class BRepFill_ShapeLaw : public BRepFill_SectionLaw
{
public:
//! Construct an constant Law
Standard_EXPORT BRepFill_ShapeLaw(const TopoDS_Vertex& V, const Standard_Boolean Build = Standard_True);
//! Construct an constant Law
Standard_EXPORT BRepFill_ShapeLaw(const TopoDS_Wire& W, const Standard_Boolean Build = Standard_True);
//! Construct an evolutive Law
Standard_EXPORT BRepFill_ShapeLaw(const TopoDS_Wire& W, const Handle(Law_Function)& L, const Standard_Boolean Build = Standard_True);
//! Say if the input shape is a vertex.
Standard_EXPORT virtual Standard_Boolean IsVertex() const Standard_OVERRIDE;
//! Say if the Law is Constant.
Standard_EXPORT virtual Standard_Boolean IsConstant() const Standard_OVERRIDE;
//! Give the law build on a concaneted section
Standard_EXPORT virtual Handle(GeomFill_SectionLaw) ConcatenedLaw() const Standard_OVERRIDE;
Standard_EXPORT virtual GeomAbs_Shape Continuity (const Standard_Integer Index, const Standard_Real TolAngular) const Standard_OVERRIDE;
Standard_EXPORT virtual Standard_Real VertexTol (const Standard_Integer Index, const Standard_Real Param) const Standard_OVERRIDE;
Standard_EXPORT virtual TopoDS_Vertex Vertex (const Standard_Integer Index, const Standard_Real Param) const Standard_OVERRIDE;
Standard_EXPORT virtual void D0 (const Standard_Real Param, TopoDS_Shape& S) Standard_OVERRIDE;
const TopoDS_Edge& Edge (const Standard_Integer Index) const;
DEFINE_STANDARD_RTTI(BRepFill_ShapeLaw,BRepFill_SectionLaw)
protected:
Standard_Boolean vertex;
private:
Standard_EXPORT void Init (const Standard_Boolean B);
TopoDS_Shape myShape;
Handle(TopTools_HArray1OfShape) myEdges;
Handle(Law_Function) TheLaw;
};
#include <BRepFill_ShapeLaw.lxx>
#endif // _BRepFill_ShapeLaw_HeaderFile

View File

@@ -1,204 +0,0 @@
-- Created on: 1997-11-21
-- Created by: Philippe MANGIN
-- Copyright (c) 1997-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 Sweep from BRepFill
---Purpose: Topological Sweep Algorithm
-- Computes an Sweep shell using a generating
-- wire, an SectionLaw and an LocationLaw.
---Level: Advanced
uses
SectionLaw from BRepFill,
LocationLaw from BRepFill,
ApproxStyle from GeomFill,
TransitionStyle from BRepFill,
HCurve from Adaptor3d,
Shape from GeomAbs,
HArray2OfShape from TopTools,
ListOfShape from TopTools,
DataMapOfShapeShape from TopTools,
MapOfShape from TopTools,
DataMapOfShapeHArray2OfShape from BRepFill,
Wire from TopoDS,
Edge from TopoDS,
Shape from TopoDS,
Trsf from gp
raises
NotDone,
OutOfRange,
ConstructionError
is
Create(Section : SectionLaw from BRepFill;
Location : LocationLaw from BRepFill;
WithKPart: Boolean)
returns Sweep from BRepFill;
SetBounds(me : in out;
FirstShape, LastShape : Wire from TopoDS);
SetTolerance(me : in out;
Tol3d : Real;
BoundTol : Real = 1.0;
Tol2d : Real = 1.0e-5;
TolAngular : Real = 1.0e-2);
---Purpose: Set Approximation Tolerance
-- Tol3d : Tolerance to surface approximation
-- Tol2d : Tolerance used to perform curve approximation
-- Normaly the 2d curve are approximated with a
-- tolerance given by the resolution on support surfaces,
-- but if this tolerance is too large Tol2d is used.
-- TolAngular : Tolerance (in radian) to control the angle
-- beetween tangents on the section law and
-- tangent of iso-v on approximed surface
SetAngularControl(me: in out;
AngleMin : Real = 0.01;
AngleMax : Real = 6.0)
---Purpose: Tolerance To controle Corner management.
--
-- If the discontinuity is lesser than <AngleMin> in radian The
-- Transition Performed will be alway "Modified"
--
-- If the discontinuity is greater than <AngleMax> in radian The
-- Transition "Round" replace the Transition "Right"
is static;
SetForceApproxC1(me: in out;
ForceApproxC1 : Boolean from Standard);
---Purpose: Set the flag that indicates attempt to approximate
-- a C1-continuous surface if a swept surface proved
-- to be C0.
Build(me : in out;
ReversedEdges : in out MapOfShape from TopTools;
Tapes : in out DataMapOfShapeHArray2OfShape from BRepFill;
Rails : in out DataMapOfShapeHArray2OfShape from BRepFill;
Transition : TransitionStyle = BRepFill_Modified;
Continuity : Shape from GeomAbs = GeomAbs_C2;
Approx : ApproxStyle = GeomFill_Location;
Degmax : Integer = 11;
Segmax : Integer = 30);
---Purpose: Build the Sweeep Surface
-- Transition define Transition strategy
-- Approx define Approximation Strategy
-- - GeomFill_Section : The composed Function Location X Section
-- is directly approximed.
-- - GeomFill_Location : The location law is approximed, and the
-- SweepSurface is bulid algebric composition
-- of approximed location law and section law
-- This option is Ok, if Section.Surface() methode
-- is effective.
-- Continuity : The continuity in v waiting on the surface
-- Degmax : The maximum degree in v requiered on the surface
-- Segmax : The maximum number of span in v requiered on
-- the surface.
CorrectApproxParameters(me: in out)
returns Boolean is private;
BuildWire(me : in out;
Transition : TransitionStyle)
returns Boolean is private;
BuildShell(me : in out;
Transition : TransitionStyle;
Vf, Vl : Integer;
ReversedEdges : in out MapOfShape from TopTools;
Tapes : in out DataMapOfShapeHArray2OfShape from BRepFill;
Rails : in out DataMapOfShapeHArray2OfShape from BRepFill;
ExtendFirst : Real = 0.0;
ExtendLast : Real = 0.0)
returns Boolean is private;
IsDone(me)
---Purpose: Say if the Shape is Build.
returns Boolean;
Shape(me)
---Purpose: returns the Sweeping Shape
returns Shape from TopoDS;
ErrorOnSurface(me)
---Purpose: Get the Approximation error.
returns Real;
SubShape(me)
returns HArray2OfShape from TopTools;
InterFaces(me)
returns HArray2OfShape from TopTools;
Sections(me)
returns HArray2OfShape from TopTools;
PerformCorner(me : in out; Index : Integer;
Transition : TransitionStyle;
Bounds : HArray2OfShape from TopTools)
is private;
EvalExtrapol(me; Index : Integer;
Transition : TransitionStyle)
returns Real
is private;
MergeVertex(me;
V1 : Shape from TopoDS;
V2 : in out Shape from TopoDS)
returns Boolean is private;
UpdateVertex(me; Ipath, Isec : Integer;
Error, Param : Real;
V : in out Shape from TopoDS)
is private;
RebuildTopOrBottomEdge(me; aNewEdge: Edge from TopoDS;
anEdge: in out Edge from TopoDS;
ReversedEdges: in out MapOfShape from TopTools)
is private;
fields
isDone : Boolean;
KPart : Boolean;
myTol3d : Real;
myBoundTol : Real;
myTol2d : Real;
myTolAngular : Real;
myAngMin : Real;
myAngMax : Real;
myApproxStyle : ApproxStyle from GeomFill;
myContinuity : Shape from GeomAbs;
myDegmax : Integer;
mySegmax : Integer;
myForceApproxC1 : Boolean;
myShape : Shape from TopoDS;
myLoc : LocationLaw from BRepFill;
mySec : SectionLaw from BRepFill;
myUEdges : HArray2OfShape from TopTools;
myVEdges : HArray2OfShape from TopTools;
myVEdgesModified : DataMapOfShapeShape from TopTools;
myFaces : HArray2OfShape from TopTools;
myAuxShape : ListOfShape from TopTools;
Error : Real;
FirstShape,
LastShape : Wire from TopoDS;
end Sweep;

View File

@@ -14,106 +14,96 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <stdio.h>
#include <BRepFill_Sweep.ixx>
#include <BRepFill_SectionLaw.hxx>
//#include <BRepFill_TrimCorner.hxx>
#include <BRepFill_CurveConstraint.hxx>
#include <GeomFill_SectionLaw.hxx>
#include <GeomFill_LocationLaw.hxx>
#include <GeomFill_Sweep.hxx>
// modified by NIZHNY-MKK Wed Oct 22 12:25:45 2003
#include <BRepFill_TrimShellCorner.hxx>
//#include <GeomPlate_BuildPlateSurface.hxx>
//#include <GeomPlate_Surface.hxx>
//#include <GeomPlate_PointConstraint.hxx>
#include <gp_Pnt2d.hxx>
#include <gp_Vec2d.hxx>
#include <Adaptor3d_HCurveOnSurface.hxx>
#include <Approx_CurveOnSurface.hxx>
#include <Approx_SameParameter.hxx>
#include <Bnd_Box.hxx>
#include <Geom_Surface.hxx>
#include <Geom_SurfaceOfRevolution.hxx>
#include <Geom_RectangularTrimmedSurface.hxx>
#include <Geom_Plane.hxx>
#include <Geom_Curve.hxx>
#include <Geom_BezierCurve.hxx>
#include <Geom_BSplineCurve.hxx>
#include <Geom2d_Line.hxx>
#include <Geom2d_BSplineCurve.hxx>
#include <Geom2d_TrimmedCurve.hxx>
#include <GeomLib.hxx>
#include <GeomLib_IsPlanarSurface.hxx>
#include <BRepLib_FindSurface.hxx>
#include <GeomConvert_ApproxSurface.hxx>
#include <BRep_Builder.hxx>
#include <BRep_CurveRepresentation.hxx>
#include <BRep_GCurve.hxx>
#include <BRep_ListIteratorOfListOfCurveRepresentation.hxx>
#include <BRep_TEdge.hxx>
#include <BRep_Tool.hxx>
#include <BRep_TVertex.hxx>
#include <BRepAdaptor_HCurve.hxx>
#include <BRepAdaptor_HCurve2d.hxx>
#include <BRepAdaptor_HSurface.hxx>
#include <Adaptor3d_HCurveOnSurface.hxx>
#include <GeomAdaptor_HSurface.hxx>
#include <GeomAdaptor_HCurve.hxx>
#include <Geom2dAdaptor_HCurve.hxx>
#include <Approx_CurveOnSurface.hxx>
#include <Approx_SameParameter.hxx>
#include <GCPnts_AbscissaPoint.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <BRep_ListIteratorOfListOfCurveRepresentation.hxx>
#include <BRep_TEdge.hxx>
#include <BRep_TVertex.hxx>
#include <BRep_CurveRepresentation.hxx>
#include <BRep_GCurve.hxx>
#include <BRepBuilderAPI_MakeWire.hxx>
#include <BRepCheck_Edge.hxx>
#include <BRepFill_CurveConstraint.hxx>
#include <BRepFill_LocationLaw.hxx>
#include <BRepFill_SectionLaw.hxx>
#include <BRepFill_Sweep.hxx>
#include <BRepFill_TrimShellCorner.hxx>
#include <BRepLib.hxx>
#include <BRepLib_FaceError.hxx>
#include <BRepLib_FindSurface.hxx>
#include <BRepLib_MakeEdge.hxx>
#include <BRepLib_MakeFace.hxx>
#include <BRepLib_FaceError.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Compound.hxx>
#include <TopoDS_Shell.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopAbs_Orientation.hxx>
#include <TColStd_HArray1OfInteger.hxx>
#include <TColStd_Array2OfInteger.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <TColStd_Array2OfReal.hxx>
#include <BRepTools_Substitution.hxx>
#include <BRepTools_WireExplorer.hxx>
#include <GCPnts_AbscissaPoint.hxx>
#include <Geom2d_BSplineCurve.hxx>
#include <Geom2d_Line.hxx>
#include <Geom2d_TrimmedCurve.hxx>
#include <Geom2dAdaptor_HCurve.hxx>
#include <Geom_BezierCurve.hxx>
#include <Geom_BSplineCurve.hxx>
#include <Geom_Curve.hxx>
#include <Geom_Plane.hxx>
#include <Geom_RectangularTrimmedSurface.hxx>
#include <Geom_Surface.hxx>
#include <Geom_SurfaceOfRevolution.hxx>
#include <GeomAdaptor_HCurve.hxx>
#include <GeomAdaptor_HSurface.hxx>
#include <GeomConvert_ApproxSurface.hxx>
#include <GeomFill_LocationLaw.hxx>
#include <GeomFill_SectionLaw.hxx>
#include <GeomFill_Sweep.hxx>
#include <GeomLib.hxx>
#include <GeomLib_IsPlanarSurface.hxx>
#include <gp_Pnt2d.hxx>
#include <gp_Vec2d.hxx>
#include <Precision.hxx>
#include <Standard_ConstructionError.hxx>
#include <Standard_OutOfRange.hxx>
#include <StdFail_NotDone.hxx>
#include <TColGeom_Array2OfSurface.hxx>
#include <TColgp_Array1OfPnt.hxx>
#include <TColStd_Array1OfBoolean.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <TColStd_Array2OfInteger.hxx>
#include <TColStd_Array2OfReal.hxx>
#include <TColStd_HArray1OfInteger.hxx>
#include <TopAbs_Orientation.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Compound.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Shell.hxx>
#include <TopoDS_Wire.hxx>
#include <TopTools_Array1OfShape.hxx>
#include <TopTools_Array2OfShape.hxx>
#include <TopTools_HArray2OfShape.hxx>
#include <TopTools_HArray1OfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_ListOfShape.hxx>
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
#include <TopTools_SequenceOfShape.hxx>
#include <BRepTools_WireExplorer.hxx>
#include <Standard_ConstructionError.hxx>
#include <Precision.hxx>
#include <BRepBuilderAPI_MakeWire.hxx>
#include <BRepTools_Substitution.hxx>
#include <TopTools_DataMapIteratorOfDataMapOfShapeShape.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopTools_HArray1OfShape.hxx>
#include <TopTools_HArray2OfShape.hxx>
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_ListOfShape.hxx>
#include <TopTools_SequenceOfShape.hxx>
#include <stdio.h>
//#include <BRepFill_TrimCorner.hxx>
// modified by NIZHNY-MKK Wed Oct 22 12:25:45 2003
//#include <GeomPlate_BuildPlateSurface.hxx>
//#include <GeomPlate_Surface.hxx>
//#include <GeomPlate_PointConstraint.hxx>
//OCC500(apo)
#include <BRepCheck_Edge.hxx>
#ifdef DRAW
#include <Draw.hxx>
#include <DrawTrSurf.hxx>

View File

@@ -0,0 +1,177 @@
// Created on: 1997-11-21
// Created by: Philippe MANGIN
// Copyright (c) 1997-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 _BRepFill_Sweep_HeaderFile
#define _BRepFill_Sweep_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Real.hxx>
#include <GeomFill_ApproxStyle.hxx>
#include <GeomAbs_Shape.hxx>
#include <Standard_Integer.hxx>
#include <TopoDS_Shape.hxx>
#include <TopTools_HArray2OfShape.hxx>
#include <TopTools_DataMapOfShapeShape.hxx>
#include <TopTools_ListOfShape.hxx>
#include <TopoDS_Wire.hxx>
#include <TopTools_MapOfShape.hxx>
#include <BRepFill_DataMapOfShapeHArray2OfShape.hxx>
#include <BRepFill_TransitionStyle.hxx>
class BRepFill_LocationLaw;
class BRepFill_SectionLaw;
class StdFail_NotDone;
class Standard_OutOfRange;
class Standard_ConstructionError;
class TopoDS_Wire;
class TopoDS_Shape;
class TopoDS_Edge;
//! Topological Sweep Algorithm
//! Computes an Sweep shell using a generating
//! wire, an SectionLaw and an LocationLaw.
class BRepFill_Sweep
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section, const Handle(BRepFill_LocationLaw)& Location, const Standard_Boolean WithKPart);
Standard_EXPORT void SetBounds (const TopoDS_Wire& FirstShape, const TopoDS_Wire& LastShape);
//! Set Approximation Tolerance
//! Tol3d : Tolerance to surface approximation
//! Tol2d : Tolerance used to perform curve approximation
//! Normaly the 2d curve are approximated with a
//! tolerance given by the resolution on support surfaces,
//! but if this tolerance is too large Tol2d is used.
//! TolAngular : Tolerance (in radian) to control the angle
//! beetween tangents on the section law and
//! tangent of iso-v on approximed surface
Standard_EXPORT void SetTolerance (const Standard_Real Tol3d, const Standard_Real BoundTol = 1.0, const Standard_Real Tol2d = 1.0e-5, const Standard_Real TolAngular = 1.0e-2);
//! Tolerance To controle Corner management.
//!
//! If the discontinuity is lesser than <AngleMin> in radian The
//! Transition Performed will be alway "Modified"
Standard_EXPORT void SetAngularControl (const Standard_Real AngleMin = 0.01, const Standard_Real AngleMax = 6.0);
//! Set the flag that indicates attempt to approximate
//! a C1-continuous surface if a swept surface proved
//! to be C0.
Standard_EXPORT void SetForceApproxC1 (const Standard_Boolean ForceApproxC1);
//! Build the Sweeep Surface
//! Transition define Transition strategy
//! Approx define Approximation Strategy
//! - GeomFill_Section : The composed Function Location X Section
//! is directly approximed.
//! - GeomFill_Location : The location law is approximed, and the
//! SweepSurface is bulid algebric composition
//! of approximed location law and section law
//! This option is Ok, if Section.Surface() methode
//! is effective.
//! Continuity : The continuity in v waiting on the surface
//! Degmax : The maximum degree in v requiered on the surface
//! Segmax : The maximum number of span in v requiered on
//! the surface.
Standard_EXPORT void Build (TopTools_MapOfShape& ReversedEdges, BRepFill_DataMapOfShapeHArray2OfShape& Tapes, BRepFill_DataMapOfShapeHArray2OfShape& Rails, const BRepFill_TransitionStyle Transition = BRepFill_Modified, const GeomAbs_Shape Continuity = GeomAbs_C2, const GeomFill_ApproxStyle Approx = GeomFill_Location, const Standard_Integer Degmax = 11, const Standard_Integer Segmax = 30);
//! Say if the Shape is Build.
Standard_EXPORT Standard_Boolean IsDone() const;
//! returns the Sweeping Shape
Standard_EXPORT TopoDS_Shape Shape() const;
//! Get the Approximation error.
Standard_EXPORT Standard_Real ErrorOnSurface() const;
Standard_EXPORT Handle(TopTools_HArray2OfShape) SubShape() const;
Standard_EXPORT Handle(TopTools_HArray2OfShape) InterFaces() const;
Standard_EXPORT Handle(TopTools_HArray2OfShape) Sections() const;
protected:
private:
Standard_EXPORT Standard_Boolean CorrectApproxParameters();
Standard_EXPORT Standard_Boolean BuildWire (const BRepFill_TransitionStyle Transition);
Standard_EXPORT Standard_Boolean BuildShell (const BRepFill_TransitionStyle Transition, const Standard_Integer Vf, const Standard_Integer Vl, TopTools_MapOfShape& ReversedEdges, BRepFill_DataMapOfShapeHArray2OfShape& Tapes, BRepFill_DataMapOfShapeHArray2OfShape& Rails, const Standard_Real ExtendFirst = 0.0, const Standard_Real ExtendLast = 0.0);
Standard_EXPORT void PerformCorner (const Standard_Integer Index, const BRepFill_TransitionStyle Transition, const Handle(TopTools_HArray2OfShape)& Bounds);
Standard_EXPORT Standard_Real EvalExtrapol (const Standard_Integer Index, const BRepFill_TransitionStyle Transition) const;
Standard_EXPORT Standard_Boolean MergeVertex (const TopoDS_Shape& V1, TopoDS_Shape& V2) const;
Standard_EXPORT void UpdateVertex (const Standard_Integer Ipath, const Standard_Integer Isec, const Standard_Real Error, const Standard_Real Param, TopoDS_Shape& V) const;
Standard_EXPORT void RebuildTopOrBottomEdge (const TopoDS_Edge& aNewEdge, TopoDS_Edge& anEdge, TopTools_MapOfShape& ReversedEdges) const;
Standard_Boolean isDone;
Standard_Boolean KPart;
Standard_Real myTol3d;
Standard_Real myBoundTol;
Standard_Real myTol2d;
Standard_Real myTolAngular;
Standard_Real myAngMin;
Standard_Real myAngMax;
GeomFill_ApproxStyle myApproxStyle;
GeomAbs_Shape myContinuity;
Standard_Integer myDegmax;
Standard_Integer mySegmax;
Standard_Boolean myForceApproxC1;
TopoDS_Shape myShape;
Handle(BRepFill_LocationLaw) myLoc;
Handle(BRepFill_SectionLaw) mySec;
Handle(TopTools_HArray2OfShape) myUEdges;
Handle(TopTools_HArray2OfShape) myVEdges;
TopTools_DataMapOfShapeShape myVEdgesModified;
Handle(TopTools_HArray2OfShape) myFaces;
TopTools_ListOfShape myAuxShape;
Standard_Real Error;
TopoDS_Wire FirstShape;
TopoDS_Wire LastShape;
};
#endif // _BRepFill_Sweep_HeaderFile

View File

@@ -0,0 +1,28 @@
// Created on: 1994-03-03
// Created by: Joelle CHAUVET
// Copyright (c) 1994-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 _BRepFill_TransitionStyle_HeaderFile
#define _BRepFill_TransitionStyle_HeaderFile
enum BRepFill_TransitionStyle
{
BRepFill_Modified,
BRepFill_Right,
BRepFill_Round
};
#endif // _BRepFill_TransitionStyle_HeaderFile

View File

@@ -1,70 +0,0 @@
-- Created on: 1995-04-24
-- Created by: Bruno DUMORTIER
-- Copyright (c) 1995-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 TrimEdgeTool from BRepFill
---Purpose: Geometric Tool using to construct Offset Wires.
uses
Bisec from Bisector,
Edge from TopoDS,
Pnt2d from gp,
Curve from Geom2d,
Geometry from Geom2d,
SequenceOfPnt from TColgp,
Curve from Geom2dAdaptor,
JoinType from GeomAbs
is
Create
returns TrimEdgeTool from BRepFill;
Create( Bisec : Bisec from Bisector;
S1, S2 : Geometry from Geom2d;
Offset : Real from Standard)
returns TrimEdgeTool from BRepFill;
IntersectWith( me : in out;
Edge1 , Edge2 : Edge from TopoDS;
theJoinType : JoinType from GeomAbs;
Params : in out SequenceOfPnt from TColgp)
is static;
AddOrConfuse ( me ;
Start : Boolean from Standard;
Edge1 , Edge2 : Edge from TopoDS;
Params : in out SequenceOfPnt from TColgp)
is static;
IsInside( me; P : Pnt2d from gp)
returns Boolean from Standard
is static;
fields
isPoint1 : Boolean from Standard;
isPoint2 : Boolean from Standard;
myP1 : Pnt2d from gp;
myP2 : Pnt2d from gp;
myC1 : Curve from Geom2d;
myC2 : Curve from Geom2d;
myOffset : Real from Standard;
myBisec : Bisec from Bisector;
myBis : Curve from Geom2dAdaptor;
end TrimEdgeTool;

View File

@@ -14,25 +14,31 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BRepFill_TrimEdgeTool.ixx>
#include <BRep_Tool.hxx>
#include <Bisector_Bisec.hxx>
#include <Bisector_BisecAna.hxx>
#include <Geom2d_Curve.hxx>
#include <Geom2d_TrimmedCurve.hxx>
#include <BRep_Tool.hxx>
#include <BRepFill_TrimEdgeTool.hxx>
#include <ElCLib.hxx>
#include <Geom2d_CartesianPoint.hxx>
#include <Geom_Curve.hxx>
#include <GeomProjLib.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <Geom2d_Curve.hxx>
#include <Geom2d_Geometry.hxx>
#include <Geom2d_TrimmedCurve.hxx>
#include <Geom2dAPI_ProjectPointOnCurve.hxx>
#include <Geom2dInt_GInter.hxx>
#include <Geom_Curve.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <GeomProjLib.hxx>
#include <gp_Pnt.hxx>
#include <TopLoc_Location.hxx>
#include <TopoDS.hxx>
#include <Precision.hxx>
#include <gp_Pnt2d.hxx>
#include <IntRes2d_IntersectionPoint.hxx>
#include <IntRes2d_IntersectionSegment.hxx>
#include <ElCLib.hxx>
#include <Precision.hxx>
#include <StdFail_NotDone.hxx>
#include <TopLoc_Location.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#ifdef OCCT_DEBUG
//#define DRAW
#ifdef DRAW

View File

@@ -0,0 +1,88 @@
// Created on: 1995-04-24
// Created by: Bruno DUMORTIER
// Copyright (c) 1995-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 _BRepFill_TrimEdgeTool_HeaderFile
#define _BRepFill_TrimEdgeTool_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Boolean.hxx>
#include <gp_Pnt2d.hxx>
#include <Standard_Real.hxx>
#include <Bisector_Bisec.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <GeomAbs_JoinType.hxx>
#include <TColgp_SequenceOfPnt.hxx>
class Geom2d_Curve;
class Bisector_Bisec;
class Geom2d_Geometry;
class TopoDS_Edge;
class gp_Pnt2d;
//! Geometric Tool using to construct Offset Wires.
class BRepFill_TrimEdgeTool
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT BRepFill_TrimEdgeTool();
Standard_EXPORT BRepFill_TrimEdgeTool(const Bisector_Bisec& Bisec, const Handle(Geom2d_Geometry)& S1, const Handle(Geom2d_Geometry)& S2, const Standard_Real Offset);
Standard_EXPORT void IntersectWith (const TopoDS_Edge& Edge1, const TopoDS_Edge& Edge2, const GeomAbs_JoinType theJoinType, TColgp_SequenceOfPnt& Params);
Standard_EXPORT void AddOrConfuse (const Standard_Boolean Start, const TopoDS_Edge& Edge1, const TopoDS_Edge& Edge2, TColgp_SequenceOfPnt& Params) const;
Standard_EXPORT Standard_Boolean IsInside (const gp_Pnt2d& P) const;
protected:
private:
Standard_Boolean isPoint1;
Standard_Boolean isPoint2;
gp_Pnt2d myP1;
gp_Pnt2d myP2;
Handle(Geom2d_Curve) myC1;
Handle(Geom2d_Curve) myC2;
Standard_Real myOffset;
Bisector_Bisec myBisec;
Geom2dAdaptor_Curve myBis;
};
#endif // _BRepFill_TrimEdgeTool_HeaderFile

View File

@@ -1,67 +0,0 @@
-- Created on: 2003-10-21
-- Created by: Mikhail KLOKOV
-- Copyright (c) 2003-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 TrimShellCorner from BRepFill
uses
Ax2 from gp,
Shape from TopoDS,
Wire from TopoDS,
Face from TopoDS,
ListOfShape from TopTools,
HArray2OfShape from TopTools,
DataMapOfShapeListOfShape from TopTools
is
Create(theFaces : HArray2OfShape from TopTools;
theAxeOfBisPlane : Ax2 from gp;
theSecPlane : Face from TopoDS)
returns TrimShellCorner from BRepFill;
Create(theFaces : HArray2OfShape from TopTools;
theAxeOfBisPlane : Ax2 from gp;
theSpine : Wire from TopoDS;
theSecPlane : Face from TopoDS)
returns TrimShellCorner from BRepFill;
SetSpine(me: in out; theSpine: Wire from TopoDS);
AddBounds(me : in out; Bounds : HArray2OfShape from TopTools);
AddUEdges(me : in out; theUEdges : HArray2OfShape from TopTools);
Perform(me : in out);
IsDone(me) returns Boolean from Standard;
HasSection(me) returns Boolean from Standard;
Modified(me:in out; S : Shape from TopoDS;
theModified: out ListOfShape from TopTools);
fields
myAxeOfBisPlane : Ax2 from gp;
myShape1 : Shape from TopoDS;
myShape2 : Shape from TopoDS;
mySpine : Wire from TopoDS;
mySecPln : Face from TopoDS;
myBounds : HArray2OfShape from TopTools;
myUEdges : HArray2OfShape from TopTools;
myFaces : HArray2OfShape from TopTools;
myDone : Boolean from Standard;
myHasSection: Boolean from Standard;
myHistMap: DataMapOfShapeListOfShape from TopTools;
end TrimShellCorner from BRepFill;

View File

@@ -13,58 +13,56 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BRepFill_TrimShellCorner.ixx>
#include <BRepAlgoAPI_Section.hxx>
#include <BOPAlgo_BOP.hxx>
#include <BOPAlgo_PaveFiller.hxx>
#include <BOPCol_DataMapOfShapeListOfShape.hxx>
#include <BOPCol_ListOfShape.hxx>
#include <BOPDS_DS.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <BRepAlgoAPI_Section.hxx>
#include <BRepFill_TrimShellCorner.hxx>
#include <BRepLib_MakeEdge.hxx>
#include <BRepLib_MakeWire.hxx>
#include <BRepTools_ReShape.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Shell.hxx>
#include <TopoDS_Compound.hxx>
#include <gce_MakeLin.hxx>
#include <GCPnts_UniformAbscissa.hxx>
#include <Geom2d_Curve.hxx>
#include <Geom_Curve.hxx>
#include <GeomLib.hxx>
#include <gp_Ax2.hxx>
#include <gp_Pln.hxx>
#include <gp_Pnt2d.hxx>
#include <IntTools_BeanFaceIntersector.hxx>
#include <IntTools_Context.hxx>
#include <IntTools_Range.hxx>
#include <Geom_Curve.hxx>
#include <Geom2d_Curve.hxx>
#include <gp_Pnt2d.hxx>
#include <TopLoc_Location.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopTools_MapOfShape.hxx>
#include <TopTools_ListOfShape.hxx>
#include <TopTools_Array1OfListOfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
#include <TopTools_DataMapOfShapeListOfShape.hxx>
#include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
#include <gp_Pln.hxx>
#include <TopoDS_Iterator.hxx>
#include <IntTools_Tools.hxx>
#include <TColgp_Array1OfDir.hxx>
#include <TColgp_Array1OfPnt.hxx>
#include <TColgp_Array2OfPnt.hxx>
#include <TColgp_Array1OfDir.hxx>
#include <TColStd_ListOfInteger.hxx>
#include <TColStd_ListIteratorOfListOfInteger.hxx>
#include <GCPnts_UniformAbscissa.hxx>
#include <GeomLib.hxx>
#include <BRepLib_MakeWire.hxx>
#include <TopTools_SequenceOfShape.hxx>
#include <TColStd_Array1OfBoolean.hxx>
#include <TColgp_SequenceOfPnt.hxx>
#include <gce_MakeLin.hxx>
#include <IntTools_Tools.hxx>
#include <BOPAlgo_PaveFiller.hxx>
#include <BOPDS_DS.hxx>
#include <BOPAlgo_BOP.hxx>
#include <BOPCol_DataMapOfShapeListOfShape.hxx>
#include <BOPCol_ListOfShape.hxx>
#include <TColStd_Array1OfBoolean.hxx>
#include <TColStd_ListIteratorOfListOfInteger.hxx>
#include <TColStd_ListOfInteger.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopLoc_Location.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Compound.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Shell.hxx>
#include <TopoDS_Wire.hxx>
#include <TopTools_Array1OfListOfShape.hxx>
#include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
#include <TopTools_DataMapOfShapeListOfShape.hxx>
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_ListOfShape.hxx>
#include <TopTools_MapOfShape.hxx>
#include <TopTools_SequenceOfShape.hxx>
static Standard_Boolean FindCommonVertex(const BOPDS_PDS& theDS,
const Standard_Integer theEIndex1,

View File

@@ -0,0 +1,97 @@
// Created on: 2003-10-21
// Created by: Mikhail KLOKOV
// Copyright (c) 2003-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 _BRepFill_TrimShellCorner_HeaderFile
#define _BRepFill_TrimShellCorner_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <gp_Ax2.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Wire.hxx>
#include <TopoDS_Face.hxx>
#include <TopTools_HArray2OfShape.hxx>
#include <Standard_Boolean.hxx>
#include <TopTools_DataMapOfShapeListOfShape.hxx>
#include <TopTools_ListOfShape.hxx>
class gp_Ax2;
class TopoDS_Face;
class TopoDS_Wire;
class TopoDS_Shape;
class BRepFill_TrimShellCorner
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT BRepFill_TrimShellCorner(const Handle(TopTools_HArray2OfShape)& theFaces, const gp_Ax2& theAxeOfBisPlane, const TopoDS_Face& theSecPlane);
Standard_EXPORT BRepFill_TrimShellCorner(const Handle(TopTools_HArray2OfShape)& theFaces, const gp_Ax2& theAxeOfBisPlane, const TopoDS_Wire& theSpine, const TopoDS_Face& theSecPlane);
Standard_EXPORT void SetSpine (const TopoDS_Wire& theSpine);
Standard_EXPORT void AddBounds (const Handle(TopTools_HArray2OfShape)& Bounds);
Standard_EXPORT void AddUEdges (const Handle(TopTools_HArray2OfShape)& theUEdges);
Standard_EXPORT void Perform();
Standard_EXPORT Standard_Boolean IsDone() const;
Standard_EXPORT Standard_Boolean HasSection() const;
Standard_EXPORT void Modified (const TopoDS_Shape& S, TopTools_ListOfShape& theModified);
protected:
private:
gp_Ax2 myAxeOfBisPlane;
TopoDS_Shape myShape1;
TopoDS_Shape myShape2;
TopoDS_Wire mySpine;
TopoDS_Face mySecPln;
Handle(TopTools_HArray2OfShape) myBounds;
Handle(TopTools_HArray2OfShape) myUEdges;
Handle(TopTools_HArray2OfShape) myFaces;
Standard_Boolean myDone;
Standard_Boolean myHasSection;
TopTools_DataMapOfShapeListOfShape myHistMap;
};
#endif // _BRepFill_TrimShellCorner_HeaderFile

View File

@@ -1,93 +0,0 @@
-- Created on: 1994-10-21
-- Created by: Bruno DUMORTIER
-- Copyright (c) 1994-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 TrimSurfaceTool from BRepFill
---Purpose: Compute the Pcurves and the 3d curves resulting
-- of the trimming of a face by an extruded surface.
uses
Curve from Geom2d,
Curve from Geom,
Pnt2d from gp,
Face from TopoDS,
Edge from TopoDS,
SequenceOfPnt from TColgp,
Shape from GeomAbs
raises
NoSuchObject from Standard
is
Create(Bis : Curve from Geom2d;
Face1 : Face from TopoDS;
Face2 : Face from TopoDS;
Edge1 : Edge from TopoDS;
Edge2 : Edge from TopoDS;
Inv1 : Boolean from Standard;
Inv2 : Boolean from Standard)
returns TrimSurfaceTool from BRepFill;
IntersectWith(me; EdgeOnF1 : in Edge from TopoDS;
EdgeOnF2 : in Edge from TopoDS;
Points : in out SequenceOfPnt from TColgp )
---Purpose: Intersect <Bis> with the projection of the edges
-- <EdgeOnFi> and returns the intersecting parameters
-- on Bis and on the edges
-- P.X() : Parameter on Bis
-- P.Y() : Parameter on EdgeOnF1
-- P.Z() : Parameter on EdgeOnF2
raises
NoSuchObject from Standard
---Purpose: raises if <Edge> is not a edge of Face1 or Face2.
is static;
IsOnFace(me; Point : Pnt2d from gp)
returns Boolean from Standard
---Purpose: returns True if the Line (P, DZ) intersect the Faces
is static;
ProjOn(me; Point : Pnt2d from gp;
Edge : Edge from TopoDS)
returns Real from Standard
---Purpose: returns the parameter of the point <Point> on the
-- Edge <Edge>, assuming that the point is on the edge.
is static;
Project(me;
U1, U2 : Real from Standard;
Curve : out Curve from Geom;
PCurve1, PCurve2 : out Curve from Geom2d;
myCont : out Shape from GeomAbs)
---Purpose:
is static;
fields
myFace1 : Face from TopoDS;
myFace2 : Face from TopoDS;
myEdge1 : Edge from TopoDS;
myEdge2 : Edge from TopoDS;
myInv1 : Boolean from Standard;
myInv2 : Boolean from Standard;
myBis : Curve from Geom2d;
end TrimSurfaceTool;

View File

@@ -14,53 +14,56 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <stdio.h>
#include <BRepFill_TrimSurfaceTool.ixx>
#include <Precision.hxx>
#include <Adaptor3d_SurfaceOfRevolution.hxx>
#include <AppParCurves_MultiCurve.hxx>
#include <BRep_Tool.hxx>
#include <BRepFill_ApproxSeewing.hxx>
#include <BRepFill_ComputeCLine.hxx>
#include <BRepFill_MultiLine.hxx>
#include <BRepFill_TrimSurfaceTool.hxx>
#include <BRepIntCurveSurface_Inter.hxx>
#include <BRepFill_ApproxSeewing.hxx>
#include <BRep_Tool.hxx>
#include <ElCLib.hxx>
#include <BSplCLib.hxx>
#include <PLib.hxx>
#include <gp.hxx>
#include <gp_Sphere.hxx>
#include <gp_Cone.hxx>
#include <gp_Torus.hxx>
#include <gp_Cylinder.hxx>
#include <Geom2dInt_GInter.hxx>
#include <Geom2dAPI_ProjectPointOnCurve.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <ElCLib.hxx>
#include <Geom2d_BSplineCurve.hxx>
#include <Geom2d_Curve.hxx>
#include <Geom2d_TrimmedCurve.hxx>
#include <GeomAdaptor_Surface.hxx>
#include <GeomAdaptor_HCurve.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom2dAPI_ProjectPointOnCurve.hxx>
#include <Geom2dInt_GInter.hxx>
#include <Geom_BSplineCurve.hxx>
#include <Geom_Curve.hxx>
#include <Geom_Plane.hxx>
#include <Geom_SurfaceOfRevolution.hxx>
#include <Geom_BSplineCurve.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <GeomAdaptor_HCurve.hxx>
#include <GeomAdaptor_Surface.hxx>
#include <GeomProjLib.hxx>
#include <gp.hxx>
#include <gp_Cone.hxx>
#include <gp_Cylinder.hxx>
#include <gp_Pnt2d.hxx>
#include <gp_Sphere.hxx>
#include <gp_Torus.hxx>
#include <IntRes2d_IntersectionPoint.hxx>
#include <IntRes2d_IntersectionSegment.hxx>
#include <PLib.hxx>
#include <Precision.hxx>
#include <StdFail_NotDone.hxx>
#include <Standard_NoSuchObject.hxx>
#include <Standard_NotImplemented.hxx>
#include <StdFail_NotDone.hxx>
#include <TColgp_Array1OfPnt.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <TColStd_Array1OfInteger.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <TopAbs_State.hxx>
#include <TopExp.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Vertex.hxx>
#include <stdio.h>
#ifdef DRAW
#include <DrawTrSurf.hxx>
#include <DBRep.hxx>

View File

@@ -0,0 +1,97 @@
// Created on: 1994-10-21
// Created by: Bruno DUMORTIER
// Copyright (c) 1994-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 _BRepFill_TrimSurfaceTool_HeaderFile
#define _BRepFill_TrimSurfaceTool_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Edge.hxx>
#include <Standard_Boolean.hxx>
#include <TColgp_SequenceOfPnt.hxx>
#include <Standard_Real.hxx>
#include <GeomAbs_Shape.hxx>
class Geom2d_Curve;
class Standard_NoSuchObject;
class TopoDS_Face;
class TopoDS_Edge;
class gp_Pnt2d;
class Geom_Curve;
//! Compute the Pcurves and the 3d curves resulting
//! of the trimming of a face by an extruded surface.
class BRepFill_TrimSurfaceTool
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT BRepFill_TrimSurfaceTool(const Handle(Geom2d_Curve)& Bis, const TopoDS_Face& Face1, const TopoDS_Face& Face2, const TopoDS_Edge& Edge1, const TopoDS_Edge& Edge2, const Standard_Boolean Inv1, const Standard_Boolean Inv2);
//! Intersect <Bis> with the projection of the edges
//! <EdgeOnFi> and returns the intersecting parameters
//! on Bis and on the edges
//! P.X() : Parameter on Bis
//! P.Y() : Parameter on EdgeOnF1
//! P.Z() : Parameter on EdgeOnF2
//! raises if <Edge> is not a edge of Face1 or Face2.
Standard_EXPORT void IntersectWith (const TopoDS_Edge& EdgeOnF1, const TopoDS_Edge& EdgeOnF2, TColgp_SequenceOfPnt& Points) const;
//! returns True if the Line (P, DZ) intersect the Faces
Standard_EXPORT Standard_Boolean IsOnFace (const gp_Pnt2d& Point) const;
//! returns the parameter of the point <Point> on the
//! Edge <Edge>, assuming that the point is on the edge.
Standard_EXPORT Standard_Real ProjOn (const gp_Pnt2d& Point, const TopoDS_Edge& Edge) const;
Standard_EXPORT void Project (const Standard_Real U1, const Standard_Real U2, Handle(Geom_Curve)& Curve, Handle(Geom2d_Curve)& PCurve1, Handle(Geom2d_Curve)& PCurve2, GeomAbs_Shape& myCont) const;
protected:
private:
TopoDS_Face myFace1;
TopoDS_Face myFace2;
TopoDS_Edge myEdge1;
TopoDS_Edge myEdge2;
Standard_Boolean myInv1;
Standard_Boolean myInv2;
Handle(Geom2d_Curve) myBis;
};
#endif // _BRepFill_TrimSurfaceTool_HeaderFile

View File

@@ -0,0 +1,28 @@
// Created on: 1994-03-03
// Created by: Joelle CHAUVET
// Copyright (c) 1994-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 _BRepFill_TypeOfContact_HeaderFile
#define _BRepFill_TypeOfContact_HeaderFile
//! A pair of bound shapes with the result.
enum BRepFill_TypeOfContact
{
BRepFill_NoContact,
BRepFill_Contact,
BRepFill_ContactOnBorder
};
#endif // _BRepFill_TypeOfContact_HeaderFile

View File

@@ -1,22 +1,85 @@
BRepFill_MultiLine.hxx
BRepFill_MultiLine.cxx
BRepFill_ListOfOffsetWire.hxx
BRepFill_ListIteratorOfListOfOffsetWire.hxx
BRepFill_SequenceOfSection.hxx
BRepFill_DataMapOfNodeDataMapOfShapeShape.hxx
BRepFill.cxx
BRepFill.hxx
BRepFill_ACRLaw.cxx
BRepFill_ACRLaw.hxx
BRepFill_ApproxSeewing.cxx
BRepFill_ApproxSeewing.hxx
BRepFill_CompatibleWires.cxx
BRepFill_CompatibleWires.hxx
BRepFill_ComputeCLine.hxx
BRepFill_ComputeCLine_0.cxx
BRepFill_CurveConstraint.cxx
BRepFill_CurveConstraint.hxx
BRepFill_DataMapIteratorOfDataMapOfNodeDataMapOfShapeShape.hxx
BRepFill_DataMapOfNodeShape.hxx
BRepFill_DataMapIteratorOfDataMapOfNodeShape.hxx
BRepFill_DataMapOfShapeDataMapOfShapeListOfShape.hxx
BRepFill_DataMapIteratorOfDataMapOfShapeDataMapOfShapeListOfShape.hxx
BRepFill_DataMapOfShapeSequenceOfReal.hxx
BRepFill_DataMapIteratorOfDataMapOfShapeSequenceOfReal.hxx
BRepFill_DataMapOfShapeSequenceOfPnt.hxx
BRepFill_DataMapIteratorOfDataMapOfShapeSequenceOfPnt.hxx
BRepFill_DataMapOfOrientedShapeListOfShape.hxx
BRepFill_DataMapIteratorOfDataMapOfOrientedShapeListOfShape.hxx
BRepFill_IndexedDataMapOfOrientedShapeListOfShape.hxx
BRepFill_DataMapOfShapeHArray2OfShape.hxx
BRepFill_DataMapIteratorOfDataMapOfShapeDataMapOfShapeListOfShape.hxx
BRepFill_DataMapIteratorOfDataMapOfShapeHArray2OfShape.hxx
BRepFill_SequenceOfFaceAndOrder.hxx
BRepFill_DataMapIteratorOfDataMapOfShapeSequenceOfPnt.hxx
BRepFill_DataMapIteratorOfDataMapOfShapeSequenceOfReal.hxx
BRepFill_DataMapOfNodeDataMapOfShapeShape.hxx
BRepFill_DataMapOfNodeShape.hxx
BRepFill_DataMapOfOrientedShapeListOfShape.hxx
BRepFill_DataMapOfShapeDataMapOfShapeListOfShape.hxx
BRepFill_DataMapOfShapeHArray2OfShape.hxx
BRepFill_DataMapOfShapeSequenceOfPnt.hxx
BRepFill_DataMapOfShapeSequenceOfReal.hxx
BRepFill_Draft.cxx
BRepFill_Draft.hxx
BRepFill_DraftLaw.cxx
BRepFill_DraftLaw.hxx
BRepFill_Edge3DLaw.cxx
BRepFill_Edge3DLaw.hxx
BRepFill_EdgeFaceAndOrder.cxx
BRepFill_EdgeFaceAndOrder.hxx
BRepFill_EdgeOnSurfLaw.cxx
BRepFill_EdgeOnSurfLaw.hxx
BRepFill_Evolved.cxx
BRepFill_Evolved.hxx
BRepFill_FaceAndOrder.cxx
BRepFill_FaceAndOrder.hxx
BRepFill_Filling.cxx
BRepFill_Filling.hxx
BRepFill_Generator.cxx
BRepFill_Generator.hxx
BRepFill_Generator.lxx
BRepFill_IndexedDataMapOfOrientedShapeListOfShape.hxx
BRepFill_ListIteratorOfListOfOffsetWire.hxx
BRepFill_ListOfOffsetWire.hxx
BRepFill_LocationLaw.cxx
BRepFill_LocationLaw.hxx
BRepFill_MultiLine.cxx
BRepFill_MultiLine.hxx
BRepFill_NSections.cxx
BRepFill_NSections.hxx
BRepFill_OffsetAncestors.cxx
BRepFill_OffsetAncestors.hxx
BRepFill_OffsetWire.cxx
BRepFill_OffsetWire.hxx
BRepFill_Pipe.cxx
BRepFill_Pipe.hxx
BRepFill_PipeShell.cxx
BRepFill_PipeShell.hxx
BRepFill_Section.cxx
BRepFill_Section.hxx
BRepFill_Section.lxx
BRepFill_SectionLaw.cxx
BRepFill_SectionLaw.hxx
BRepFill_SectionPlacement.cxx
BRepFill_SectionPlacement.hxx
BRepFill_SequenceOfEdgeFaceAndOrder.hxx
BRepFill_SequenceOfFaceAndOrder.hxx
BRepFill_SequenceOfSection.hxx
BRepFill_ShapeLaw.cxx
BRepFill_ShapeLaw.hxx
BRepFill_ShapeLaw.lxx
BRepFill_Sweep.cxx
BRepFill_Sweep.hxx
BRepFill_TransitionStyle.hxx
BRepFill_TrimEdgeTool.cxx
BRepFill_TrimEdgeTool.hxx
BRepFill_TrimShellCorner.cxx
BRepFill_TrimShellCorner.hxx
BRepFill_TrimSurfaceTool.cxx
BRepFill_TrimSurfaceTool.hxx
BRepFill_TypeOfContact.hxx