1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-19 13:40:49 +03:00

0024002: Overall code and build procedure refactoring -- automatic

Automatic upgrade of OCCT code by command "occt_upgrade . -nocdl":
- WOK-generated header files from inc and sources from drv are moved to src
- CDL files removed
- All packages are converted to nocdlpack
This commit is contained in:
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,7 +1,129 @@
GeomFill_SequenceOfTrsf.hxx
GeomFill_SequenceOfAx2.hxx
GeomFill_HSequenceOfAx2.hxx
GeomFill_Array1OfSectionLaw.hxx
GeomFill_HArray1OfSectionLaw.hxx
GeomFill.cxx
GeomFill.hxx
GeomFill_ApproxStyle.hxx
GeomFill_AppSurf.hxx
GeomFill_AppSurf_0.cxx
GeomFill_AppSweep.hxx
GeomFill_AppSweep_0.cxx
GeomFill_Array1OfLocationLaw.hxx
GeomFill_Array1OfSectionLaw.hxx
GeomFill_BezierCurves.cxx
GeomFill_BezierCurves.hxx
GeomFill_BezierCurves.lxx
GeomFill_Boundary.cxx
GeomFill_Boundary.hxx
GeomFill_BoundWithSurf.cxx
GeomFill_BoundWithSurf.hxx
GeomFill_BSplineCurves.cxx
GeomFill_BSplineCurves.hxx
GeomFill_BSplineCurves.lxx
GeomFill_CircularBlendFunc.cxx
GeomFill_CircularBlendFunc.hxx
GeomFill_ConstantBiNormal.cxx
GeomFill_ConstantBiNormal.hxx
GeomFill_ConstrainedFilling.cxx
GeomFill_ConstrainedFilling.hxx
GeomFill_Coons.cxx
GeomFill_Coons.hxx
GeomFill_CoonsAlgPatch.cxx
GeomFill_CoonsAlgPatch.hxx
GeomFill_CornerState.cxx
GeomFill_CornerState.hxx
GeomFill_CorrectedFrenet.cxx
GeomFill_CorrectedFrenet.hxx
GeomFill_CurveAndTrihedron.cxx
GeomFill_CurveAndTrihedron.hxx
GeomFill_Curved.cxx
GeomFill_Curved.hxx
GeomFill_Darboux.cxx
GeomFill_Darboux.hxx
GeomFill_DegeneratedBound.cxx
GeomFill_DegeneratedBound.hxx
GeomFill_DiscreteTrihedron.cxx
GeomFill_DiscreteTrihedron.hxx
GeomFill_DraftTrihedron.cxx
GeomFill_DraftTrihedron.hxx
GeomFill_EvolvedSection.cxx
GeomFill_EvolvedSection.hxx
GeomFill_Filling.cxx
GeomFill_Filling.hxx
GeomFill_FillingStyle.hxx
GeomFill_Fixed.cxx
GeomFill_Fixed.hxx
GeomFill_Frenet.cxx
GeomFill_Frenet.hxx
GeomFill_FunctionDraft.cxx
GeomFill_FunctionDraft.hxx
GeomFill_FunctionGuide.cxx
GeomFill_FunctionGuide.hxx
GeomFill_Generator.cxx
GeomFill_Generator.hxx
GeomFill_Generator.lxx
GeomFill_GuideTrihedronAC.cxx
GeomFill_GuideTrihedronAC.hxx
GeomFill_GuideTrihedronPlan.cxx
GeomFill_GuideTrihedronPlan.hxx
GeomFill_HArray1OfLocationLaw.hxx
GeomFill_HArray1OfSectionLaw.hxx
GeomFill_HSequenceOfAx2.hxx
GeomFill_Line.cxx
GeomFill_Line.hxx
GeomFill_Line.lxx
GeomFill_LocationDraft.cxx
GeomFill_LocationDraft.hxx
GeomFill_LocationGuide.cxx
GeomFill_LocationGuide.hxx
GeomFill_LocationLaw.cxx
GeomFill_LocationLaw.hxx
GeomFill_LocFunction.cxx
GeomFill_LocFunction.hxx
GeomFill_NSections.cxx
GeomFill_NSections.hxx
GeomFill_Pipe.cxx
GeomFill_Pipe.hxx
GeomFill_Pipe.lxx
GeomFill_PipeError.hxx
GeomFill_PlanFunc.cxx
GeomFill_PlanFunc.hxx
GeomFill_PolynomialConvertor.cxx
GeomFill_PolynomialConvertor.hxx
GeomFill_Profiler.cxx
GeomFill_Profiler.hxx
GeomFill_Profiler.lxx
GeomFill_QuasiAngularConvertor.cxx
GeomFill_QuasiAngularConvertor.hxx
GeomFill_SectionGenerator.cxx
GeomFill_SectionGenerator.hxx
GeomFill_SectionLaw.cxx
GeomFill_SectionLaw.hxx
GeomFill_SectionPlacement.cxx
GeomFill_SectionPlacement.hxx
GeomFill_SequenceOfAx2.hxx
GeomFill_SequenceOfTrsf.hxx
GeomFill_SimpleBound.cxx
GeomFill_SimpleBound.hxx
GeomFill_SnglrFunc.cxx
GeomFill_SnglrFunc.hxx
GeomFill_Stretch.cxx
GeomFill_Stretch.hxx
GeomFill_Sweep.cxx
GeomFill_Sweep.hxx
GeomFill_SweepFunction.cxx
GeomFill_SweepFunction.hxx
GeomFill_SweepSectionGenerator.cxx
GeomFill_SweepSectionGenerator.hxx
GeomFill_SweepSectionGenerator.lxx
GeomFill_Tensor.cxx
GeomFill_Tensor.hxx
GeomFill_Tensor.lxx
GeomFill_TgtField.cxx
GeomFill_TgtField.hxx
GeomFill_TgtOnCoons.cxx
GeomFill_TgtOnCoons.hxx
GeomFill_Trihedron.hxx
GeomFill_TrihedronLaw.cxx
GeomFill_TrihedronLaw.hxx
GeomFill_TrihedronWithGuide.cxx
GeomFill_TrihedronWithGuide.hxx
GeomFill_UniformSection.cxx
GeomFill_UniformSection.hxx

View File

@@ -1,275 +0,0 @@
-- Created on: 1993-09-28
-- Created by: Bruno DUMORTIER
-- Copyright (c) 1993-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.
---Purpose: Tools and Data to filling Surface and Sweep Surfaces
package GeomFill
uses
TColgp,
TColGeom,
TColGeom2d,
TColStd,
TCollection,
gp,
Geom,
Geom2d,
GeomAbs,
Convert,
Adaptor3d,
GeomAdaptor,
Law,
Extrema,
AppBlend,
Approx,
math,
MMgt,
StdFail
is
enumeration FillingStyle
is StretchStyle, CoonsStyle, CurvedStyle end;
---Purpose: Defines the three filling styles used in this package
-- - GeomFill_Stretch - the style with the flattest patches
-- - GeomFill_Coons - a rounded style of patch with
-- less depth than those of Curved
-- - GeomFill_Curved - the style with the most rounded patches.
enumeration ApproxStyle
is Section, Location end;
enumeration PipeError
is PipeOk,
PipeNotOk,
PlaneNotIntersectGuide,
ImpossibleContact
end;
enumeration Trihedron
is IsCorrectedFrenet, IsFixed, IsFrenet, IsConstantNormal, IsDarboux,
IsGuideAC, IsGuidePlan,
IsGuideACWithContact, IsGuidePlanWithContact, IsDiscreteTrihedron end;
class Filling;
class Stretch;
class Coons;
class Curved;
class BezierCurves;
class BSplineCurves;
class Profiler;
class SectionGenerator;
class Line;
class AppSurf instantiates AppSurf from AppBlend
( SectionGenerator from GeomFill,
Line from GeomFill);
---Purpose: Approximate a BSplineSurface passing by all the
-- curves described in the SectionGenerator
class SweepSectionGenerator;
class AppSweep instantiates AppSurf from AppBlend
( SweepSectionGenerator from GeomFill,
Line from GeomFill);
---Purpose: Approximate a sweep surface passing by all the
-- curves described in the SweepSectionGenerator.
class Generator;
class Pipe;
--- Family of classes providing algorithms to fill a contour with
-- constraints of tangency.
class Tensor;
class ConstrainedFilling;
deferred class Boundary; -- inherits TShared
class DegeneratedBound; -- inherits Boundary
class SimpleBound; -- inherits Boundary
class BoundWithSurf; -- inherits Boundary
class CoonsAlgPatch; -- inherits TShared
deferred class TgtField; -- inherits TShared
class TgtOnCoons; -- inherits TgteField
class CornerState;
--
-- instantiation of Sequence of Trsf
--
imported SequenceOfTrsf;
imported SequenceOfAx2;
imported transient class HSequenceOfAx2;
--
-- private classes
--
private class CircularBlendFunc;
private class SweepFunction;
private class LocFunction;
private class PolynomialConvertor;
private class QuasiAngularConvertor;
private class SnglrFunc;
private class FunctionDraft;
private class PlanFunc;
private class FunctionGuide;
---
--- Sweep Data
---
deferred class SectionLaw;
class UniformSection;
class EvolvedSection;
class NSections;
deferred class LocationLaw;
class CurveAndTrihedron;
class LocationDraft;
class LocationGuide;
deferred class TrihedronLaw;
class Fixed;
class Frenet;
class CorrectedFrenet;
class DiscreteTrihedron;
class ConstantBiNormal;
class Darboux;
class DraftTrihedron;
deferred class TrihedronWithGuide;
class GuideTrihedronAC;
class GuideTrihedronPlan;
class Sweep;
class SectionPlacement;
imported Array1OfSectionLaw;
imported transient class HArray1OfSectionLaw;
imported Array1OfLocationLaw;
imported transient class HArray1OfLocationLaw;
-- package methods
--
Surface( Curve1 : Curve from Geom;
Curve2 : Curve from Geom)
returns Surface from Geom;
---Purpose:
-- Builds a ruled surface between the two curves, Curve1 and Curve2.
GetCircle(TConv : ParameterisationType from Convert;
ns1, ns2 : Vec from gp;
nplan : Vec from gp;
pt1, pt2 : Pnt from gp;
Rayon : Real from Standard;
Center : Pnt from gp;
Poles : out Array1OfPnt from TColgp;
Weigths : out Array1OfReal from TColStd);
GetCircle(TConv : ParameterisationType from Convert;
ns1, ns2 : Vec from gp;
dn1w, dn2w : Vec from gp;
nplan, dnplan : Vec from gp;
pts1, pts2 : Pnt from gp;
tang1, tang2 : Vec from gp;
Rayon, DRayon : Real from Standard;
Center : Pnt from gp;
DCenter : Vec from gp;
Poles : out Array1OfPnt from TColgp;
DPoles : out Array1OfVec from TColgp;
Weigths : out Array1OfReal from TColStd;
DWeigths : out Array1OfReal from TColStd)
---Level: Internal
returns Boolean;
GetCircle(TConv : ParameterisationType from Convert;
ns1, ns2 : Vec from gp;
dn1w, dn2w : Vec from gp;
d2n1w, d2n2w : Vec from gp;
nplan, dnplan, d2nplan : Vec from gp;
pts1 , pts2 : Pnt from gp;
tang1 , tang2 : Vec from gp;
Dtang1, Dtang2 : Vec from gp;
Rayon, DRayon, D2Rayon : Real from Standard;
Center : Pnt from gp;
DCenter, D2Center : Vec from gp;
Poles : out Array1OfPnt from TColgp;
DPoles : out Array1OfVec from TColgp;
D2Poles : out Array1OfVec from TColgp;
Weigths : out Array1OfReal from TColStd;
DWeigths : out Array1OfReal from TColStd;
D2Weigths : out Array1OfReal from TColStd)
---Level: Internal
returns Boolean;
GetShape(MaxAng: Real from Standard;
NbPoles,NbKnots,Degree : out Integer from Standard;
TypeConv : in out ParameterisationType from Convert);
Knots(TypeConv : ParameterisationType from Convert;
TKnots: out Array1OfReal from TColStd);
Mults(TypeConv : ParameterisationType from Convert;
TMults: out Array1OfInteger from TColStd);
GetMinimalWeights(TConv : ParameterisationType from Convert;
AngleMin : Real;
AngleMax : Real;
Weigths : out Array1OfReal from TColStd);
GetTolerance(TConv : ParameterisationType from Convert;
AngleMin : Real;
Radius : Real;
AngularTol : Real;
SpatialTol : Real)
---Purpose: Used by the generical classes to determine
-- Tolerance for approximation
---Level: Internal
returns Real;
end GeomFill;

View File

@@ -14,30 +14,29 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GeomFill.ixx>
#include <GeomFill_Generator.hxx>
#include <Geom_RectangularTrimmedSurface.hxx>
#include <Geom_CylindricalSurface.hxx>
#include <Geom_ConicalSurface.hxx>
#include <Geom_Plane.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <Geom_BSplineCurve.hxx>
#include <Geom_Line.hxx>
#include <Geom_Circle.hxx>
#include <gp_Lin.hxx>
#include <gp_Circ.hxx>
#include <gp_Dir.hxx>
#include <gp_Ax3.hxx>
#include <gp_Vec.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 <GeomConvert.hxx>
#include <GeomFill.hxx>
#include <GeomFill_Generator.hxx>
#include <GeomFill_PolynomialConvertor.hxx>
#include <GeomFill_QuasiAngularConvertor.hxx>
#include <gp_Ax3.hxx>
#include <gp_Circ.hxx>
#include <gp_Dir.hxx>
#include <gp_Lin.hxx>
#include <gp_Pnt.hxx>
#include <gp_Vec.hxx>
#include <Precision.hxx>
#include <Geom_Curve.hxx>
//=======================================================================
//function : Surface

199
src/GeomFill/GeomFill.hxx Normal file
View File

@@ -0,0 +1,199 @@
// Created on: 1993-09-28
// Created by: Bruno DUMORTIER
// Copyright (c) 1993-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 _GeomFill_HeaderFile
#define _GeomFill_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Convert_ParameterisationType.hxx>
#include <Standard_Real.hxx>
#include <TColgp_Array1OfPnt.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <Standard_Boolean.hxx>
#include <TColgp_Array1OfVec.hxx>
#include <Standard_Integer.hxx>
#include <TColStd_Array1OfInteger.hxx>
class Geom_Surface;
class Geom_Curve;
class gp_Vec;
class gp_Pnt;
class GeomFill_Filling;
class GeomFill_Stretch;
class GeomFill_Coons;
class GeomFill_Curved;
class GeomFill_BezierCurves;
class GeomFill_BSplineCurves;
class GeomFill_Profiler;
class GeomFill_SectionGenerator;
class GeomFill_Line;
class GeomFill_AppSurf;
class GeomFill_SweepSectionGenerator;
class GeomFill_AppSweep;
class GeomFill_Generator;
class GeomFill_Pipe;
class GeomFill_Tensor;
class GeomFill_ConstrainedFilling;
class GeomFill_Boundary;
class GeomFill_DegeneratedBound;
class GeomFill_SimpleBound;
class GeomFill_BoundWithSurf;
class GeomFill_CoonsAlgPatch;
class GeomFill_TgtField;
class GeomFill_TgtOnCoons;
class GeomFill_CornerState;
class GeomFill_CircularBlendFunc;
class GeomFill_SweepFunction;
class GeomFill_LocFunction;
class GeomFill_PolynomialConvertor;
class GeomFill_QuasiAngularConvertor;
class GeomFill_SnglrFunc;
class GeomFill_FunctionDraft;
class GeomFill_PlanFunc;
class GeomFill_FunctionGuide;
class GeomFill_SectionLaw;
class GeomFill_UniformSection;
class GeomFill_EvolvedSection;
class GeomFill_NSections;
class GeomFill_LocationLaw;
class GeomFill_CurveAndTrihedron;
class GeomFill_LocationDraft;
class GeomFill_LocationGuide;
class GeomFill_TrihedronLaw;
class GeomFill_Fixed;
class GeomFill_Frenet;
class GeomFill_CorrectedFrenet;
class GeomFill_DiscreteTrihedron;
class GeomFill_ConstantBiNormal;
class GeomFill_Darboux;
class GeomFill_DraftTrihedron;
class GeomFill_TrihedronWithGuide;
class GeomFill_GuideTrihedronAC;
class GeomFill_GuideTrihedronPlan;
class GeomFill_Sweep;
class GeomFill_SectionPlacement;
//! Tools and Data to filling Surface and Sweep Surfaces
class GeomFill
{
public:
DEFINE_STANDARD_ALLOC
//! Builds a ruled surface between the two curves, Curve1 and Curve2.
Standard_EXPORT static Handle(Geom_Surface) Surface (const Handle(Geom_Curve)& Curve1, const Handle(Geom_Curve)& Curve2);
Standard_EXPORT static void GetCircle (const Convert_ParameterisationType TConv, const gp_Vec& ns1, const gp_Vec& ns2, const gp_Vec& nplan, const gp_Pnt& pt1, const gp_Pnt& pt2, const Standard_Real Rayon, const gp_Pnt& Center, TColgp_Array1OfPnt& Poles, TColStd_Array1OfReal& Weigths);
Standard_EXPORT static Standard_Boolean GetCircle (const Convert_ParameterisationType TConv, const gp_Vec& ns1, const gp_Vec& ns2, const gp_Vec& dn1w, const gp_Vec& dn2w, const gp_Vec& nplan, const gp_Vec& dnplan, const gp_Pnt& pts1, const gp_Pnt& pts2, const gp_Vec& tang1, const gp_Vec& tang2, const Standard_Real Rayon, const Standard_Real DRayon, const gp_Pnt& Center, const gp_Vec& DCenter, TColgp_Array1OfPnt& Poles, TColgp_Array1OfVec& DPoles, TColStd_Array1OfReal& Weigths, TColStd_Array1OfReal& DWeigths);
Standard_EXPORT static Standard_Boolean GetCircle (const Convert_ParameterisationType TConv, const gp_Vec& ns1, const gp_Vec& ns2, const gp_Vec& dn1w, const gp_Vec& dn2w, const gp_Vec& d2n1w, const gp_Vec& d2n2w, const gp_Vec& nplan, const gp_Vec& dnplan, const gp_Vec& d2nplan, const gp_Pnt& pts1, const gp_Pnt& pts2, const gp_Vec& tang1, const gp_Vec& tang2, const gp_Vec& Dtang1, const gp_Vec& Dtang2, const Standard_Real Rayon, const Standard_Real DRayon, const Standard_Real D2Rayon, const gp_Pnt& Center, const gp_Vec& DCenter, const gp_Vec& D2Center, TColgp_Array1OfPnt& Poles, TColgp_Array1OfVec& DPoles, TColgp_Array1OfVec& D2Poles, TColStd_Array1OfReal& Weigths, TColStd_Array1OfReal& DWeigths, TColStd_Array1OfReal& D2Weigths);
Standard_EXPORT static void GetShape (const Standard_Real MaxAng, Standard_Integer& NbPoles, Standard_Integer& NbKnots, Standard_Integer& Degree, Convert_ParameterisationType& TypeConv);
Standard_EXPORT static void Knots (const Convert_ParameterisationType TypeConv, TColStd_Array1OfReal& TKnots);
Standard_EXPORT static void Mults (const Convert_ParameterisationType TypeConv, TColStd_Array1OfInteger& TMults);
Standard_EXPORT static void GetMinimalWeights (const Convert_ParameterisationType TConv, const Standard_Real AngleMin, const Standard_Real AngleMax, TColStd_Array1OfReal& Weigths);
//! Used by the generical classes to determine
//! Tolerance for approximation
Standard_EXPORT static Standard_Real GetTolerance (const Convert_ParameterisationType TConv, const Standard_Real AngleMin, const Standard_Real Radius, const Standard_Real AngularTol, const Standard_Real SpatialTol);
protected:
private:
friend class GeomFill_Filling;
friend class GeomFill_Stretch;
friend class GeomFill_Coons;
friend class GeomFill_Curved;
friend class GeomFill_BezierCurves;
friend class GeomFill_BSplineCurves;
friend class GeomFill_Profiler;
friend class GeomFill_SectionGenerator;
friend class GeomFill_Line;
friend class GeomFill_AppSurf;
friend class GeomFill_SweepSectionGenerator;
friend class GeomFill_AppSweep;
friend class GeomFill_Generator;
friend class GeomFill_Pipe;
friend class GeomFill_Tensor;
friend class GeomFill_ConstrainedFilling;
friend class GeomFill_Boundary;
friend class GeomFill_DegeneratedBound;
friend class GeomFill_SimpleBound;
friend class GeomFill_BoundWithSurf;
friend class GeomFill_CoonsAlgPatch;
friend class GeomFill_TgtField;
friend class GeomFill_TgtOnCoons;
friend class GeomFill_CornerState;
friend class GeomFill_CircularBlendFunc;
friend class GeomFill_SweepFunction;
friend class GeomFill_LocFunction;
friend class GeomFill_PolynomialConvertor;
friend class GeomFill_QuasiAngularConvertor;
friend class GeomFill_SnglrFunc;
friend class GeomFill_FunctionDraft;
friend class GeomFill_PlanFunc;
friend class GeomFill_FunctionGuide;
friend class GeomFill_SectionLaw;
friend class GeomFill_UniformSection;
friend class GeomFill_EvolvedSection;
friend class GeomFill_NSections;
friend class GeomFill_LocationLaw;
friend class GeomFill_CurveAndTrihedron;
friend class GeomFill_LocationDraft;
friend class GeomFill_LocationGuide;
friend class GeomFill_TrihedronLaw;
friend class GeomFill_Fixed;
friend class GeomFill_Frenet;
friend class GeomFill_CorrectedFrenet;
friend class GeomFill_DiscreteTrihedron;
friend class GeomFill_ConstantBiNormal;
friend class GeomFill_Darboux;
friend class GeomFill_DraftTrihedron;
friend class GeomFill_TrihedronWithGuide;
friend class GeomFill_GuideTrihedronAC;
friend class GeomFill_GuideTrihedronPlan;
friend class GeomFill_Sweep;
friend class GeomFill_SectionPlacement;
};
#endif // _GeomFill_HeaderFile

View File

@@ -0,0 +1,180 @@
// Created on: 1993-09-28
// Created by: Bruno DUMORTIER
// Copyright (c) 1993-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 _GeomFill_AppSurf_HeaderFile
#define _GeomFill_AppSurf_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Real.hxx>
#include <TColgp_HArray2OfPnt.hxx>
#include <TColStd_HArray2OfReal.hxx>
#include <TColStd_HArray1OfReal.hxx>
#include <TColStd_HArray1OfInteger.hxx>
#include <TColgp_SequenceOfArray1OfPnt2d.hxx>
#include <Approx_ParametrizationType.hxx>
#include <GeomAbs_Shape.hxx>
#include <AppBlend_Approx.hxx>
#include <TColgp_Array2OfPnt.hxx>
#include <TColStd_Array2OfReal.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <TColStd_Array1OfInteger.hxx>
#include <TColgp_Array1OfPnt2d.hxx>
class StdFail_NotDone;
class Standard_DomainError;
class Standard_OutOfRange;
class GeomFill_SectionGenerator;
class GeomFill_Line;
class GeomFill_AppSurf : public AppBlend_Approx
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT GeomFill_AppSurf();
Standard_EXPORT GeomFill_AppSurf(const Standard_Integer Degmin, const Standard_Integer Degmax, const Standard_Real Tol3d, const Standard_Real Tol2d, const Standard_Integer NbIt, const Standard_Boolean KnownParameters = Standard_False);
Standard_EXPORT void Init (const Standard_Integer Degmin, const Standard_Integer Degmax, const Standard_Real Tol3d, const Standard_Real Tol2d, const Standard_Integer NbIt, const Standard_Boolean KnownParameters = Standard_False);
Standard_EXPORT void SetParType (const Approx_ParametrizationType ParType);
Standard_EXPORT void SetContinuity (const GeomAbs_Shape C);
Standard_EXPORT void SetCriteriumWeight (const Standard_Real W1, const Standard_Real W2, const Standard_Real W3);
Standard_EXPORT Approx_ParametrizationType ParType() const;
Standard_EXPORT GeomAbs_Shape Continuity() const;
Standard_EXPORT void CriteriumWeight (Standard_Real& W1, Standard_Real& W2, Standard_Real& W3) const;
Standard_EXPORT void Perform (const Handle(GeomFill_Line)& Lin, GeomFill_SectionGenerator& SecGen, const Standard_Boolean SpApprox = Standard_False);
Standard_EXPORT void PerformSmoothing (const Handle(GeomFill_Line)& Lin, GeomFill_SectionGenerator& SecGen);
Standard_EXPORT void Perform (const Handle(GeomFill_Line)& Lin, GeomFill_SectionGenerator& SecGen, const Standard_Integer NbMaxP);
Standard_Boolean IsDone() const;
Standard_EXPORT void SurfShape (Standard_Integer& UDegree, Standard_Integer& VDegree, Standard_Integer& NbUPoles, Standard_Integer& NbVPoles, Standard_Integer& NbUKnots, Standard_Integer& NbVKnots) const;
Standard_EXPORT void Surface (TColgp_Array2OfPnt& TPoles, TColStd_Array2OfReal& TWeights, TColStd_Array1OfReal& TUKnots, TColStd_Array1OfReal& TVKnots, TColStd_Array1OfInteger& TUMults, TColStd_Array1OfInteger& TVMults) const;
Standard_Integer UDegree() const;
Standard_Integer VDegree() const;
const TColgp_Array2OfPnt& SurfPoles() const;
const TColStd_Array2OfReal& SurfWeights() const;
const TColStd_Array1OfReal& SurfUKnots() const;
const TColStd_Array1OfReal& SurfVKnots() const;
const TColStd_Array1OfInteger& SurfUMults() const;
const TColStd_Array1OfInteger& SurfVMults() const;
Standard_Integer NbCurves2d() const;
Standard_EXPORT void Curves2dShape (Standard_Integer& Degree, Standard_Integer& NbPoles, Standard_Integer& NbKnots) const;
Standard_EXPORT void Curve2d (const Standard_Integer Index, TColgp_Array1OfPnt2d& TPoles, TColStd_Array1OfReal& TKnots, TColStd_Array1OfInteger& TMults) const;
Standard_Integer Curves2dDegree() const;
const TColgp_Array1OfPnt2d& Curve2dPoles (const Standard_Integer Index) const;
const TColStd_Array1OfReal& Curves2dKnots() const;
const TColStd_Array1OfInteger& Curves2dMults() const;
void TolReached (Standard_Real& Tol3d, Standard_Real& Tol2d) const;
Standard_EXPORT Standard_Real TolCurveOnSurf (const Standard_Integer Index) const;
protected:
private:
Standard_EXPORT void InternalPerform (const Handle(GeomFill_Line)& Lin, GeomFill_SectionGenerator& SecGen, const Standard_Boolean SpApprox, const Standard_Boolean UseVariational);
Standard_Boolean done;
Standard_Integer dmin;
Standard_Integer dmax;
Standard_Real tol3d;
Standard_Real tol2d;
Standard_Integer nbit;
Standard_Integer udeg;
Standard_Integer vdeg;
Standard_Boolean knownp;
Handle(TColgp_HArray2OfPnt) tabPoles;
Handle(TColStd_HArray2OfReal) tabWeights;
Handle(TColStd_HArray1OfReal) tabUKnots;
Handle(TColStd_HArray1OfReal) tabVKnots;
Handle(TColStd_HArray1OfInteger) tabUMults;
Handle(TColStd_HArray1OfInteger) tabVMults;
TColgp_SequenceOfArray1OfPnt2d seqPoles2d;
Standard_Real tol3dreached;
Standard_Real tol2dreached;
Approx_ParametrizationType paramtype;
GeomAbs_Shape continuity;
Standard_Real critweights[3];
};
#define TheSectionGenerator GeomFill_SectionGenerator
#define TheSectionGenerator_hxx <GeomFill_SectionGenerator.hxx>
#define Handle_TheLine Handle(GeomFill_Line)
#define TheLine GeomFill_Line
#define TheLine_hxx <GeomFill_Line.hxx>
#define AppBlend_AppSurf GeomFill_AppSurf
#define AppBlend_AppSurf_hxx <GeomFill_AppSurf.hxx>
#include <AppBlend_AppSurf.lxx>
#undef TheSectionGenerator
#undef TheSectionGenerator_hxx
#undef Handle_TheLine
#undef TheLine
#undef TheLine_hxx
#undef AppBlend_AppSurf
#undef AppBlend_AppSurf_hxx
#endif // _GeomFill_AppSurf_HeaderFile

View File

@@ -0,0 +1,34 @@
// Created on: 1993-09-28
// Created by: Bruno DUMORTIER
// Copyright (c) 1993-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 <GeomFill_AppSurf.hxx>
#include <StdFail_NotDone.hxx>
#include <Standard_DomainError.hxx>
#include <Standard_OutOfRange.hxx>
#include <GeomFill_SectionGenerator.hxx>
#include <GeomFill_Line.hxx>
#define TheSectionGenerator GeomFill_SectionGenerator
#define TheSectionGenerator_hxx <GeomFill_SectionGenerator.hxx>
#define Handle_TheLine Handle(GeomFill_Line)
#define TheLine GeomFill_Line
#define TheLine_hxx <GeomFill_Line.hxx>
#define AppBlend_AppSurf GeomFill_AppSurf
#define AppBlend_AppSurf_hxx <GeomFill_AppSurf.hxx>
#include <AppBlend_AppSurf.gxx>

View File

@@ -0,0 +1,180 @@
// Created on: 1993-09-28
// Created by: Bruno DUMORTIER
// Copyright (c) 1993-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 _GeomFill_AppSweep_HeaderFile
#define _GeomFill_AppSweep_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Real.hxx>
#include <TColgp_HArray2OfPnt.hxx>
#include <TColStd_HArray2OfReal.hxx>
#include <TColStd_HArray1OfReal.hxx>
#include <TColStd_HArray1OfInteger.hxx>
#include <TColgp_SequenceOfArray1OfPnt2d.hxx>
#include <Approx_ParametrizationType.hxx>
#include <GeomAbs_Shape.hxx>
#include <AppBlend_Approx.hxx>
#include <TColgp_Array2OfPnt.hxx>
#include <TColStd_Array2OfReal.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <TColStd_Array1OfInteger.hxx>
#include <TColgp_Array1OfPnt2d.hxx>
class StdFail_NotDone;
class Standard_DomainError;
class Standard_OutOfRange;
class GeomFill_SweepSectionGenerator;
class GeomFill_Line;
class GeomFill_AppSweep : public AppBlend_Approx
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT GeomFill_AppSweep();
Standard_EXPORT GeomFill_AppSweep(const Standard_Integer Degmin, const Standard_Integer Degmax, const Standard_Real Tol3d, const Standard_Real Tol2d, const Standard_Integer NbIt, const Standard_Boolean KnownParameters = Standard_False);
Standard_EXPORT void Init (const Standard_Integer Degmin, const Standard_Integer Degmax, const Standard_Real Tol3d, const Standard_Real Tol2d, const Standard_Integer NbIt, const Standard_Boolean KnownParameters = Standard_False);
Standard_EXPORT void SetParType (const Approx_ParametrizationType ParType);
Standard_EXPORT void SetContinuity (const GeomAbs_Shape C);
Standard_EXPORT void SetCriteriumWeight (const Standard_Real W1, const Standard_Real W2, const Standard_Real W3);
Standard_EXPORT Approx_ParametrizationType ParType() const;
Standard_EXPORT GeomAbs_Shape Continuity() const;
Standard_EXPORT void CriteriumWeight (Standard_Real& W1, Standard_Real& W2, Standard_Real& W3) const;
Standard_EXPORT void Perform (const Handle(GeomFill_Line)& Lin, GeomFill_SweepSectionGenerator& SecGen, const Standard_Boolean SpApprox = Standard_False);
Standard_EXPORT void PerformSmoothing (const Handle(GeomFill_Line)& Lin, GeomFill_SweepSectionGenerator& SecGen);
Standard_EXPORT void Perform (const Handle(GeomFill_Line)& Lin, GeomFill_SweepSectionGenerator& SecGen, const Standard_Integer NbMaxP);
Standard_Boolean IsDone() const;
Standard_EXPORT void SurfShape (Standard_Integer& UDegree, Standard_Integer& VDegree, Standard_Integer& NbUPoles, Standard_Integer& NbVPoles, Standard_Integer& NbUKnots, Standard_Integer& NbVKnots) const;
Standard_EXPORT void Surface (TColgp_Array2OfPnt& TPoles, TColStd_Array2OfReal& TWeights, TColStd_Array1OfReal& TUKnots, TColStd_Array1OfReal& TVKnots, TColStd_Array1OfInteger& TUMults, TColStd_Array1OfInteger& TVMults) const;
Standard_Integer UDegree() const;
Standard_Integer VDegree() const;
const TColgp_Array2OfPnt& SurfPoles() const;
const TColStd_Array2OfReal& SurfWeights() const;
const TColStd_Array1OfReal& SurfUKnots() const;
const TColStd_Array1OfReal& SurfVKnots() const;
const TColStd_Array1OfInteger& SurfUMults() const;
const TColStd_Array1OfInteger& SurfVMults() const;
Standard_Integer NbCurves2d() const;
Standard_EXPORT void Curves2dShape (Standard_Integer& Degree, Standard_Integer& NbPoles, Standard_Integer& NbKnots) const;
Standard_EXPORT void Curve2d (const Standard_Integer Index, TColgp_Array1OfPnt2d& TPoles, TColStd_Array1OfReal& TKnots, TColStd_Array1OfInteger& TMults) const;
Standard_Integer Curves2dDegree() const;
const TColgp_Array1OfPnt2d& Curve2dPoles (const Standard_Integer Index) const;
const TColStd_Array1OfReal& Curves2dKnots() const;
const TColStd_Array1OfInteger& Curves2dMults() const;
void TolReached (Standard_Real& Tol3d, Standard_Real& Tol2d) const;
Standard_EXPORT Standard_Real TolCurveOnSurf (const Standard_Integer Index) const;
protected:
private:
Standard_EXPORT void InternalPerform (const Handle(GeomFill_Line)& Lin, GeomFill_SweepSectionGenerator& SecGen, const Standard_Boolean SpApprox, const Standard_Boolean UseVariational);
Standard_Boolean done;
Standard_Integer dmin;
Standard_Integer dmax;
Standard_Real tol3d;
Standard_Real tol2d;
Standard_Integer nbit;
Standard_Integer udeg;
Standard_Integer vdeg;
Standard_Boolean knownp;
Handle(TColgp_HArray2OfPnt) tabPoles;
Handle(TColStd_HArray2OfReal) tabWeights;
Handle(TColStd_HArray1OfReal) tabUKnots;
Handle(TColStd_HArray1OfReal) tabVKnots;
Handle(TColStd_HArray1OfInteger) tabUMults;
Handle(TColStd_HArray1OfInteger) tabVMults;
TColgp_SequenceOfArray1OfPnt2d seqPoles2d;
Standard_Real tol3dreached;
Standard_Real tol2dreached;
Approx_ParametrizationType paramtype;
GeomAbs_Shape continuity;
Standard_Real critweights[3];
};
#define TheSectionGenerator GeomFill_SweepSectionGenerator
#define TheSectionGenerator_hxx <GeomFill_SweepSectionGenerator.hxx>
#define Handle_TheLine Handle(GeomFill_Line)
#define TheLine GeomFill_Line
#define TheLine_hxx <GeomFill_Line.hxx>
#define AppBlend_AppSurf GeomFill_AppSweep
#define AppBlend_AppSurf_hxx <GeomFill_AppSweep.hxx>
#include <AppBlend_AppSurf.lxx>
#undef TheSectionGenerator
#undef TheSectionGenerator_hxx
#undef Handle_TheLine
#undef TheLine
#undef TheLine_hxx
#undef AppBlend_AppSurf
#undef AppBlend_AppSurf_hxx
#endif // _GeomFill_AppSweep_HeaderFile

View File

@@ -0,0 +1,34 @@
// Created on: 1993-09-28
// Created by: Bruno DUMORTIER
// Copyright (c) 1993-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 <GeomFill_AppSweep.hxx>
#include <StdFail_NotDone.hxx>
#include <Standard_DomainError.hxx>
#include <Standard_OutOfRange.hxx>
#include <GeomFill_SweepSectionGenerator.hxx>
#include <GeomFill_Line.hxx>
#define TheSectionGenerator GeomFill_SweepSectionGenerator
#define TheSectionGenerator_hxx <GeomFill_SweepSectionGenerator.hxx>
#define Handle_TheLine Handle(GeomFill_Line)
#define TheLine GeomFill_Line
#define TheLine_hxx <GeomFill_Line.hxx>
#define AppBlend_AppSurf GeomFill_AppSweep
#define AppBlend_AppSurf_hxx <GeomFill_AppSweep.hxx>
#include <AppBlend_AppSurf.gxx>

View File

@@ -0,0 +1,27 @@
// Created on: 1993-09-28
// Created by: Bruno DUMORTIER
// Copyright (c) 1993-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 _GeomFill_ApproxStyle_HeaderFile
#define _GeomFill_ApproxStyle_HeaderFile
enum GeomFill_ApproxStyle
{
GeomFill_Section,
GeomFill_Location
};
#endif // _GeomFill_ApproxStyle_HeaderFile

View File

@@ -1,110 +0,0 @@
-- Created on: 1993-10-06
-- Created by: Bruno DUMORTIER
-- Copyright (c) 1993-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 BSplineCurves from GeomFill
---Purpose: An algorithm for constructing a BSpline surface filled
-- from contiguous BSpline curves which form its boundaries.
-- The algorithm accepts two, three or four BSpline
-- curves as the boundaries of the target surface.
-- A range of filling styles - more or less rounded, more
-- or less flat - is available.
-- A BSplineCurves object provides a framework for:
-- - defining the boundaries, and the filling style of the surface
-- - implementing the construction algorithm
-- - consulting the result.
-- Warning
-- Some problems may show up with rational curves.
uses
BSplineCurve from Geom,
BSplineSurface from Geom,
FillingStyle from GeomFill
raises
ConstructionError from Standard
is
Create;
---Purpose: Constructs a default BSpline surface framework.
Create( C1, C2, C3, C4 : BSplineCurve from Geom;
Type : FillingStyle from GeomFill)
returns BSplineCurves from GeomFill;
Create( C1, C2, C3 : BSplineCurve from Geom;
Type : FillingStyle from GeomFill)
returns BSplineCurves from GeomFill;
Create( C1, C2 : BSplineCurve from Geom;
Type : FillingStyle from GeomFill)
returns BSplineCurves from GeomFill;
---Purpose: Constructs a framework for building a BSpline surface from either
-- - the four contiguous BSpline curves, C1, C2, C3 and C4, or
-- - the three contiguous BSpline curves, C1, C2 and C3, or
-- - the two contiguous BSpline curves, C1 and C2.
-- The type of filling style Type to be used is one of:
-- - GeomFill_Stretch - the style with the flattest patch
-- - GeomFill_Coons - a rounded style of patch with
-- less depth than that of Curved
-- - GeomFill_Curved - the style with the most rounded
-- patch.Constructs a framework for building a BSpline
-- surface common to the two BSpline curves, C1 and C2.
-- Exceptions
-- Standard_ConstructionError if the curves are not contiguous.
Init( me : in out;
C1, C2, C3, C4 : BSplineCurve from Geom;
Type : FillingStyle from GeomFill)
raises
ConstructionError from Standard
---Purpose: if the curves cannot be joined
is static;
Init( me : in out;
C1, C2, C3 : BSplineCurve from Geom;
Type : FillingStyle from GeomFill)
raises
ConstructionError from Standard
---Purpose: if the curves cannot be joined
is static;
Init( me : in out;
C1, C2 : BSplineCurve from Geom;
Type : FillingStyle from GeomFill)
is static;
---Purpose: Initializes or reinitializes this algorithm with two, three,
-- or four curves - C1, C2, C3, and C4 - and Type, one
-- of the following filling styles:
-- - GeomFill_Stretch - the style with the flattest patch
-- - GeomFill_Coons - a rounded style of patch with
-- less depth than that of Curved
-- - GeomFill_Curved - the style with the most rounded patch.
-- Exceptions
-- Standard_ConstructionError if the curves are not contiguous.
Surface(me) returns BSplineSurface from Geom
---Purpose: Returns the BSpline surface Surface resulting from
-- the computation performed by this algorithm.
---C++: return const&
---C++: inline
is static;
fields
mySurface : BSplineSurface from Geom;
end BSplineCurves;

View File

@@ -14,24 +14,23 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GeomFill_BSplineCurves.ixx>
#include <GeomFill_Filling.hxx>
#include <GeomFill_Stretch.hxx>
#include <BSplCLib.hxx>
#include <Geom_BSplineCurve.hxx>
#include <Geom_BSplineSurface.hxx>
#include <GeomFill_BSplineCurves.hxx>
#include <GeomFill_Coons.hxx>
#include <GeomFill_Curved.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <TColStd_Array1OfInteger.hxx>
#include <TColStd_Array2OfReal.hxx>
#include <GeomFill_Filling.hxx>
#include <GeomFill_Stretch.hxx>
#include <Precision.hxx>
#include <Standard_ConstructionError.hxx>
#include <Standard_NotImplemented.hxx>
#include <TColgp_Array1OfPnt.hxx>
#include <TColgp_Array2OfPnt.hxx>
#include <Standard_NotImplemented.hxx>
#include <BSplCLib.hxx>
#include <Precision.hxx>
#include <Geom_BSplineCurve.hxx>
#include <TColStd_Array1OfInteger.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <TColStd_Array2OfReal.hxx>
//=======================================================================
//function : Arrange
@@ -49,7 +48,6 @@
// ----->-----
// CC1 = C1
//=======================================================================
Standard_Boolean Arrange(const Handle(Geom_BSplineCurve)& C1,
const Handle(Geom_BSplineCurve)& C2,
const Handle(Geom_BSplineCurve)& C3,

View File

@@ -0,0 +1,117 @@
// Created on: 1993-10-06
// Created by: Bruno DUMORTIER
// Copyright (c) 1993-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 _GeomFill_BSplineCurves_HeaderFile
#define _GeomFill_BSplineCurves_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <GeomFill_FillingStyle.hxx>
class Geom_BSplineSurface;
class Standard_ConstructionError;
class Geom_BSplineCurve;
//! An algorithm for constructing a BSpline surface filled
//! from contiguous BSpline curves which form its boundaries.
//! The algorithm accepts two, three or four BSpline
//! curves as the boundaries of the target surface.
//! A range of filling styles - more or less rounded, more
//! or less flat - is available.
//! A BSplineCurves object provides a framework for:
//! - defining the boundaries, and the filling style of the surface
//! - implementing the construction algorithm
//! - consulting the result.
//! Warning
//! Some problems may show up with rational curves.
class GeomFill_BSplineCurves
{
public:
DEFINE_STANDARD_ALLOC
//! Constructs a default BSpline surface framework.
Standard_EXPORT GeomFill_BSplineCurves();
Standard_EXPORT GeomFill_BSplineCurves(const Handle(Geom_BSplineCurve)& C1, const Handle(Geom_BSplineCurve)& C2, const Handle(Geom_BSplineCurve)& C3, const Handle(Geom_BSplineCurve)& C4, const GeomFill_FillingStyle Type);
Standard_EXPORT GeomFill_BSplineCurves(const Handle(Geom_BSplineCurve)& C1, const Handle(Geom_BSplineCurve)& C2, const Handle(Geom_BSplineCurve)& C3, const GeomFill_FillingStyle Type);
//! Constructs a framework for building a BSpline surface from either
//! - the four contiguous BSpline curves, C1, C2, C3 and C4, or
//! - the three contiguous BSpline curves, C1, C2 and C3, or
//! - the two contiguous BSpline curves, C1 and C2.
//! The type of filling style Type to be used is one of:
//! - GeomFill_Stretch - the style with the flattest patch
//! - GeomFill_Coons - a rounded style of patch with
//! less depth than that of Curved
//! - GeomFill_Curved - the style with the most rounded
//! patch.Constructs a framework for building a BSpline
//! surface common to the two BSpline curves, C1 and C2.
//! Exceptions
//! Standard_ConstructionError if the curves are not contiguous.
Standard_EXPORT GeomFill_BSplineCurves(const Handle(Geom_BSplineCurve)& C1, const Handle(Geom_BSplineCurve)& C2, const GeomFill_FillingStyle Type);
//! if the curves cannot be joined
Standard_EXPORT void Init (const Handle(Geom_BSplineCurve)& C1, const Handle(Geom_BSplineCurve)& C2, const Handle(Geom_BSplineCurve)& C3, const Handle(Geom_BSplineCurve)& C4, const GeomFill_FillingStyle Type);
//! if the curves cannot be joined
Standard_EXPORT void Init (const Handle(Geom_BSplineCurve)& C1, const Handle(Geom_BSplineCurve)& C2, const Handle(Geom_BSplineCurve)& C3, const GeomFill_FillingStyle Type);
//! Initializes or reinitializes this algorithm with two, three,
//! or four curves - C1, C2, C3, and C4 - and Type, one
//! of the following filling styles:
//! - GeomFill_Stretch - the style with the flattest patch
//! - GeomFill_Coons - a rounded style of patch with
//! less depth than that of Curved
//! - GeomFill_Curved - the style with the most rounded patch.
//! Exceptions
//! Standard_ConstructionError if the curves are not contiguous.
Standard_EXPORT void Init (const Handle(Geom_BSplineCurve)& C1, const Handle(Geom_BSplineCurve)& C2, const GeomFill_FillingStyle Type);
//! Returns the BSpline surface Surface resulting from
//! the computation performed by this algorithm.
const Handle(Geom_BSplineSurface)& Surface() const;
protected:
private:
Handle(Geom_BSplineSurface) mySurface;
};
#include <GeomFill_BSplineCurves.lxx>
#endif // _GeomFill_BSplineCurves_HeaderFile

View File

@@ -1,103 +0,0 @@
-- Created on: 1993-10-06
-- Created by: Bruno DUMORTIER
-- Copyright (c) 1993-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 BezierCurves from GeomFill
---Purpose: This class provides an algorithm for constructing a Bezier surface filled from
-- contiguous Bezier curves which form its boundaries.
-- The algorithm accepts two, three or four Bezier curves
-- as the boundaries of the target surface.
-- A range of filling styles - more or less rounded, more or less flat - is available.
-- A BezierCurves object provides a framework for:
-- - defining the boundaries, and the filling style of the surface
-- - implementing the construction algorithm
-- - consulting the result.
-- Warning
-- Some problems may show up with rational curves.
uses
BezierCurve from Geom,
BezierSurface from Geom,
FillingStyle from GeomFill
raises
ConstructionError from Standard
is
Create;
--- Purpose: Constructs an empty framework for building a Bezier
-- surface from contiguous Bezier curves.
-- You use the Init function to define the boundaries of the surface.
Create( C1, C2, C3, C4 : BezierCurve from Geom;
Type : FillingStyle from GeomFill)
returns BezierCurves from GeomFill;
---Purpose: Constructs a framework for building a Bezier surface
-- from the four contiguous Bezier curves, C1, C2, C3 and C4
-- Raises Standard_ConstructionError if the curves are not contiguous.
Create( C1, C2, C3 : BezierCurve from Geom;
Type : FillingStyle from GeomFill)
returns BezierCurves from GeomFill;
---Purpose: Constructs a framework for building a Bezier surface
-- from the three contiguous Bezier curves, C1, C2 and C3
-- Raises Standard_ConstructionError if the curves are not contiguous.
Create( C1, C2 : BezierCurve from Geom;
Type : FillingStyle from GeomFill)
returns BezierCurves from GeomFill;
---Purpose: Constructs a framework for building a Bezier surface
-- from the two contiguous Bezier curves, C1 and C2
-- Raises Standard_ConstructionError if the curves are not contiguous.
Init( me : in out;
C1, C2, C3, C4 : BezierCurve from Geom;
Type : FillingStyle from GeomFill)
raises
ConstructionError from Standard
---Purpose: if the curves cannot be joined
is static;
Init( me : in out;
C1, C2, C3 : BezierCurve from Geom;
Type : FillingStyle from GeomFill)
raises
ConstructionError from Standard
---Purpose: if the curves cannot be joined
is static;
Init( me : in out;
C1, C2 : BezierCurve from Geom;
Type : FillingStyle from GeomFill)
is static;
---Purpose: Initializes or reinitializes this algorithm with two, three,
-- or four curves - C1, C2, C3, and C4 - and Type, one
-- of the following filling styles:
-- - GeomFill_Stretch - the style with the flattest patch
-- - GeomFill_Coons - a rounded style of patch with
-- less depth than that of Curved
-- - GeomFill_Curved - the style with the most rounded patch.
-- Exceptions
-- Standard_ConstructionError if the curves are not contiguous.
Surface(me) returns BezierSurface from Geom
---Purpose: Returns the Bezier surface resulting from the
-- computation performed by this algorithm.
---C++: return const&
---C++: inline
is static;
fields
mySurface : BezierSurface from Geom;
end BezierCurves;

View File

@@ -14,23 +14,21 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GeomFill_BezierCurves.ixx>
#include <GeomFill_Filling.hxx>
#include <GeomFill_Stretch.hxx>
#include <GeomFill_Coons.hxx>
#include <GeomFill_Curved.hxx>
#include <Precision.hxx>
#include <Geom_BezierCurve.hxx>
#include <Geom_BezierSurface.hxx>
#include <GeomFill_BezierCurves.hxx>
#include <GeomFill_Coons.hxx>
#include <GeomFill_Curved.hxx>
#include <GeomFill_Filling.hxx>
#include <GeomFill_Stretch.hxx>
#include <Precision.hxx>
#include <Standard_ConstructionError.hxx>
#include <Standard_NotImplemented.hxx>
#include <TColgp_Array1OfPnt.hxx>
#include <TColgp_Array2OfPnt.hxx>
#include <TColStd_Array2OfReal.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <TColStd_Array2OfReal.hxx>
//=======================================================================
//function : SetSameWeights
@@ -44,7 +42,6 @@
// the geometry of the curve.
// Only the length of the derivatives are changed.
//=======================================================================
void SetSameWeights(TColStd_Array1OfReal& W1,
TColStd_Array1OfReal& W2,
TColStd_Array1OfReal& W3,

View File

@@ -0,0 +1,114 @@
// Created on: 1993-10-06
// Created by: Bruno DUMORTIER
// Copyright (c) 1993-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 _GeomFill_BezierCurves_HeaderFile
#define _GeomFill_BezierCurves_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <GeomFill_FillingStyle.hxx>
class Geom_BezierSurface;
class Standard_ConstructionError;
class Geom_BezierCurve;
//! This class provides an algorithm for constructing a Bezier surface filled from
//! contiguous Bezier curves which form its boundaries.
//! The algorithm accepts two, three or four Bezier curves
//! as the boundaries of the target surface.
//! A range of filling styles - more or less rounded, more or less flat - is available.
//! A BezierCurves object provides a framework for:
//! - defining the boundaries, and the filling style of the surface
//! - implementing the construction algorithm
//! - consulting the result.
//! Warning
//! Some problems may show up with rational curves.
class GeomFill_BezierCurves
{
public:
DEFINE_STANDARD_ALLOC
//! Constructs an empty framework for building a Bezier
//! surface from contiguous Bezier curves.
//! You use the Init function to define the boundaries of the surface.
Standard_EXPORT GeomFill_BezierCurves();
//! Constructs a framework for building a Bezier surface
//! from the four contiguous Bezier curves, C1, C2, C3 and C4
//! Raises Standard_ConstructionError if the curves are not contiguous.
Standard_EXPORT GeomFill_BezierCurves(const Handle(Geom_BezierCurve)& C1, const Handle(Geom_BezierCurve)& C2, const Handle(Geom_BezierCurve)& C3, const Handle(Geom_BezierCurve)& C4, const GeomFill_FillingStyle Type);
//! Constructs a framework for building a Bezier surface
//! from the three contiguous Bezier curves, C1, C2 and C3
//! Raises Standard_ConstructionError if the curves are not contiguous.
Standard_EXPORT GeomFill_BezierCurves(const Handle(Geom_BezierCurve)& C1, const Handle(Geom_BezierCurve)& C2, const Handle(Geom_BezierCurve)& C3, const GeomFill_FillingStyle Type);
//! Constructs a framework for building a Bezier surface
//! from the two contiguous Bezier curves, C1 and C2
//! Raises Standard_ConstructionError if the curves are not contiguous.
Standard_EXPORT GeomFill_BezierCurves(const Handle(Geom_BezierCurve)& C1, const Handle(Geom_BezierCurve)& C2, const GeomFill_FillingStyle Type);
//! if the curves cannot be joined
Standard_EXPORT void Init (const Handle(Geom_BezierCurve)& C1, const Handle(Geom_BezierCurve)& C2, const Handle(Geom_BezierCurve)& C3, const Handle(Geom_BezierCurve)& C4, const GeomFill_FillingStyle Type);
//! if the curves cannot be joined
Standard_EXPORT void Init (const Handle(Geom_BezierCurve)& C1, const Handle(Geom_BezierCurve)& C2, const Handle(Geom_BezierCurve)& C3, const GeomFill_FillingStyle Type);
//! Initializes or reinitializes this algorithm with two, three,
//! or four curves - C1, C2, C3, and C4 - and Type, one
//! of the following filling styles:
//! - GeomFill_Stretch - the style with the flattest patch
//! - GeomFill_Coons - a rounded style of patch with
//! less depth than that of Curved
//! - GeomFill_Curved - the style with the most rounded patch.
//! Exceptions
//! Standard_ConstructionError if the curves are not contiguous.
Standard_EXPORT void Init (const Handle(Geom_BezierCurve)& C1, const Handle(Geom_BezierCurve)& C2, const GeomFill_FillingStyle Type);
//! Returns the Bezier surface resulting from the
//! computation performed by this algorithm.
const Handle(Geom_BezierSurface)& Surface() const;
protected:
private:
Handle(Geom_BezierSurface) mySurface;
};
#include <GeomFill_BezierCurves.lxx>
#endif // _GeomFill_BezierCurves_HeaderFile

View File

@@ -1,116 +0,0 @@
-- Created on: 1995-10-17
-- Created by: Laurent BOURESCHE
-- 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 BoundWithSurf from GeomFill inherits Boundary from GeomFill
---Purpose: Defines a 3d curve as a boundary for a
-- GeomFill_ConstrainedFilling algorithm.
-- This curve is attached to an existing surface.
-- Defines a constrained boundary for filling
-- the computations are done with a CurveOnSurf and a
-- normals field defined by the normalized normal to
-- the surface along the PCurve.
-- Contains fields to allow a reparametrization of curve
-- and normals field.
uses
Pnt from gp,
Vec from gp,
Function from Law,
CurveOnSurface from Adaptor3d
is
Create(CurveOnSurf : CurveOnSurface from Adaptor3d;
Tol3d : Real from Standard;
Tolang : Real from Standard)
returns BoundWithSurf from GeomFill;
---Purpose:
-- Constructs a boundary object defined by the 3d curve CurveOnSurf.
-- The surface to be filled along this boundary will be in the
-- tolerance range defined by Tol3d.
-- What's more, at each point of CurveOnSurf, the angle
-- between the normal to the surface to be filled along this
-- boundary, and the normal to the surface on which
-- CurveOnSurf lies, must not be greater than TolAng.
-- This object is to be used as a boundary for a
-- GeomFill_ConstrainedFilling framework.
-- Warning
-- CurveOnSurf is an adapted curve, that is, an object
-- which is an interface between:
-- - the services provided by a curve lying on a surface from the package Geom
-- - and those required of the curve by the computation algorithm which uses it.
-- The adapted curve is created in the following way:
-- Handle(Geom_Surface) mySurface = ... ;
-- Handle(Geom2d_Curve) myParamCurve = ... ;
-- // where myParamCurve is a 2D curve in the parametric space of the surface mySurface
-- Handle(GeomAdaptor_HSurface)
-- Surface = new
-- GeomAdaptor_HSurface(mySurface);
-- Handle(Geom2dAdaptor_HCurve)
-- ParamCurve = new
-- Geom2dAdaptor_HCurve(myParamCurve);
-- CurveOnSurf = Adaptor3d_CurveOnSurface(ParamCurve,Surface);
-- The boundary is then constructed with the CurveOnSurf object:
-- Standard_Real Tol = ... ;
-- Standard_Real TolAng = ... ;
-- myBoundary = GeomFill_BoundWithSurf (
-- CurveOnSurf, Tol, TolAng );
Value(me;
U : Real from Standard)
returns Pnt from gp;
D1(me;
U : Real from Standard;
P : out Pnt from gp;
V : out Vec from gp) ;
HasNormals(me)
returns Boolean from Standard
is redefined;
Norm(me;
U : Real from Standard)
returns Vec from gp
is redefined;
D1Norm(me;
U : Real from Standard;
N : out Vec from gp;
DN : out Vec from gp)
is redefined;
Reparametrize(me : mutable;
First, Last : Real from Standard;
HasDF, HasDL : Boolean from Standard;
DF, DL : Real from Standard;
Rev : Boolean from Standard);
Bounds(me; First, Last : out Real from Standard);
IsDegenerated(me) returns Boolean from Standard;
fields
myConS : CurveOnSurface from Adaptor3d;
myPar : Function from Law;
end BoundWithSurf;

View File

@@ -14,18 +14,24 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GeomFill_BoundWithSurf.ixx>
#include <Adaptor2d_HCurve2d.hxx>
#include <Adaptor3d_CurveOnSurface.hxx>
#include <Adaptor3d_HSurface.hxx>
#include <GeomFill_BoundWithSurf.hxx>
#include <gp_Pnt.hxx>
#include <gp_Pnt2d.hxx>
#include <gp_Vec.hxx>
#include <gp_Vec2d.hxx>
#include <Law.hxx>
#include <Law_BSpFunc.hxx>
#include <Adaptor3d_HSurface.hxx>
#include <Adaptor2d_HCurve2d.hxx>
#include <gp_Pnt2d.hxx>
#include <gp_Vec2d.hxx>
#include <Law_Function.hxx>
#include <Standard_Type.hxx>
//=======================================================================
//function : GeomFill_BoundWithSurf
//purpose :
//=======================================================================
GeomFill_BoundWithSurf::GeomFill_BoundWithSurf
(const Adaptor3d_CurveOnSurface& CurveOnSurf,
const Standard_Real Tol3d,

View File

@@ -0,0 +1,125 @@
// Created on: 1995-10-17
// Created by: Laurent BOURESCHE
// 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 _GeomFill_BoundWithSurf_HeaderFile
#define _GeomFill_BoundWithSurf_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Adaptor3d_CurveOnSurface.hxx>
#include <GeomFill_Boundary.hxx>
#include <Standard_Real.hxx>
#include <Standard_Boolean.hxx>
class Law_Function;
class Adaptor3d_CurveOnSurface;
class gp_Pnt;
class gp_Vec;
class GeomFill_BoundWithSurf;
DEFINE_STANDARD_HANDLE(GeomFill_BoundWithSurf, GeomFill_Boundary)
//! Defines a 3d curve as a boundary for a
//! GeomFill_ConstrainedFilling algorithm.
//! This curve is attached to an existing surface.
//! Defines a constrained boundary for filling
//! the computations are done with a CurveOnSurf and a
//! normals field defined by the normalized normal to
//! the surface along the PCurve.
//! Contains fields to allow a reparametrization of curve
//! and normals field.
class GeomFill_BoundWithSurf : public GeomFill_Boundary
{
public:
//! Constructs a boundary object defined by the 3d curve CurveOnSurf.
//! The surface to be filled along this boundary will be in the
//! tolerance range defined by Tol3d.
//! What's more, at each point of CurveOnSurf, the angle
//! between the normal to the surface to be filled along this
//! boundary, and the normal to the surface on which
//! CurveOnSurf lies, must not be greater than TolAng.
//! This object is to be used as a boundary for a
//! GeomFill_ConstrainedFilling framework.
//! Warning
//! CurveOnSurf is an adapted curve, that is, an object
//! which is an interface between:
//! - the services provided by a curve lying on a surface from the package Geom
//! - and those required of the curve by the computation algorithm which uses it.
//! The adapted curve is created in the following way:
//! Handle(Geom_Surface) mySurface = ... ;
//! Handle(Geom2d_Curve) myParamCurve = ... ;
//! // where myParamCurve is a 2D curve in the parametric space of the surface mySurface
//! Handle(GeomAdaptor_HSurface)
//! Surface = new
//! GeomAdaptor_HSurface(mySurface);
//! Handle(Geom2dAdaptor_HCurve)
//! ParamCurve = new
//! Geom2dAdaptor_HCurve(myParamCurve);
//! CurveOnSurf = Adaptor3d_CurveOnSurface(ParamCurve,Surface);
//! The boundary is then constructed with the CurveOnSurf object:
//! Standard_Real Tol = ... ;
//! Standard_Real TolAng = ... ;
//! myBoundary = GeomFill_BoundWithSurf (
//! CurveOnSurf, Tol, TolAng );
Standard_EXPORT GeomFill_BoundWithSurf(const Adaptor3d_CurveOnSurface& CurveOnSurf, const Standard_Real Tol3d, const Standard_Real Tolang);
Standard_EXPORT gp_Pnt Value (const Standard_Real U) const;
Standard_EXPORT void D1 (const Standard_Real U, gp_Pnt& P, gp_Vec& V) const;
Standard_EXPORT virtual Standard_Boolean HasNormals() const Standard_OVERRIDE;
Standard_EXPORT virtual gp_Vec Norm (const Standard_Real U) const Standard_OVERRIDE;
Standard_EXPORT virtual void D1Norm (const Standard_Real U, gp_Vec& N, gp_Vec& DN) const Standard_OVERRIDE;
Standard_EXPORT void Reparametrize (const Standard_Real First, const Standard_Real Last, const Standard_Boolean HasDF, const Standard_Boolean HasDL, const Standard_Real DF, const Standard_Real DL, const Standard_Boolean Rev);
Standard_EXPORT void Bounds (Standard_Real& First, Standard_Real& Last) const;
Standard_EXPORT Standard_Boolean IsDegenerated() const;
DEFINE_STANDARD_RTTI(GeomFill_BoundWithSurf,GeomFill_Boundary)
protected:
private:
Adaptor3d_CurveOnSurface myConS;
Handle(Law_Function) myPar;
};
#endif // _GeomFill_BoundWithSurf_HeaderFile

View File

@@ -1,97 +0,0 @@
-- Created on: 1995-10-17
-- Created by: Laurent BOURESCHE
-- 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.
deferred class Boundary from GeomFill inherits TShared from MMgt
---Purpose: Root class to define a boundary which will form part of a
-- contour around a gap requiring filling.
-- Any new type of constrained boundary must inherit this class.
-- The GeomFill package provides two classes to define constrained boundaries:
-- - GeomFill_SimpleBound to define an unattached boundary
-- - GeomFill_BoundWithSurf to define a boundary attached to a surface.
-- These objects are used to define the boundaries for a
-- GeomFill_ConstrainedFilling framework.
uses
Pnt from gp,
Vec from gp
is
Initialize(Tol3d : Real from Standard;
Tolang : Real from Standard);
Value(me;
U : Real from Standard)
returns Pnt from gp
is deferred;
D1(me;
U : Real from Standard;
P : out Pnt from gp;
V : out Vec from gp)
is deferred;
HasNormals(me)
returns Boolean from Standard
is virtual;
-- the methods giving informations about normals are implemented
-- with a raise.
-- use a call to HasNormals before calling Norm or D1Norm.
Norm(me;
U : Real from Standard)
returns Vec from gp
is virtual;
D1Norm(me;
U : Real from Standard;
N : out Vec from gp;
DN : out Vec from gp)
is virtual;
Reparametrize(me : mutable;
First, Last : Real from Standard;
HasDF, HasDL : Boolean from Standard;
DF, DL : Real from Standard;
Rev : Boolean from Standard)
is deferred;
Points(me; PFirst, PLast : out Pnt from gp);
Bounds(me; First, Last : out Real from Standard)
is deferred;
IsDegenerated(me)
returns Boolean from Standard
is deferred;
Tol3d(me) returns Real from Standard;
Tol3d(me : mutable;
Tol : Real from Standard);
Tolang(me) returns Real from Standard;
Tolang(me : mutable;
Tol : Real from Standard);
fields
myT3d : Real from Standard;
myTang : Real from Standard;
end Boundary;

View File

@@ -14,14 +14,16 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GeomFill_Boundary.ixx>
#include <GeomFill_Boundary.hxx>
#include <gp_Pnt.hxx>
#include <gp_Vec.hxx>
#include <Standard_Type.hxx>
//=======================================================================
//function : GeomFill_Boundary
//purpose :
//=======================================================================
GeomFill_Boundary::GeomFill_Boundary(const Standard_Real Tol3d,
const Standard_Real Tolang):
myT3d(Tol3d), myTang(Tolang)

View File

@@ -0,0 +1,100 @@
// Created on: 1995-10-17
// Created by: Laurent BOURESCHE
// 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 _GeomFill_Boundary_HeaderFile
#define _GeomFill_Boundary_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Standard_Real.hxx>
#include <MMgt_TShared.hxx>
#include <Standard_Boolean.hxx>
class gp_Pnt;
class gp_Vec;
class GeomFill_Boundary;
DEFINE_STANDARD_HANDLE(GeomFill_Boundary, MMgt_TShared)
//! Root class to define a boundary which will form part of a
//! contour around a gap requiring filling.
//! Any new type of constrained boundary must inherit this class.
//! The GeomFill package provides two classes to define constrained boundaries:
//! - GeomFill_SimpleBound to define an unattached boundary
//! - GeomFill_BoundWithSurf to define a boundary attached to a surface.
//! These objects are used to define the boundaries for a
//! GeomFill_ConstrainedFilling framework.
class GeomFill_Boundary : public MMgt_TShared
{
public:
Standard_EXPORT virtual gp_Pnt Value (const Standard_Real U) const = 0;
Standard_EXPORT virtual void D1 (const Standard_Real U, gp_Pnt& P, gp_Vec& V) const = 0;
Standard_EXPORT virtual Standard_Boolean HasNormals() const;
Standard_EXPORT virtual gp_Vec Norm (const Standard_Real U) const;
Standard_EXPORT virtual void D1Norm (const Standard_Real U, gp_Vec& N, gp_Vec& DN) const;
Standard_EXPORT virtual void Reparametrize (const Standard_Real First, const Standard_Real Last, const Standard_Boolean HasDF, const Standard_Boolean HasDL, const Standard_Real DF, const Standard_Real DL, const Standard_Boolean Rev) = 0;
Standard_EXPORT void Points (gp_Pnt& PFirst, gp_Pnt& PLast) const;
Standard_EXPORT virtual void Bounds (Standard_Real& First, Standard_Real& Last) const = 0;
Standard_EXPORT virtual Standard_Boolean IsDegenerated() const = 0;
Standard_EXPORT Standard_Real Tol3d() const;
Standard_EXPORT void Tol3d (const Standard_Real Tol);
Standard_EXPORT Standard_Real Tolang() const;
Standard_EXPORT void Tolang (const Standard_Real Tol);
DEFINE_STANDARD_RTTI(GeomFill_Boundary,MMgt_TShared)
protected:
Standard_EXPORT GeomFill_Boundary(const Standard_Real Tol3d, const Standard_Real Tolang);
private:
Standard_Real myT3d;
Standard_Real myTang;
};
#endif // _GeomFill_Boundary_HeaderFile

View File

@@ -1,237 +0,0 @@
-- Created on: 1997-07-11
-- 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.
private class CircularBlendFunc from GeomFill
inherits SweepFunction from Approx
---Purpose: Circular Blend Function to approximate by
-- SweepApproximation from Approx
uses
HCurve from Adaptor3d,
BSplineCurve from Geom,
ParameterisationType from Convert,
Array1OfPnt from TColgp,
Array1OfVec from TColgp,
Array1OfPnt2d from TColgp,
Array1OfVec2d from TColgp,
Array1OfReal from TColStd,
Array1OfInteger from TColStd,
Shape from GeomAbs,
Pnt from gp
raises OutOfRange from Standard
is
Create( Path : HCurve from Adaptor3d;
Curve1 : HCurve from Adaptor3d;
Curve2 : HCurve from Adaptor3d;
Radius : Real from Standard;
Polynomial : Boolean = Standard_False)
---Purpose: Create a Blend with a constant radius with 2
-- guide-line. <FShape> sets the type of fillet
-- surface. The -- default value is Convert_TgtThetaOver2 (classical --
-- nurbs -- representation of circles).
-- ChFi3d_QuasiAngular -- corresponds to a nurbs
-- representation of circles -- which
-- parameterisation matches the circle one. --
-- ChFi3d_Polynomial corresponds to a polynomial --
-- representation of circles.
returns CircularBlendFunc from GeomFill;
-- --
-- To compute Sections and derivatives Sections
--
--
D0(me : mutable;
Param: Real;
First, Last : Real;
Poles : out Array1OfPnt from TColgp;
Poles2d : out Array1OfPnt2d from TColgp;
Weigths : out Array1OfReal from TColStd)
---Purpose: compute the section for v = param
returns Boolean is redefined;
D1(me : mutable;
Param: Real;
First, Last : Real;
Poles : out Array1OfPnt from TColgp;
DPoles : out Array1OfVec from TColgp;
Poles2d : out Array1OfPnt2d from TColgp;
DPoles2d : out Array1OfVec2d from TColgp;
Weigths : out Array1OfReal from TColStd;
DWeigths : out Array1OfReal from TColStd)
---Purpose: compute the first derivative in v direction of the
-- section for v = param
returns Boolean
is redefined;
D2(me : mutable;
Param: Real;
First, Last : Real;
Poles : out Array1OfPnt from TColgp;
DPoles : out Array1OfVec from TColgp;
D2Poles : out Array1OfVec from TColgp;
Poles2d : out Array1OfPnt2d from TColgp;
DPoles2d : out Array1OfVec2d from TColgp;
D2Poles2d : out Array1OfVec2d from TColgp;
Weigths : out Array1OfReal from TColStd;
DWeigths : out Array1OfReal from TColStd;
D2Weigths : out Array1OfReal from TColStd)
---Purpose: compute the second derivative in v direction of the
-- section for v = param
returns Boolean
is redefined;
--
-- General Information On The Function
--
Nb2dCurves(me)
---Purpose: get the number of 2d curves to approximate.
returns Integer is redefined;
SectionShape(me; NbPoles : out Integer from Standard;
NbKnots : out Integer from Standard;
Degree : out Integer from Standard)
---Purpose: get the format of an section
is redefined;
Knots(me; TKnots: out Array1OfReal from TColStd)
---Purpose: get the Knots of the section
is redefined;
Mults(me; TMults: out Array1OfInteger from TColStd)
---Purpose: get the Multplicities of the section
is redefined;
IsRational(me)
---Purpose: Returns if the section is rationnal or not
returns Boolean is redefined;
--
-- Mangement of continuity
--
NbIntervals(me; S : Shape from GeomAbs)
---Purpose: Returns the number of intervals for continuity
-- <S>. May be one if Continuity(me) >= <S>
returns Integer is redefined;
Intervals(me; T : in out Array1OfReal from TColStd;
S : Shape from GeomAbs)
---Purpose: Stores in <T> the parameters bounding the intervals
-- of continuity <S>.
--
-- The array must provide enough room to accomodate
-- for the parameters. i.e. T.Length() > NbIntervals()
raises
OutOfRange from Standard
is redefined;
SetInterval(me: mutable; First, Last: Real from Standard)
---Purpose: Sets the bounds of the parametric interval on
-- the fonction
-- This determines the derivatives in these values if the
-- function is not Cn.
is redefined;
--
-- To help computation of Tolerance
--
-- Evaluation of error, in 2d space, or on rational function, is
-- dificult. The folowing methodes can help
--
--
GetTolerance(me;
BoundTol, SurfTol, AngleTol : Real;
Tol3d : out Array1OfReal)
---Purpose: Returns the tolerance to reach in approximation
-- to respecte
-- BoundTol error at the Boundary
-- AngleTol tangent error at the Boundary (in radian)
-- SurfTol error inside the surface.
is redefined;
SetTolerance(me : mutable; Tol3d, Tol2d : Real)
---Purpose: Is usfull, if (me) have to be run numerical
-- algorithme to perform D0, D1 or D2
is redefined;
BarycentreOfSurf(me)
---Purpose: Get the barycentre of Surface. An very poor
-- estimation is sufficent. This information is usefull
-- to perform well conditionned rational approximation.
-- Warning: Used only if <me> IsRational
returns Pnt from gp
is redefined;
MaximalSection(me) returns Real
---Purpose: Returns the length of the maximum section. This
-- information is usefull to perform well conditionned rational
-- approximation.
-- Warning: Used only if <me> IsRational
is redefined;
GetMinimalWeight(me; Weigths : out Array1OfReal from TColStd)
---Purpose: Compute the minimal value of weight for each poles
-- of all sections. This information is usefull to
-- perform well conditionned rational approximation.
-- Warning: Used only if <me> IsRational
is redefined;
-- Private methods
Discret(me:mutable)
is private;
fields
myBary : Pnt from gp;
myRadius : Real;
maxang : Real;
minang : Real;
distmin : Real;
myPath : HCurve from Adaptor3d;
myCurve1 : HCurve from Adaptor3d;
myCurve2 : HCurve from Adaptor3d;
myTPath : HCurve from Adaptor3d;
myTCurve1 : HCurve from Adaptor3d;
myTCurve2 : HCurve from Adaptor3d;
myDegree : Integer;
myNbKnots : Integer;
myNbPoles : Integer;
myTConv : ParameterisationType from Convert;
myreverse : Boolean;
end CircularBlendFunc;

View File

@@ -14,15 +14,17 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GeomFill_CircularBlendFunc.ixx>
#include <GeomFill.hxx>
#include <GCPnts_QuasiUniformDeflection.hxx>
#include <Precision.hxx>
#include <Adaptor3d_HCurve.hxx>
#include <TColStd_SequenceOfReal.hxx>
#include <GCPnts_QuasiUniformDeflection.hxx>
#include <GeomFill.hxx>
#include <GeomFill_CircularBlendFunc.hxx>
#include <gp_Pnt.hxx>
#include <Precision.hxx>
#include <Standard_OutOfRange.hxx>
#include <Standard_Type.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <TColStd_SequenceOfReal.hxx>
#if DRAW
#include <GeomAdaptor_HCurve.hxx>

View File

@@ -0,0 +1,173 @@
// Created on: 1997-07-11
// 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 _GeomFill_CircularBlendFunc_HeaderFile
#define _GeomFill_CircularBlendFunc_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <gp_Pnt.hxx>
#include <Standard_Real.hxx>
#include <Standard_Integer.hxx>
#include <Convert_ParameterisationType.hxx>
#include <Standard_Boolean.hxx>
#include <Approx_SweepFunction.hxx>
#include <TColgp_Array1OfPnt.hxx>
#include <TColgp_Array1OfPnt2d.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <TColgp_Array1OfVec.hxx>
#include <TColgp_Array1OfVec2d.hxx>
#include <TColStd_Array1OfInteger.hxx>
#include <GeomAbs_Shape.hxx>
class Adaptor3d_HCurve;
class Standard_OutOfRange;
class gp_Pnt;
class GeomFill_CircularBlendFunc;
DEFINE_STANDARD_HANDLE(GeomFill_CircularBlendFunc, Approx_SweepFunction)
//! Circular Blend Function to approximate by
//! SweepApproximation from Approx
class GeomFill_CircularBlendFunc : public Approx_SweepFunction
{
public:
//! Create a Blend with a constant radius with 2
//! guide-line. <FShape> sets the type of fillet
//! surface. The -- default value is Convert_TgtThetaOver2 (classical --
//! nurbs -- representation of circles).
//! ChFi3d_QuasiAngular -- corresponds to a nurbs
//! representation of circles -- which
//! parameterisation matches the circle one. --
//! ChFi3d_Polynomial corresponds to a polynomial --
//! representation of circles.
Standard_EXPORT GeomFill_CircularBlendFunc(const Handle(Adaptor3d_HCurve)& Path, const Handle(Adaptor3d_HCurve)& Curve1, const Handle(Adaptor3d_HCurve)& Curve2, const Standard_Real Radius, const Standard_Boolean Polynomial = Standard_False);
//! compute the section for v = param
Standard_EXPORT virtual Standard_Boolean D0 (const Standard_Real Param, const Standard_Real First, const Standard_Real Last, TColgp_Array1OfPnt& Poles, TColgp_Array1OfPnt2d& Poles2d, TColStd_Array1OfReal& Weigths) Standard_OVERRIDE;
//! compute the first derivative in v direction of the
//! section for v = param
Standard_EXPORT virtual Standard_Boolean D1 (const Standard_Real Param, const Standard_Real First, const Standard_Real Last, TColgp_Array1OfPnt& Poles, TColgp_Array1OfVec& DPoles, TColgp_Array1OfPnt2d& Poles2d, TColgp_Array1OfVec2d& DPoles2d, TColStd_Array1OfReal& Weigths, TColStd_Array1OfReal& DWeigths) Standard_OVERRIDE;
//! compute the second derivative in v direction of the
//! section for v = param
Standard_EXPORT virtual Standard_Boolean D2 (const Standard_Real Param, const Standard_Real First, const Standard_Real Last, TColgp_Array1OfPnt& Poles, TColgp_Array1OfVec& DPoles, TColgp_Array1OfVec& D2Poles, TColgp_Array1OfPnt2d& Poles2d, TColgp_Array1OfVec2d& DPoles2d, TColgp_Array1OfVec2d& D2Poles2d, TColStd_Array1OfReal& Weigths, TColStd_Array1OfReal& DWeigths, TColStd_Array1OfReal& D2Weigths) Standard_OVERRIDE;
//! get the number of 2d curves to approximate.
Standard_EXPORT virtual Standard_Integer Nb2dCurves() const Standard_OVERRIDE;
//! get the format of an section
Standard_EXPORT virtual void SectionShape (Standard_Integer& NbPoles, Standard_Integer& NbKnots, Standard_Integer& Degree) const Standard_OVERRIDE;
//! get the Knots of the section
Standard_EXPORT virtual void Knots (TColStd_Array1OfReal& TKnots) const Standard_OVERRIDE;
//! get the Multplicities of the section
Standard_EXPORT virtual void Mults (TColStd_Array1OfInteger& TMults) const Standard_OVERRIDE;
//! Returns if the section is rationnal or not
Standard_EXPORT virtual Standard_Boolean IsRational() const Standard_OVERRIDE;
//! Returns the number of intervals for continuity
//! <S>. May be one if Continuity(me) >= <S>
Standard_EXPORT virtual Standard_Integer NbIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE;
//! Stores in <T> the parameters bounding the intervals
//! of continuity <S>.
//!
//! The array must provide enough room to accomodate
//! for the parameters. i.e. T.Length() > NbIntervals()
Standard_EXPORT virtual void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE;
//! Sets the bounds of the parametric interval on
//! the fonction
//! This determines the derivatives in these values if the
//! function is not Cn.
Standard_EXPORT virtual void SetInterval (const Standard_Real First, const Standard_Real Last) Standard_OVERRIDE;
//! Returns the tolerance to reach in approximation
//! to respecte
//! BoundTol error at the Boundary
//! AngleTol tangent error at the Boundary (in radian)
//! SurfTol error inside the surface.
Standard_EXPORT virtual void GetTolerance (const Standard_Real BoundTol, const Standard_Real SurfTol, const Standard_Real AngleTol, TColStd_Array1OfReal& Tol3d) const Standard_OVERRIDE;
//! Is usfull, if (me) have to be run numerical
//! algorithme to perform D0, D1 or D2
Standard_EXPORT virtual void SetTolerance (const Standard_Real Tol3d, const Standard_Real Tol2d) Standard_OVERRIDE;
//! Get the barycentre of Surface. An very poor
//! estimation is sufficent. This information is usefull
//! to perform well conditionned rational approximation.
Standard_EXPORT virtual gp_Pnt BarycentreOfSurf() const Standard_OVERRIDE;
//! Returns the length of the maximum section. This
//! information is usefull to perform well conditionned rational
//! approximation.
Standard_EXPORT virtual Standard_Real MaximalSection() const Standard_OVERRIDE;
//! Compute the minimal value of weight for each poles
//! of all sections. This information is usefull to
//! perform well conditionned rational approximation.
Standard_EXPORT virtual void GetMinimalWeight (TColStd_Array1OfReal& Weigths) const Standard_OVERRIDE;
DEFINE_STANDARD_RTTI(GeomFill_CircularBlendFunc,Approx_SweepFunction)
protected:
private:
Standard_EXPORT void Discret();
gp_Pnt myBary;
Standard_Real myRadius;
Standard_Real maxang;
Standard_Real minang;
Standard_Real distmin;
Handle(Adaptor3d_HCurve) myPath;
Handle(Adaptor3d_HCurve) myCurve1;
Handle(Adaptor3d_HCurve) myCurve2;
Handle(Adaptor3d_HCurve) myTPath;
Handle(Adaptor3d_HCurve) myTCurve1;
Handle(Adaptor3d_HCurve) myTCurve2;
Standard_Integer myDegree;
Standard_Integer myNbKnots;
Standard_Integer myNbPoles;
Convert_ParameterisationType myTConv;
Standard_Boolean myreverse;
};
#endif // _GeomFill_CircularBlendFunc_HeaderFile

View File

@@ -1,131 +0,0 @@
-- Created on: 1997-12-09
-- 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 ConstantBiNormal from GeomFill
inherits TrihedronLaw from GeomFill
---Purpose: Defined an Trihedron Law where the BiNormal, is fixed
uses
HCurve from Adaptor3d,
Shape from GeomAbs,
Array1OfReal from TColStd,
Vec from gp,
Dir from gp,
Frenet from GeomFill
raises
OutOfRange, ConstructionError
is
Create(BiNormal : Dir from gp)
returns ConstantBiNormal from GeomFill;
Copy(me)
returns TrihedronLaw from GeomFill
is redefined;
SetCurve(me : mutable; C : HCurve from Adaptor3d)
is redefined;
--
--
--========== To compute Location and derivatives Location
--
D0(me : mutable;
Param: Real;
Tangent : out Vec from gp;
Normal : out Vec from gp;
BiNormal : out Vec from gp)
---Purpose: Computes Triedrhon on curve at parameter <Param>
returns Boolean is redefined;
D1(me : mutable;
Param: Real;
Tangent : out Vec from gp;
DTangent : out Vec from gp;
Normal : out Vec from gp;
DNormal : out Vec from gp;
BiNormal : out Vec from gp;
DBiNormal : out Vec from gp)
---Purpose: Computes Triedrhon and derivative Trihedron on curve
-- at parameter <Param>
-- Warning : It used only for C1 or C2 aproximation
returns Boolean
is redefined;
D2(me : mutable;
Param: Real;
Tangent : out Vec from gp;
DTangent : out Vec from gp;
D2Tangent : out Vec from gp;
Normal : out Vec from gp;
DNormal : out Vec from gp;
D2Normal : out Vec from gp;
BiNormal : out Vec from gp;
DBiNormal : out Vec from gp;
D2BiNormal : out Vec from gp)
---Purpose: compute Trihedron on curve
-- first and seconde derivatives.
-- Warning : It used only for C2 aproximation
returns Boolean
is redefined;
--
-- =================== Management of continuity ===================
--
NbIntervals(me; S : Shape from GeomAbs)
---Purpose: Returns the number of intervals for continuity
-- <S>.
-- May be one if Continuity(me) >= <S>
returns Integer is redefined;
Intervals(me; T : in out Array1OfReal from TColStd;
S : Shape from GeomAbs)
---Purpose: Stores in <T> the parameters bounding the intervals
-- of continuity <S>.
--
-- The array must provide enough room to accomodate
-- for the parameters. i.e. T.Length() > NbIntervals()
raises
OutOfRange from Standard
is redefined;
-- =================== To help computation of Tolerance ===============
GetAverageLaw(me : mutable;
ATangent : out Vec from gp;
ANormal : out Vec from gp;
ABiNormal : out Vec from gp)
---Purpose: Gets average value of Tangent(t) and Normal(t) it is usfull to
-- make fast approximation of rational surfaces.
is redefined;
-- =================== To help Particular case ===============
IsConstant(me)
---Purpose: Says if the law is Constant.
returns Boolean
is redefined;
IsOnlyBy3dCurve(me)
---Purpose: Return True.
returns Boolean
is redefined;
fields
BN : Vec from gp;
frenet : Frenet from GeomFill;
end ConstantBiNormal;

View File

@@ -14,12 +14,19 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GeomFill_ConstantBiNormal.ixx>
#include <Adaptor3d_HCurve.hxx>
#include <GeomFill_ConstantBiNormal.hxx>
#include <GeomFill_Frenet.hxx>
#include <GeomFill_TrihedronLaw.hxx>
#include <gp_Ax1.hxx>
#include <gp_Dir.hxx>
#include <gp_Lin.hxx>
#include <gp_Vec.hxx>
#include <Precision.hxx>
#include <Standard_ConstructionError.hxx>
#include <Standard_OutOfRange.hxx>
#include <Standard_Type.hxx>
//=======================================================================
//function : FDeriv

View File

@@ -0,0 +1,115 @@
// Created on: 1997-12-09
// 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 _GeomFill_ConstantBiNormal_HeaderFile
#define _GeomFill_ConstantBiNormal_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <gp_Vec.hxx>
#include <GeomFill_TrihedronLaw.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Real.hxx>
#include <Standard_Integer.hxx>
#include <GeomAbs_Shape.hxx>
#include <TColStd_Array1OfReal.hxx>
class GeomFill_Frenet;
class Standard_OutOfRange;
class Standard_ConstructionError;
class gp_Dir;
class GeomFill_TrihedronLaw;
class Adaptor3d_HCurve;
class gp_Vec;
class GeomFill_ConstantBiNormal;
DEFINE_STANDARD_HANDLE(GeomFill_ConstantBiNormal, GeomFill_TrihedronLaw)
//! Defined an Trihedron Law where the BiNormal, is fixed
class GeomFill_ConstantBiNormal : public GeomFill_TrihedronLaw
{
public:
Standard_EXPORT GeomFill_ConstantBiNormal(const gp_Dir& BiNormal);
Standard_EXPORT virtual Handle(GeomFill_TrihedronLaw) Copy() const Standard_OVERRIDE;
Standard_EXPORT virtual void SetCurve (const Handle(Adaptor3d_HCurve)& C) Standard_OVERRIDE;
//! Computes Triedrhon on curve at parameter <Param>
Standard_EXPORT virtual Standard_Boolean D0 (const Standard_Real Param, gp_Vec& Tangent, gp_Vec& Normal, gp_Vec& BiNormal) Standard_OVERRIDE;
//! Computes Triedrhon and derivative Trihedron on curve
//! at parameter <Param>
//! Warning : It used only for C1 or C2 aproximation
Standard_EXPORT virtual Standard_Boolean D1 (const Standard_Real Param, gp_Vec& Tangent, gp_Vec& DTangent, gp_Vec& Normal, gp_Vec& DNormal, gp_Vec& BiNormal, gp_Vec& DBiNormal) Standard_OVERRIDE;
//! compute Trihedron on curve
//! first and seconde derivatives.
//! Warning : It used only for C2 aproximation
Standard_EXPORT virtual Standard_Boolean D2 (const Standard_Real Param, gp_Vec& Tangent, gp_Vec& DTangent, gp_Vec& D2Tangent, gp_Vec& Normal, gp_Vec& DNormal, gp_Vec& D2Normal, gp_Vec& BiNormal, gp_Vec& DBiNormal, gp_Vec& D2BiNormal) Standard_OVERRIDE;
//! Returns the number of intervals for continuity
//! <S>.
//! May be one if Continuity(me) >= <S>
Standard_EXPORT virtual Standard_Integer NbIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE;
//! Stores in <T> the parameters bounding the intervals
//! of continuity <S>.
//!
//! The array must provide enough room to accomodate
//! for the parameters. i.e. T.Length() > NbIntervals()
Standard_EXPORT virtual void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE;
//! Gets average value of Tangent(t) and Normal(t) it is usfull to
//! make fast approximation of rational surfaces.
Standard_EXPORT virtual void GetAverageLaw (gp_Vec& ATangent, gp_Vec& ANormal, gp_Vec& ABiNormal) Standard_OVERRIDE;
//! Says if the law is Constant.
Standard_EXPORT virtual Standard_Boolean IsConstant() const Standard_OVERRIDE;
//! Return True.
Standard_EXPORT virtual Standard_Boolean IsOnlyBy3dCurve() const Standard_OVERRIDE;
DEFINE_STANDARD_RTTI(GeomFill_ConstantBiNormal,GeomFill_TrihedronLaw)
protected:
private:
gp_Vec BN;
Handle(GeomFill_Frenet) frenet;
};
#endif // _GeomFill_ConstantBiNormal_HeaderFile

View File

@@ -1,261 +0,0 @@
-- Created on: 1995-10-13
-- Created by: Laurent BOURESCHE
-- 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 ConstrainedFilling from GeomFill
---Purpose: An algorithm for constructing a BSpline surface filled
-- from a series of boundaries which serve as path
-- constraints and optionally, as tangency constraints.
-- The algorithm accepts three or four curves as the
-- boundaries of the target surface.
-- The only FillingStyle used is Coons.
-- A ConstrainedFilling object provides a framework for:
-- - defining the boundaries of the surface
-- - implementing the construction algorithm
-- - consulting the result.
-- Warning
-- This surface filling algorithm is specifically designed to
-- be used in connection with fillets. Satisfactory results
-- cannot be guaranteed for other uses.
uses
HArray1OfInteger from TColStd,
HArray1OfReal from TColStd,
Pnt from gp,
Vec from gp,
HArray1OfPnt from TColgp,
HArray2OfPnt from TColgp,
CornerState from GeomFill,
Boundary from GeomFill,
BoundWithSurf from GeomFill,
CoonsAlgPatch from GeomFill,
TgtField from GeomFill,
BSplineSurface from Geom,
Function from Law
is
Create (MaxDeg, MaxSeg : Integer from Standard)
returns ConstrainedFilling from GeomFill;
---Purpose:
-- Constructs an empty framework for filling a surface from boundaries.
-- The boundaries of the surface will be defined, and the
-- surface will be built by using the function Init.
-- The surface will respect the following constraints:
-- - its degree will not be greater than MaxDeg
-- - the maximum number of segments MaxSeg which
-- BSpline surfaces can have.
Init(me : in out;
B1,B2,B3 : Boundary from GeomFill;
NoCheck : Boolean from Standard = Standard_False);
Init(me : in out;
B1,B2,B3,B4 : Boundary from GeomFill;
NoCheck : Boolean from Standard = Standard_False);
---Purpose: Constructs a BSpline surface filled from the series of
-- boundaries B1, B2, B3 and, if need be, B4, which serve:
-- - as path constraints
-- - and optionally, as tangency constraints if they are
-- GeomFill_BoundWithSurf curves.
-- The boundaries may be given in any order: they are
-- classified and if necessary, reversed and reparameterized.
-- The surface will also respect the following constraints:
-- - its degree will not be greater than the maximum
-- degree defined at the time of construction of this framework, and
-- - the maximum number of segments MaxSeg which BSpline surfaces can have
SetDomain(me : in out;
l : Real from Standard;
B : BoundWithSurf from GeomFill);
---Purpose: Allows to modify domain on witch the blending function
-- associated to the constrained boundary B will propag
-- the influence of the field of tangency. Can be
-- usefull to reduce influence of boundaries on whitch
-- the Coons compatibility conditions are not respected.
-- l is a relative value of the parametric range of B.
-- Default value for l is 1 (used in Init).
-- Warning: Must be called after Init with a constrained boundary
-- used in the call to Init.
ReBuild(me : in out)
---Purpose: Computes the new poles of the surface using the new
-- blending functions set by several calls to SetDomain.
is static;
--------------------------------------------------------------------
Boundary(me; I : Integer from Standard)
returns Boundary from GeomFill;
---Purpose: Returns the bound of index i after sort.
Surface(me) returns BSplineSurface from Geom;
---Purpose: Returns the BSpline surface after computation of the fill by this framework.
--------------------------------------------------------------------
--------------------------------------------------------------------
-- Internal use computation functions
--------------------------------------------------------------------
Build(me : in out)
---Purpose: Performs the approximation an compute the poles of the
-- surface.
is static private;
PerformApprox(me : in out)
---Purpose: Performs the parallel approximation on two oppsite
-- bounds
is static private;
MatchKnots(me : in out)
---Purpose: matches the nodal vectors of the blending functions
-- and the results of the approx to allow the surface
-- computation.
is static private;
PerformS0(me : in out)
---Purpose: performs the poles of the partial construction S0.
is static private;
PerformS1(me : in out)
---Purpose: performs the poles of the partial construction S1.
is static private;
PerformSurface(me : in out)
---Purpose: performs the poles of the surface using the partial
-- constructions S0 and S1.
is static private;
CheckTgte(me : in out; I : Integer from Standard)
---Purpose: Checks if the field of tangency doesn t twist along the
-- boundary.
returns Boolean from Standard
is static private;
MinTgte(me : in out; I : Integer from Standard)
---Purpose: Evaluates the min magnitude of the field of tangency
-- along bound I to allow a simple evaluation of the
-- tolerance needed for the approximation of the field of
-- tangency.
is static private;
Eval(me;
W : Real from Standard ;
Ord : Integer from Standard ;
Result : in out Real from Standard)
---Purpose: Internal use for Advmath approximation call.
returns Integer from Standard;
--------------------------------------------------------------------
-- Internal use functions for debug :
-- The graphic traces are compiled only with -D DEB option,
-- can be used only in Draw Appli context.
--------------------------------------------------------------------
CheckCoonsAlgPatch(me : in out; I : Integer from Standard)
---Purpose: Computes the fields of tangents on 30 points along the
-- bound I, these are not the constraint tangents but
-- gives an idea of the coonsAlgPatch regularity.
is static;
CheckTgteField(me : in out; I : Integer from Standard)
---Purpose: Computes the fields of tangents and normals on 30
-- points along the bound I, draw them, and computes the
-- max dot product that must be near than 0.
is static;
CheckApprox(me : in out; I : Integer from Standard)
---Purpose: Computes values and normals along the bound I and
-- compare them to the approx result curves (bound and
-- tgte field) , draw the normals and tangents.
is static;
CheckResult(me : in out; I : Integer from Standard)
---Purpose: Computes values and normals along the bound I on both
-- constraint surface and result surface, draw the
-- normals, and computes the max distance between values
-- and the max angle between normals.
is static;
fields
-- data for approximation.
degmax : Integer from Standard;
segmax : Integer from Standard;
-- the algorithmic patch.
ptch : CoonsAlgPatch from GeomFill;
-- the algorithmic tangents fields
tgalg : TgtField from GeomFill[4];
-- the evaluation of the min of the algorithmic tangents fields
-- magnitude.
mig : Real from Standard [4];
-- data about corners conditionning the existence of solution.
stcor : CornerState from GeomFill [4];
-- the derivatives on corners.
v : Vec from gp [4];
-- result curves of aproximation.
appdone : Boolean from Standard;
degree : Integer from Standard [2];
curvpol : HArray1OfPnt from TColgp [4];
tgtepol : HArray1OfPnt from TColgp [4];
mults : HArray1OfInteger from TColStd [2];
knots : HArray1OfReal from TColStd [2];
-- the blending functions for the patial result S0 surface (only
-- bounds)
ab : HArray1OfReal from TColStd [4];
-- the blending functions for the patial result S1 surface
-- (including tangency constraints)
pq : HArray1OfReal from TColStd [4];
dom : Real from Standard [4];
-- new arrays computed in order to match the blending functions
-- nodal vectors and the approximated curves nodal vectors. these
-- data are recomputed at each call to ReBuild method, without any
-- new perform of the approx.
ncpol : HArray1OfPnt from TColgp [4];
ntpol : HArray1OfPnt from TColgp [4];
nm : HArray1OfInteger from TColStd [2];
nk : HArray1OfReal from TColStd [2];
-- nombre de courbes a approximer pour chaque bord ctr[i]
ibound: Integer [2];
ctr : Integer [2];
nbd3 : Integer;
-- partial results of surface poles computed by blending curvpol
-- an tgtepol.
S0 : HArray2OfPnt from TColgp;
S1 : HArray2OfPnt from TColgp;
-- the result surface.
surf : BSplineSurface from Geom;
end ConstrainedFilling;

View File

@@ -16,22 +16,26 @@
// Modified by skv - Fri Jun 18 12:52:54 2004 OCC6129
#include <GeomFill_ConstrainedFilling.ixx>
#include <AdvApprox_ApproxAFunction.hxx>
#include <BSplCLib.hxx>
#include <Geom_BSplineSurface.hxx>
#include <GeomFill_Boundary.hxx>
#include <GeomFill_BoundWithSurf.hxx>
#include <GeomFill_ConstrainedFilling.hxx>
#include <GeomFill_CoonsAlgPatch.hxx>
#include <GeomFill_DegeneratedBound.hxx>
#include <GeomFill_TgtField.hxx>
#include <GeomFill_TgtOnCoons.hxx>
#include <gp_XYZ.hxx>
#include <Law.hxx>
#include <Law_BSpFunc.hxx>
#include <Law_BSpline.hxx>
#include <Law_Linear.hxx>
#include <PLib.hxx>
#include <Standard_Failure.hxx>
#include <Standard_NotImplemented.hxx>
#include <TColStd_HArray1OfReal.hxx>
#include <TColgp_Array1OfPnt.hxx>
#include <gp_XYZ.hxx>
#include <PLib.hxx>
#include <BSplCLib.hxx>
#include <AdvApprox_ApproxAFunction.hxx>
#include <Law.hxx>
#include <Law_Linear.hxx>
#include <Law_BSpline.hxx>
#include <Law_BSpFunc.hxx>
#include <GeomFill_DegeneratedBound.hxx>
#include <GeomFill_TgtOnCoons.hxx>
#include <TColStd_HArray1OfReal.hxx>
#ifdef DRAW
// Pour le dessin.

View File

@@ -0,0 +1,213 @@
// Created on: 1995-10-13
// Created by: Laurent BOURESCHE
// 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 _GeomFill_ConstrainedFilling_HeaderFile
#define _GeomFill_ConstrainedFilling_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Real.hxx>
#include <GeomFill_CornerState.hxx>
#include <gp_Vec.hxx>
#include <Standard_Boolean.hxx>
#include <TColgp_HArray1OfPnt.hxx>
#include <TColStd_HArray1OfInteger.hxx>
#include <TColStd_HArray1OfReal.hxx>
#include <TColgp_HArray2OfPnt.hxx>
class GeomFill_CoonsAlgPatch;
class GeomFill_TgtField;
class Geom_BSplineSurface;
class GeomFill_Boundary;
class GeomFill_BoundWithSurf;
//! An algorithm for constructing a BSpline surface filled
//! from a series of boundaries which serve as path
//! constraints and optionally, as tangency constraints.
//! The algorithm accepts three or four curves as the
//! boundaries of the target surface.
//! The only FillingStyle used is Coons.
//! A ConstrainedFilling object provides a framework for:
//! - defining the boundaries of the surface
//! - implementing the construction algorithm
//! - consulting the result.
//! Warning
//! This surface filling algorithm is specifically designed to
//! be used in connection with fillets. Satisfactory results
//! cannot be guaranteed for other uses.
class GeomFill_ConstrainedFilling
{
public:
DEFINE_STANDARD_ALLOC
//! Constructs an empty framework for filling a surface from boundaries.
//! The boundaries of the surface will be defined, and the
//! surface will be built by using the function Init.
//! The surface will respect the following constraints:
//! - its degree will not be greater than MaxDeg
//! - the maximum number of segments MaxSeg which
//! BSpline surfaces can have.
Standard_EXPORT GeomFill_ConstrainedFilling(const Standard_Integer MaxDeg, const Standard_Integer MaxSeg);
Standard_EXPORT void Init (const Handle(GeomFill_Boundary)& B1, const Handle(GeomFill_Boundary)& B2, const Handle(GeomFill_Boundary)& B3, const Standard_Boolean NoCheck = Standard_False);
//! Constructs a BSpline surface filled from the series of
//! boundaries B1, B2, B3 and, if need be, B4, which serve:
//! - as path constraints
//! - and optionally, as tangency constraints if they are
//! GeomFill_BoundWithSurf curves.
//! The boundaries may be given in any order: they are
//! classified and if necessary, reversed and reparameterized.
//! The surface will also respect the following constraints:
//! - its degree will not be greater than the maximum
//! degree defined at the time of construction of this framework, and
//! - the maximum number of segments MaxSeg which BSpline surfaces can have
Standard_EXPORT void Init (const Handle(GeomFill_Boundary)& B1, const Handle(GeomFill_Boundary)& B2, const Handle(GeomFill_Boundary)& B3, const Handle(GeomFill_Boundary)& B4, const Standard_Boolean NoCheck = Standard_False);
//! Allows to modify domain on witch the blending function
//! associated to the constrained boundary B will propag
//! the influence of the field of tangency. Can be
//! usefull to reduce influence of boundaries on whitch
//! the Coons compatibility conditions are not respected.
//! l is a relative value of the parametric range of B.
//! Default value for l is 1 (used in Init).
//! Warning: Must be called after Init with a constrained boundary
//! used in the call to Init.
Standard_EXPORT void SetDomain (const Standard_Real l, const Handle(GeomFill_BoundWithSurf)& B);
//! Computes the new poles of the surface using the new
//! blending functions set by several calls to SetDomain.
Standard_EXPORT void ReBuild();
//! Returns the bound of index i after sort.
Standard_EXPORT Handle(GeomFill_Boundary) Boundary (const Standard_Integer I) const;
//! Returns the BSpline surface after computation of the fill by this framework.
Standard_EXPORT Handle(Geom_BSplineSurface) Surface() const;
//! Internal use for Advmath approximation call.
Standard_EXPORT Standard_Integer Eval (const Standard_Real W, const Standard_Integer Ord, Standard_Real& Result) const;
//! Computes the fields of tangents on 30 points along the
//! bound I, these are not the constraint tangents but
//! gives an idea of the coonsAlgPatch regularity.
Standard_EXPORT void CheckCoonsAlgPatch (const Standard_Integer I);
//! Computes the fields of tangents and normals on 30
//! points along the bound I, draw them, and computes the
//! max dot product that must be near than 0.
Standard_EXPORT void CheckTgteField (const Standard_Integer I);
//! Computes values and normals along the bound I and
//! compare them to the approx result curves (bound and
//! tgte field) , draw the normals and tangents.
Standard_EXPORT void CheckApprox (const Standard_Integer I);
//! Computes values and normals along the bound I on both
//! constraint surface and result surface, draw the
//! normals, and computes the max distance between values
//! and the max angle between normals.
Standard_EXPORT void CheckResult (const Standard_Integer I);
protected:
private:
//! Performs the approximation an compute the poles of the
//! surface.
Standard_EXPORT void Build();
//! Performs the parallel approximation on two oppsite
//! bounds
Standard_EXPORT void PerformApprox();
//! matches the nodal vectors of the blending functions
//! and the results of the approx to allow the surface
//! computation.
Standard_EXPORT void MatchKnots();
//! performs the poles of the partial construction S0.
Standard_EXPORT void PerformS0();
//! performs the poles of the partial construction S1.
Standard_EXPORT void PerformS1();
//! performs the poles of the surface using the partial
//! constructions S0 and S1.
Standard_EXPORT void PerformSurface();
//! Checks if the field of tangency doesn t twist along the
//! boundary.
Standard_EXPORT Standard_Boolean CheckTgte (const Standard_Integer I);
//! Evaluates the min magnitude of the field of tangency
//! along bound I to allow a simple evaluation of the
//! tolerance needed for the approximation of the field of
//! tangency.
Standard_EXPORT void MinTgte (const Standard_Integer I);
Standard_Integer degmax;
Standard_Integer segmax;
Handle(GeomFill_CoonsAlgPatch) ptch;
Handle(GeomFill_TgtField) tgalg[4];
Standard_Real mig[4];
GeomFill_CornerState stcor[4];
gp_Vec v[4];
Standard_Boolean appdone;
Standard_Integer degree[2];
Handle(TColgp_HArray1OfPnt) curvpol[4];
Handle(TColgp_HArray1OfPnt) tgtepol[4];
Handle(TColStd_HArray1OfInteger) mults[2];
Handle(TColStd_HArray1OfReal) knots[2];
Handle(TColStd_HArray1OfReal) ab[4];
Handle(TColStd_HArray1OfReal) pq[4];
Standard_Real dom[4];
Handle(TColgp_HArray1OfPnt) ncpol[4];
Handle(TColgp_HArray1OfPnt) ntpol[4];
Handle(TColStd_HArray1OfInteger) nm[2];
Handle(TColStd_HArray1OfReal) nk[2];
Standard_Integer ibound[2];
Standard_Integer ctr[2];
Standard_Integer nbd3;
Handle(TColgp_HArray2OfPnt) S0;
Handle(TColgp_HArray2OfPnt) S1;
Handle(Geom_BSplineSurface) surf;
};
#endif // _GeomFill_ConstrainedFilling_HeaderFile

View File

@@ -1,42 +0,0 @@
-- Created on: 1993-09-28
-- Created by: Bruno DUMORTIER
-- Copyright (c) 1993-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 Coons from GeomFill inherits Filling from GeomFill
uses
Array1OfPnt from TColgp,
Array1OfReal from TColStd
is
Create;
Create(P1, P2, P3, P4 : Array1OfPnt from TColgp)
returns Coons from GeomFill;
Create(P1, P2, P3, P4 : Array1OfPnt from TColgp;
W1, W2, W3, W4 : Array1OfReal from TColStd)
returns Coons from GeomFill;
Init(me : in out;
P1, P2, P3, P4 : Array1OfPnt from TColgp)
is static;
Init(me : in out;
P1, P2, P3, P4 : Array1OfPnt from TColgp;
W1, W2, W3, W4 : Array1OfReal from TColStd)
is static;
end Coons;

View File

@@ -14,9 +14,9 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GeomFill_Coons.ixx>
#include <BSplCLib.hxx>
#include <GeomFill_Coons.hxx>
#include <PLib.hxx>
#include <TColgp_HArray2OfPnt.hxx>
#include <TColStd_HArray2OfReal.hxx>
@@ -25,7 +25,6 @@
//function : GeomFill_Coons
//purpose :
//=======================================================================
GeomFill_Coons::GeomFill_Coons()
{
}

View File

@@ -0,0 +1,70 @@
// Created on: 1993-09-28
// Created by: Bruno DUMORTIER
// Copyright (c) 1993-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 _GeomFill_Coons_HeaderFile
#define _GeomFill_Coons_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <GeomFill_Filling.hxx>
#include <TColgp_Array1OfPnt.hxx>
#include <TColStd_Array1OfReal.hxx>
class GeomFill_Coons : public GeomFill_Filling
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT GeomFill_Coons();
Standard_EXPORT GeomFill_Coons(const TColgp_Array1OfPnt& P1, const TColgp_Array1OfPnt& P2, const TColgp_Array1OfPnt& P3, const TColgp_Array1OfPnt& P4);
Standard_EXPORT GeomFill_Coons(const TColgp_Array1OfPnt& P1, const TColgp_Array1OfPnt& P2, const TColgp_Array1OfPnt& P3, const TColgp_Array1OfPnt& P4, const TColStd_Array1OfReal& W1, const TColStd_Array1OfReal& W2, const TColStd_Array1OfReal& W3, const TColStd_Array1OfReal& W4);
Standard_EXPORT void Init (const TColgp_Array1OfPnt& P1, const TColgp_Array1OfPnt& P2, const TColgp_Array1OfPnt& P3, const TColgp_Array1OfPnt& P4);
Standard_EXPORT void Init (const TColgp_Array1OfPnt& P1, const TColgp_Array1OfPnt& P2, const TColgp_Array1OfPnt& P3, const TColgp_Array1OfPnt& P4, const TColStd_Array1OfReal& W1, const TColStd_Array1OfReal& W2, const TColStd_Array1OfReal& W3, const TColStd_Array1OfReal& W4);
protected:
private:
};
#endif // _GeomFill_Coons_HeaderFile

View File

@@ -1,104 +0,0 @@
-- Created on: 1995-12-04
-- Created by: Laurent BOURESCHE
-- 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 CoonsAlgPatch from GeomFill inherits TShared from MMgt
---Purpose: Provides evaluation methods on an algorithmic
-- patch (based on 4 Curves) defined by its boundaries and blending
-- functions.
uses
Pnt from gp,
Vec from gp,
Boundary from GeomFill,
Function from Law
is
Create(B1, B2, B3, B4 : Boundary from GeomFill)
---Purpose: Constructs the algorithmic patch. By Default the
-- constructed blending functions are linear.
-- Warning: No control is done on the bounds.
-- B1/B3 and B2/B4 must be same range and well oriented.
returns CoonsAlgPatch from GeomFill;
Func(me;
f1,f2 : out Function from Law)
---Purpose: Give the blending functions.
is static;
SetFunc(me : mutable;
f1,f2 : Function from Law)
---Purpose: Set the blending functions.
is static;
Value(me;
U,V : Real from Standard) returns Pnt from gp
---Purpose: Computes the value on the algorithmic patch at
-- parameters U and V.
is static;
D1U(me;
U,V : Real from Standard)
returns Vec from gp
---Purpose: Computes the d/dU partial derivative on the
-- algorithmic patch at parameters U and V.
is static;
D1V(me;
U,V : Real from Standard)
returns Vec from gp
---Purpose: Computes the d/dV partial derivative on the
-- algorithmic patch at parameters U and V.
is static;
DUV(me;
U,V : Real from Standard)
returns Vec from gp
---Purpose: Computes the d2/dUdV partial derivative on the
-- algorithmic patch made with linear blending functions
-- at parameter U and V.
is static;
Corner(me; I : Integer from Standard)
---C++: return const&
returns Pnt from gp
is static;
Bound(me; I : Integer from Standard)
---C++: return const&
returns any Boundary from GeomFill
is static;
Func(me; I : Integer from Standard)
---C++: return const&
returns any Function from Law
is static;
fields
-- the boundaries.
bound : Boundary from GeomFill [4];
-- the corners.
c : Pnt from gp [4];
-- the blending functions.
a : Function from Law [2];
end CoonsAlgPatch;

View File

@@ -14,15 +14,20 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GeomFill_CoonsAlgPatch.ixx>
#include <Law_Linear.hxx>
#include <GeomFill_Boundary.hxx>
#include <GeomFill_CoonsAlgPatch.hxx>
#include <gp_Pnt.hxx>
#include <gp_Vec.hxx>
#include <gp_XYZ.hxx>
#include <Law_Function.hxx>
#include <Law_Linear.hxx>
#include <Standard_Type.hxx>
//=======================================================================
//function : GeomFill_CoonsAlgPatch
//purpose :
//=======================================================================
GeomFill_CoonsAlgPatch::GeomFill_CoonsAlgPatch
(const Handle(GeomFill_Boundary)& B1,
const Handle(GeomFill_Boundary)& B2,

View File

@@ -0,0 +1,106 @@
// Created on: 1995-12-04
// Created by: Laurent BOURESCHE
// 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 _GeomFill_CoonsAlgPatch_HeaderFile
#define _GeomFill_CoonsAlgPatch_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <gp_Pnt.hxx>
#include <MMgt_TShared.hxx>
#include <Standard_Real.hxx>
#include <Standard_Integer.hxx>
class GeomFill_Boundary;
class Law_Function;
class gp_Pnt;
class gp_Vec;
class GeomFill_CoonsAlgPatch;
DEFINE_STANDARD_HANDLE(GeomFill_CoonsAlgPatch, MMgt_TShared)
//! Provides evaluation methods on an algorithmic
//! patch (based on 4 Curves) defined by its boundaries and blending
//! functions.
class GeomFill_CoonsAlgPatch : public MMgt_TShared
{
public:
//! Constructs the algorithmic patch. By Default the
//! constructed blending functions are linear.
//! Warning: No control is done on the bounds.
//! B1/B3 and B2/B4 must be same range and well oriented.
Standard_EXPORT GeomFill_CoonsAlgPatch(const Handle(GeomFill_Boundary)& B1, const Handle(GeomFill_Boundary)& B2, const Handle(GeomFill_Boundary)& B3, const Handle(GeomFill_Boundary)& B4);
//! Give the blending functions.
Standard_EXPORT void Func (Handle(Law_Function)& f1, Handle(Law_Function)& f2) const;
//! Set the blending functions.
Standard_EXPORT void SetFunc (const Handle(Law_Function)& f1, const Handle(Law_Function)& f2);
//! Computes the value on the algorithmic patch at
//! parameters U and V.
Standard_EXPORT gp_Pnt Value (const Standard_Real U, const Standard_Real V) const;
//! Computes the d/dU partial derivative on the
//! algorithmic patch at parameters U and V.
Standard_EXPORT gp_Vec D1U (const Standard_Real U, const Standard_Real V) const;
//! Computes the d/dV partial derivative on the
//! algorithmic patch at parameters U and V.
Standard_EXPORT gp_Vec D1V (const Standard_Real U, const Standard_Real V) const;
//! Computes the d2/dUdV partial derivative on the
//! algorithmic patch made with linear blending functions
//! at parameter U and V.
Standard_EXPORT gp_Vec DUV (const Standard_Real U, const Standard_Real V) const;
Standard_EXPORT const gp_Pnt& Corner (const Standard_Integer I) const;
Standard_EXPORT const Handle(GeomFill_Boundary)& Bound (const Standard_Integer I) const;
Standard_EXPORT const Handle(Law_Function)& Func (const Standard_Integer I) const;
DEFINE_STANDARD_RTTI(GeomFill_CoonsAlgPatch,MMgt_TShared)
protected:
private:
Handle(GeomFill_Boundary) bound[4];
gp_Pnt c[4];
Handle(Law_Function) a[2];
};
#endif // _GeomFill_CoonsAlgPatch_HeaderFile

View File

@@ -1,48 +0,0 @@
-- Created on: 1995-12-08
-- Created by: Laurent BOURESCHE
-- 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 CornerState from GeomFill
---Purpose: Class (should be a structure) storing the
-- informations about continuity, normals
-- parallelism, coons conditions and bounds tangents
-- angle on the corner of contour to be filled.
is
Create returns CornerState from GeomFill;
Gap(me) returns Real from Standard;
Gap(me : in out; G : Real from Standard);
TgtAng(me) returns Real from Standard;
TgtAng(me : in out; Ang : Real from Standard);
HasConstraint(me) returns Boolean from Standard;
Constraint(me : in out);
NorAng(me) returns Real from Standard;
NorAng(me : in out; Ang : Real from Standard);
IsToKill(me; Scal : out Real from Standard)
returns Boolean from Standard;
DoKill(me : in out; Scal : Real from Standard);
fields
gap : Real from Standard;
tgtang : Real from Standard;
isconstrained : Boolean from Standard;
norang : Real from Standard;
scal : Real from Standard;
coonscnd : Boolean from Standard;
end CornerState;

View File

@@ -14,12 +14,13 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GeomFill_CornerState.ixx>
#include <GeomFill_CornerState.hxx>
//=======================================================================
//function : GeomFill_CornerState
//purpose :
//=======================================================================
GeomFill_CornerState::GeomFill_CornerState() :
gap(RealLast()),
isconstrained(0),

View File

@@ -0,0 +1,90 @@
// Created on: 1995-12-08
// Created by: Laurent BOURESCHE
// 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 _GeomFill_CornerState_HeaderFile
#define _GeomFill_CornerState_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Real.hxx>
#include <Standard_Boolean.hxx>
//! Class (should be a structure) storing the
//! informations about continuity, normals
//! parallelism, coons conditions and bounds tangents
//! angle on the corner of contour to be filled.
class GeomFill_CornerState
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT GeomFill_CornerState();
Standard_EXPORT Standard_Real Gap() const;
Standard_EXPORT void Gap (const Standard_Real G);
Standard_EXPORT Standard_Real TgtAng() const;
Standard_EXPORT void TgtAng (const Standard_Real Ang);
Standard_EXPORT Standard_Boolean HasConstraint() const;
Standard_EXPORT void Constraint();
Standard_EXPORT Standard_Real NorAng() const;
Standard_EXPORT void NorAng (const Standard_Real Ang);
Standard_EXPORT Standard_Boolean IsToKill (Standard_Real& Scal) const;
Standard_EXPORT void DoKill (const Standard_Real Scal);
protected:
private:
Standard_Real gap;
Standard_Real tgtang;
Standard_Boolean isconstrained;
Standard_Real norang;
Standard_Real scal;
Standard_Boolean coonscnd;
};
#endif // _GeomFill_CornerState_HeaderFile

View File

@@ -1,193 +0,0 @@
-- Created on: 1997-12-19
-- 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 CorrectedFrenet from GeomFill
inherits TrihedronLaw from GeomFill
---Purpose: Defined an Corrected Frenet Trihedron Law It is
-- like Frenet with an Torsion's minimization
uses
Frenet from GeomFill,
HCurve from Adaptor3d,
Shape from GeomAbs,
Array1OfReal from TColStd,
Function from Law,
Vec from gp,
---OCC78
HArray1OfReal from TColStd,
SequenceOfReal from TColStd,
HArray1OfVec from TColgp,
SequenceOfVec from TColgp,
Trihedron from GeomFill
raises
OutOfRange, ConstructionError
is
Create returns CorrectedFrenet from GeomFill;
Create (ForEvaluation: Boolean)
returns CorrectedFrenet from GeomFill;
Copy(me)
returns TrihedronLaw from GeomFill
is redefined;
Init(me: mutable)
is static private;
InitInterval(me; First, Last, Step: Real;
startAng: in out Real;
prevTangent, prevNormal, aT, aN: out Vec from gp;
FuncInt: out Function from Law;
SeqPoles: out SequenceOfReal from TColStd;
SeqAngle: out SequenceOfReal from TColStd;
SeqTangent: out SequenceOfVec from TColgp;
SeqNormal: out SequenceOfVec from TColgp)
returns Boolean
--- Purpose: Computes BSpline representation of Normal evolution at one
--- interval of continuity of Frenet. Returns True if FuncInt = 0
is private;
--- OCC78
CalcAngleAT(me; Tangent, Normal, prevTangent, prevNormal: in Vec from gp)
returns Real
--- Purpose: Computes angle of Normal evolution of Frenet between any two points on the curve.
is private;
GetAngleAT(me; P: in Real)
returns Real
--- Purpose: Get corrected value of angle of Normal evolution of Frenet
is private;
SetCurve(me : mutable; C : HCurve from Adaptor3d)
is redefined;
SetInterval(me: mutable; First, Last: Real)
is redefined;
--
--
--========== To compute Location and derivatives Location
--
D0(me : mutable;
Param: Real;
Tangent : out Vec from gp;
Normal : out Vec from gp;
BiNormal : out Vec from gp)
---Purpose: compute Triedrhon on curve at parameter <Param>
returns Boolean is redefined;
D1(me : mutable;
Param: Real;
Tangent : out Vec from gp;
DTangent : out Vec from gp;
Normal : out Vec from gp;
DNormal : out Vec from gp;
BiNormal : out Vec from gp;
DBiNormal : out Vec from gp)
---Purpose: compute Triedrhon and derivative Trihedron on curve
-- at parameter <Param>
-- Warning : It used only for C1 or C2 aproximation
returns Boolean
is redefined;
D2(me : mutable;
Param: Real;
Tangent : out Vec from gp;
DTangent : out Vec from gp;
D2Tangent : out Vec from gp;
Normal : out Vec from gp;
DNormal : out Vec from gp;
D2Normal : out Vec from gp;
BiNormal : out Vec from gp;
DBiNormal : out Vec from gp;
D2BiNormal : out Vec from gp)
---Purpose: compute Trihedron on curve
-- first and seconde derivatives.
-- Warning : It used only for C2 aproximation
returns Boolean
is redefined;
--
-- =================== Management of continuity ===================
--
NbIntervals(me; S : Shape from GeomAbs)
---Purpose: Returns the number of intervals for continuity
-- <S>.
-- May be one if Continuity(me) >= <S>
returns Integer is redefined;
Intervals(me; T : in out Array1OfReal from TColStd;
S : Shape from GeomAbs)
---Purpose: Stores in <T> the parameters bounding the intervals
-- of continuity <S>.
--
-- The array must provide enough room to accomodate
-- for the parameters. i.e. T.Length() > NbIntervals()
raises
OutOfRange from Standard
is redefined;
-- =================== To define the best trihedron mode ===============
EvaluateBestMode(me : mutable)
returns Trihedron from GeomFill;
---Purpose: Tries to define the best trihedron mode
-- for the curve. It can be:
-- - Frenet
-- - CorrectedFrenet
-- - DiscreteTrihedron
-- Warning: the CorrectedFrenet must be constructed
-- with option ForEvaluation = True,
-- the curve must be set by method SetCurve.
-- =================== To help computation of Tolerance ===============
GetAverageLaw(me : mutable;
ATangent : out Vec from gp;
ANormal : out Vec from gp;
ABiNormal : out Vec from gp)
---Purpose: Get average value of Tangent(t) and Normal(t) it is usfull to
-- make fast approximation of rational surfaces.
is redefined;
-- =================== To help Particular case ===============
IsConstant(me)
---Purpose: Say if the law is Constant.
returns Boolean
is redefined;
IsOnlyBy3dCurve(me)
---Purpose: Return True.
returns Boolean
is redefined;
fields
frenet : Frenet from GeomFill;
EvolAroundT : Function from Law;
TLaw : Function from Law;
AT, AN : Vec from gp;
isFrenet : Boolean;
myForEvaluation : Boolean;
---OCC78
HArrPoles : HArray1OfReal from TColStd;
HArrAngle : HArray1OfReal from TColStd;
HArrTangent : HArray1OfVec from TColgp;
HArrNormal : HArray1OfVec from TColgp;
end CorrectedFrenet;

View File

@@ -14,32 +14,38 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <stdio.h>
#include <GeomFill_CorrectedFrenet.ixx>
#include <GeomAbs_CurveType.hxx>
#include <Adaptor3d_HCurve.hxx>
#include <gp_Trsf.hxx>
#include <Precision.hxx>
#include <TColStd_HArray1OfReal.hxx>
#include <Law_Interpolate.hxx>
#include <TColStd_SequenceOfReal.hxx>
#include <gp_Vec2d.hxx>
#include <BndLib_Add3dCurve.hxx>
#include <Bnd_Box.hxx>
#include <GeomLib.hxx>
#include <Law_Composite.hxx>
#include <Law_Constant.hxx>
#include <Law_BSpFunc.hxx>
#include <Law_BSpline.hxx>
#include <GeomFill_SnglrFunc.hxx>
//Patch
#include <Geom_Plane.hxx>
#include <BndLib_Add3dCurve.hxx>
#include <Geom_BezierCurve.hxx>
#include <Geom_BSplineCurve.hxx>
#include <Geom_Plane.hxx>
#include <GeomAbs_CurveType.hxx>
#include <GeomFill_CorrectedFrenet.hxx>
#include <GeomFill_Frenet.hxx>
#include <GeomFill_SnglrFunc.hxx>
#include <GeomFill_TrihedronLaw.hxx>
#include <GeomLib.hxx>
#include <gp_Trsf.hxx>
#include <gp_Vec.hxx>
#include <gp_Vec2d.hxx>
#include <Law_BSpFunc.hxx>
#include <Law_BSpline.hxx>
#include <Law_Composite.hxx>
#include <Law_Constant.hxx>
#include <Law_Function.hxx>
#include <Law_Interpolate.hxx>
#include <Precision.hxx>
#include <Standard_ConstructionError.hxx>
#include <Standard_OutOfRange.hxx>
#include <Standard_Type.hxx>
#include <TColgp_HArray1OfPnt.hxx>
#include <TColStd_HArray1OfReal.hxx>
#include <TColStd_SequenceOfReal.hxx>
#include <stdio.h>
//Patch
#ifdef OCCT_DEBUG
static Standard_Boolean Affich=0;
#endif

View File

@@ -0,0 +1,156 @@
// Created on: 1997-12-19
// 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 _GeomFill_CorrectedFrenet_HeaderFile
#define _GeomFill_CorrectedFrenet_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <gp_Vec.hxx>
#include <Standard_Boolean.hxx>
#include <TColStd_HArray1OfReal.hxx>
#include <TColgp_HArray1OfVec.hxx>
#include <GeomFill_TrihedronLaw.hxx>
#include <Standard_Real.hxx>
#include <TColStd_SequenceOfReal.hxx>
#include <TColgp_SequenceOfVec.hxx>
#include <Standard_Integer.hxx>
#include <GeomAbs_Shape.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <GeomFill_Trihedron.hxx>
class GeomFill_Frenet;
class Law_Function;
class Standard_OutOfRange;
class Standard_ConstructionError;
class GeomFill_TrihedronLaw;
class gp_Vec;
class Adaptor3d_HCurve;
class GeomFill_CorrectedFrenet;
DEFINE_STANDARD_HANDLE(GeomFill_CorrectedFrenet, GeomFill_TrihedronLaw)
//! Defined an Corrected Frenet Trihedron Law It is
//! like Frenet with an Torsion's minimization
class GeomFill_CorrectedFrenet : public GeomFill_TrihedronLaw
{
public:
Standard_EXPORT GeomFill_CorrectedFrenet();
Standard_EXPORT GeomFill_CorrectedFrenet(const Standard_Boolean ForEvaluation);
Standard_EXPORT virtual Handle(GeomFill_TrihedronLaw) Copy() const Standard_OVERRIDE;
Standard_EXPORT virtual void SetCurve (const Handle(Adaptor3d_HCurve)& C) Standard_OVERRIDE;
Standard_EXPORT virtual void SetInterval (const Standard_Real First, const Standard_Real Last) Standard_OVERRIDE;
//! compute Triedrhon on curve at parameter <Param>
Standard_EXPORT virtual Standard_Boolean D0 (const Standard_Real Param, gp_Vec& Tangent, gp_Vec& Normal, gp_Vec& BiNormal) Standard_OVERRIDE;
//! compute Triedrhon and derivative Trihedron on curve
//! at parameter <Param>
//! Warning : It used only for C1 or C2 aproximation
Standard_EXPORT virtual Standard_Boolean D1 (const Standard_Real Param, gp_Vec& Tangent, gp_Vec& DTangent, gp_Vec& Normal, gp_Vec& DNormal, gp_Vec& BiNormal, gp_Vec& DBiNormal) Standard_OVERRIDE;
//! compute Trihedron on curve
//! first and seconde derivatives.
//! Warning : It used only for C2 aproximation
Standard_EXPORT virtual Standard_Boolean D2 (const Standard_Real Param, gp_Vec& Tangent, gp_Vec& DTangent, gp_Vec& D2Tangent, gp_Vec& Normal, gp_Vec& DNormal, gp_Vec& D2Normal, gp_Vec& BiNormal, gp_Vec& DBiNormal, gp_Vec& D2BiNormal) Standard_OVERRIDE;
//! Returns the number of intervals for continuity
//! <S>.
//! May be one if Continuity(me) >= <S>
Standard_EXPORT virtual Standard_Integer NbIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE;
//! Stores in <T> the parameters bounding the intervals
//! of continuity <S>.
//!
//! The array must provide enough room to accomodate
//! for the parameters. i.e. T.Length() > NbIntervals()
Standard_EXPORT virtual void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE;
//! Tries to define the best trihedron mode
//! for the curve. It can be:
//! - Frenet
//! - CorrectedFrenet
//! - DiscreteTrihedron
//! Warning: the CorrectedFrenet must be constructed
//! with option ForEvaluation = True,
//! the curve must be set by method SetCurve.
Standard_EXPORT GeomFill_Trihedron EvaluateBestMode();
//! Get average value of Tangent(t) and Normal(t) it is usfull to
//! make fast approximation of rational surfaces.
Standard_EXPORT virtual void GetAverageLaw (gp_Vec& ATangent, gp_Vec& ANormal, gp_Vec& ABiNormal) Standard_OVERRIDE;
//! Say if the law is Constant.
Standard_EXPORT virtual Standard_Boolean IsConstant() const Standard_OVERRIDE;
//! Return True.
Standard_EXPORT virtual Standard_Boolean IsOnlyBy3dCurve() const Standard_OVERRIDE;
DEFINE_STANDARD_RTTI(GeomFill_CorrectedFrenet,GeomFill_TrihedronLaw)
protected:
private:
Standard_EXPORT void Init();
//! Computes BSpline representation of Normal evolution at one
//! interval of continuity of Frenet. Returns True if FuncInt = 0
Standard_EXPORT Standard_Boolean InitInterval (const Standard_Real First, const Standard_Real Last, const Standard_Real Step, Standard_Real& startAng, gp_Vec& prevTangent, gp_Vec& prevNormal, gp_Vec& aT, gp_Vec& aN, Handle(Law_Function)& FuncInt, TColStd_SequenceOfReal& SeqPoles, TColStd_SequenceOfReal& SeqAngle, TColgp_SequenceOfVec& SeqTangent, TColgp_SequenceOfVec& SeqNormal) const;
//! Computes angle of Normal evolution of Frenet between any two points on the curve.
Standard_EXPORT Standard_Real CalcAngleAT (const gp_Vec& Tangent, const gp_Vec& Normal, const gp_Vec& prevTangent, const gp_Vec& prevNormal) const;
//! Get corrected value of angle of Normal evolution of Frenet
Standard_EXPORT Standard_Real GetAngleAT (const Standard_Real P) const;
Handle(GeomFill_Frenet) frenet;
Handle(Law_Function) EvolAroundT;
Handle(Law_Function) TLaw;
gp_Vec AT;
gp_Vec AN;
Standard_Boolean isFrenet;
Standard_Boolean myForEvaluation;
Handle(TColStd_HArray1OfReal) HArrPoles;
Handle(TColStd_HArray1OfReal) HArrAngle;
Handle(TColgp_HArray1OfVec) HArrTangent;
Handle(TColgp_HArray1OfVec) HArrNormal;
};
#endif // _GeomFill_CorrectedFrenet_HeaderFile

View File

@@ -1,214 +0,0 @@
-- Created on: 1997-12-02
-- 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 CurveAndTrihedron from GeomFill
inherits LocationLaw from GeomFill
---Purpose: Define location law with an TrihedronLaw and an
-- curve
-- Definition Location is :
-- transformed section coordinates in (Curve(v)),
-- (Normal(v), BiNormal(v), Tangente(v))) systeme are
-- the same like section shape coordinates in
-- (O,(OX, OY, OZ)) systeme.
uses
TrihedronLaw from GeomFill,
HCurve from Adaptor3d,
Mat from gp,
Vec from gp,
Pnt from gp,
Array1OfReal from TColStd,
Array1OfPnt2d from TColgp,
Array1OfVec2d from TColgp,
Shape from GeomAbs
raises OutOfRange
is
Create(Trihedron : TrihedronLaw from GeomFill)
returns CurveAndTrihedron from GeomFill;
SetCurve(me : mutable; C : HCurve from Adaptor3d)
is redefined;
GetCurve(me)
returns HCurve from Adaptor3d
---C++: return const &
is redefined;
SetTrsf(me : mutable; Transfo : Mat from gp)
---Purpose: Set a transformation Matrix like the law M(t) become
-- Mat * M(t)
is redefined;
Copy(me)
returns LocationLaw from GeomFill
is redefined;
--
--========== To compute Location and derivatives Location
--
D0(me : mutable;
Param: Real;
M : out Mat from gp;
V : out Vec from gp)
---Purpose: compute Location and 2d points
returns Boolean is redefined;
D0(me : mutable;
Param: Real;
M : out Mat from gp;
V : out Vec from gp;
Poles2d : out Array1OfPnt2d from TColgp)
---Purpose: compute Location and 2d points
returns Boolean is redefined;
D1(me : mutable;
Param: Real;
M : out Mat from gp;
V : out Vec from gp;
DM : out Mat from gp;
DV : out Vec from gp;
Poles2d : out Array1OfPnt2d from TColgp;
DPoles2d : out Array1OfVec2d from TColgp)
---Purpose: compute location 2d points and associated
-- first derivatives.
-- Warning : It used only for C1 or C2 aproximation
returns Boolean
is redefined;
D2(me : mutable;
Param: Real;
M : out Mat from gp;
V : out Vec from gp;
DM : out Mat from gp;
DV : out Vec from gp;
D2M : out Mat from gp;
D2V : out Vec from gp;
Poles2d : out Array1OfPnt2d from TColgp;
DPoles2d : out Array1OfVec2d from TColgp;
D2Poles2d : out Array1OfVec2d from TColgp)
---Purpose: compute location 2d points and associated
-- first and seconde derivatives.
-- Warning : It used only for C2 aproximation
returns Boolean
is redefined;
--
-- =================== Management of continuity ===================
--
NbIntervals(me; S : Shape from GeomAbs)
---Purpose: Returns the number of intervals for continuity
-- <S>.
-- May be one if Continuity(me) >= <S>
returns Integer is redefined;
Intervals(me; T : in out Array1OfReal from TColStd;
S : Shape from GeomAbs)
---Purpose: Stores in <T> the parameters bounding the intervals
-- of continuity <S>.
--
-- The array must provide enough room to accomodate
-- for the parameters. i.e. T.Length() > NbIntervals()
raises
OutOfRange from Standard
is redefined;
SetInterval(me: mutable; First, Last: Real from Standard)
---Purpose: Sets the bounds of the parametric interval on
-- the function
-- This determines the derivatives in these values if the
-- function is not Cn.
is redefined;
GetInterval(me; First, Last: out Real from Standard)
---Purpose: Gets the bounds of the parametric interval on
-- the function
is redefined;
GetDomain(me; First, Last: out Real from Standard)
---Purpose: Gets the bounds of the function parametric domain.
-- Warning: This domain it is not modified by the
-- SetValue method
is redefined;
-- =================== To help computation of Tolerance ===============
--
-- Evaluation of error, in 2d space, or on composed function, is
-- difficult. The following methods can help the approximation to
-- make good evaluation and use good tolerances.
--
-- It is not necessary for the following informations to be very
-- precise. A fast evaluation is sufficient.
GetMaximalNorm(me : mutable)
---Purpose: Get the maximum Norm of the matrix-location part. It
-- is usful to find an good Tolerance to approx M(t).
returns Real
is redefined;
GetAverageLaw(me : mutable;
AM: out Mat from gp;
AV: out Vec from gp)
---Purpose: Get average value of M(t) and V(t) it is usfull to
-- make fast approximation of rational surfaces.
is redefined;
--
-- To find elementary sweep
--
IsTranslation(me; Error : out Real)
---Purpose: Say if the Location Law, is an translation of Location
-- The default implementation is " returns False ".
returns Boolean
is redefined;
IsRotation(me; Error : out Real )
---Purpose: Say if the Location Law, is a rotation of Location
-- The default implementation is " returns False ".
returns Boolean
is redefined;
Rotation(me; Center : out Pnt from gp)
is redefined;
fields
WithTrans: Boolean from Standard;
myLaw : TrihedronLaw from GeomFill;
myCurve : HCurve from Adaptor3d;
myTrimmed: HCurve from Adaptor3d;
Point : Pnt from gp;
V1, V2, V3 : Vec from gp;
Trans : Mat from gp;
end CurveAndTrihedron;

View File

@@ -14,17 +14,25 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GeomFill_CurveAndTrihedron.ixx>
#include <Adaptor3d_HCurve.hxx>
#include <GeomFill_CurveAndTrihedron.hxx>
#include <GeomFill_LocationLaw.hxx>
#include <GeomFill_TrihedronLaw.hxx>
#include <GeomLib.hxx>
#include <gp_Circ.hxx>
#include <TColStd_SequenceOfReal.hxx>
#include <gp_Mat.hxx>
#include <gp_Pnt.hxx>
#include <gp_Vec.hxx>
#include <Precision.hxx>
#include <Standard_OutOfRange.hxx>
#include <Standard_Type.hxx>
#include <TColStd_SequenceOfReal.hxx>
//==================================================================
//Function: Create
//Purpose :
//==================================================================
GeomFill_CurveAndTrihedron::GeomFill_CurveAndTrihedron(
const Handle(GeomFill_TrihedronLaw)& Trihedron )
{

View File

@@ -0,0 +1,164 @@
// Created on: 1997-12-02
// 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 _GeomFill_CurveAndTrihedron_HeaderFile
#define _GeomFill_CurveAndTrihedron_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Standard_Boolean.hxx>
#include <gp_Pnt.hxx>
#include <gp_Vec.hxx>
#include <gp_Mat.hxx>
#include <GeomFill_LocationLaw.hxx>
#include <Standard_Real.hxx>
#include <TColgp_Array1OfPnt2d.hxx>
#include <TColgp_Array1OfVec2d.hxx>
#include <Standard_Integer.hxx>
#include <GeomAbs_Shape.hxx>
#include <TColStd_Array1OfReal.hxx>
class GeomFill_TrihedronLaw;
class Adaptor3d_HCurve;
class Standard_OutOfRange;
class gp_Mat;
class GeomFill_LocationLaw;
class gp_Vec;
class gp_Pnt;
class GeomFill_CurveAndTrihedron;
DEFINE_STANDARD_HANDLE(GeomFill_CurveAndTrihedron, GeomFill_LocationLaw)
//! Define location law with an TrihedronLaw and an
//! curve
//! Definition Location is :
//! transformed section coordinates in (Curve(v)),
//! (Normal(v), BiNormal(v), Tangente(v))) systeme are
//! the same like section shape coordinates in
//! (O,(OX, OY, OZ)) systeme.
class GeomFill_CurveAndTrihedron : public GeomFill_LocationLaw
{
public:
Standard_EXPORT GeomFill_CurveAndTrihedron(const Handle(GeomFill_TrihedronLaw)& Trihedron);
Standard_EXPORT virtual void SetCurve (const Handle(Adaptor3d_HCurve)& C) Standard_OVERRIDE;
Standard_EXPORT virtual const Handle(Adaptor3d_HCurve)& GetCurve() const Standard_OVERRIDE;
//! Set a transformation Matrix like the law M(t) become
//! Mat * M(t)
Standard_EXPORT virtual void SetTrsf (const gp_Mat& Transfo) Standard_OVERRIDE;
Standard_EXPORT virtual Handle(GeomFill_LocationLaw) Copy() const Standard_OVERRIDE;
//! compute Location and 2d points
Standard_EXPORT virtual Standard_Boolean D0 (const Standard_Real Param, gp_Mat& M, gp_Vec& V) Standard_OVERRIDE;
//! compute Location and 2d points
Standard_EXPORT virtual Standard_Boolean D0 (const Standard_Real Param, gp_Mat& M, gp_Vec& V, TColgp_Array1OfPnt2d& Poles2d) Standard_OVERRIDE;
//! compute location 2d points and associated
//! first derivatives.
//! Warning : It used only for C1 or C2 aproximation
Standard_EXPORT virtual Standard_Boolean D1 (const Standard_Real Param, gp_Mat& M, gp_Vec& V, gp_Mat& DM, gp_Vec& DV, TColgp_Array1OfPnt2d& Poles2d, TColgp_Array1OfVec2d& DPoles2d) Standard_OVERRIDE;
//! compute location 2d points and associated
//! first and seconde derivatives.
//! Warning : It used only for C2 aproximation
Standard_EXPORT virtual Standard_Boolean D2 (const Standard_Real Param, gp_Mat& M, gp_Vec& V, gp_Mat& DM, gp_Vec& DV, gp_Mat& D2M, gp_Vec& D2V, TColgp_Array1OfPnt2d& Poles2d, TColgp_Array1OfVec2d& DPoles2d, TColgp_Array1OfVec2d& D2Poles2d) Standard_OVERRIDE;
//! Returns the number of intervals for continuity
//! <S>.
//! May be one if Continuity(me) >= <S>
Standard_EXPORT virtual Standard_Integer NbIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE;
//! Stores in <T> the parameters bounding the intervals
//! of continuity <S>.
//!
//! The array must provide enough room to accomodate
//! for the parameters. i.e. T.Length() > NbIntervals()
Standard_EXPORT virtual void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE;
//! Sets the bounds of the parametric interval on
//! the function
//! This determines the derivatives in these values if the
//! function is not Cn.
Standard_EXPORT virtual void SetInterval (const Standard_Real First, const Standard_Real Last) Standard_OVERRIDE;
//! Gets the bounds of the parametric interval on
//! the function
Standard_EXPORT virtual void GetInterval (Standard_Real& First, Standard_Real& Last) const Standard_OVERRIDE;
//! Gets the bounds of the function parametric domain.
//! Warning: This domain it is not modified by the
//! SetValue method
Standard_EXPORT virtual void GetDomain (Standard_Real& First, Standard_Real& Last) const Standard_OVERRIDE;
//! Get the maximum Norm of the matrix-location part. It
//! is usful to find an good Tolerance to approx M(t).
Standard_EXPORT virtual Standard_Real GetMaximalNorm() Standard_OVERRIDE;
//! Get average value of M(t) and V(t) it is usfull to
//! make fast approximation of rational surfaces.
Standard_EXPORT virtual void GetAverageLaw (gp_Mat& AM, gp_Vec& AV) Standard_OVERRIDE;
//! Say if the Location Law, is an translation of Location
//! The default implementation is " returns False ".
Standard_EXPORT virtual Standard_Boolean IsTranslation (Standard_Real& Error) const Standard_OVERRIDE;
//! Say if the Location Law, is a rotation of Location
//! The default implementation is " returns False ".
Standard_EXPORT virtual Standard_Boolean IsRotation (Standard_Real& Error) const Standard_OVERRIDE;
Standard_EXPORT virtual void Rotation (gp_Pnt& Center) const Standard_OVERRIDE;
DEFINE_STANDARD_RTTI(GeomFill_CurveAndTrihedron,GeomFill_LocationLaw)
protected:
private:
Standard_Boolean WithTrans;
Handle(GeomFill_TrihedronLaw) myLaw;
Handle(Adaptor3d_HCurve) myCurve;
Handle(Adaptor3d_HCurve) myTrimmed;
gp_Pnt Point;
gp_Vec V1;
gp_Vec V2;
gp_Vec V3;
gp_Mat Trans;
};
#endif // _GeomFill_CurveAndTrihedron_HeaderFile

View File

@@ -1,77 +0,0 @@
-- Created on: 1993-09-28
-- Created by: Bruno DUMORTIER
-- Copyright (c) 1993-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 Curved from GeomFill inherits Filling from GeomFill
uses
Array1OfPnt from TColgp,
Array1OfReal from TColStd
is
Create;
Create(P1, P2, P3, P4 : Array1OfPnt from TColgp)
returns Curved from GeomFill;
Create(P1, P2, P3, P4 : Array1OfPnt from TColgp;
W1, W2, W3, W4 : Array1OfReal from TColStd)
returns Curved from GeomFill;
Create(P1, P2, P3 : Array1OfPnt from TColgp)
returns Curved from GeomFill;
Create(P1, P2, P3 : Array1OfPnt from TColgp;
W1, W2, W3 : Array1OfReal from TColStd)
returns Curved from GeomFill;
Create(P1, P2 : Array1OfPnt from TColgp)
returns Curved from GeomFill;
Create(P1, P2 : Array1OfPnt from TColgp;
W1, W2 : Array1OfReal from TColStd)
returns Curved from GeomFill;
Init(me : in out;
P1, P2, P3, P4 : Array1OfPnt from TColgp)
is static;
Init(me : in out;
P1, P2, P3, P4 : Array1OfPnt from TColgp;
W1, W2, W3, W4 : Array1OfReal from TColStd)
is static;
Init(me : in out;
P1, P2, P3 : Array1OfPnt from TColgp)
is static;
Init(me : in out;
P1, P2, P3 : Array1OfPnt from TColgp;
W1, W2, W3 : Array1OfReal from TColStd)
is static;
Init(me : in out;
P1, P2 : Array1OfPnt from TColgp)
is static;
Init(me : in out;
P1, P2 : Array1OfPnt from TColgp;
W1, W2 : Array1OfReal from TColStd)
is static;
end Curved;

View File

@@ -14,21 +14,19 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GeomFill_Curved.ixx>
#include <GeomFill_Curved.hxx>
#include <gp_Pnt.hxx>
#include <gp_Vec.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <TColgp_HArray2OfPnt.hxx>
#include <TColStd_HArray2OfReal.hxx>
#include <Standard_NotImplemented.hxx>
#include <TColgp_HArray2OfPnt.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <TColStd_HArray2OfReal.hxx>
//=======================================================================
//function : GeomFill_Curved
//purpose :
//=======================================================================
GeomFill_Curved::GeomFill_Curved()
{
}

View File

@@ -0,0 +1,86 @@
// Created on: 1993-09-28
// Created by: Bruno DUMORTIER
// Copyright (c) 1993-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 _GeomFill_Curved_HeaderFile
#define _GeomFill_Curved_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <GeomFill_Filling.hxx>
#include <TColgp_Array1OfPnt.hxx>
#include <TColStd_Array1OfReal.hxx>
class GeomFill_Curved : public GeomFill_Filling
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT GeomFill_Curved();
Standard_EXPORT GeomFill_Curved(const TColgp_Array1OfPnt& P1, const TColgp_Array1OfPnt& P2, const TColgp_Array1OfPnt& P3, const TColgp_Array1OfPnt& P4);
Standard_EXPORT GeomFill_Curved(const TColgp_Array1OfPnt& P1, const TColgp_Array1OfPnt& P2, const TColgp_Array1OfPnt& P3, const TColgp_Array1OfPnt& P4, const TColStd_Array1OfReal& W1, const TColStd_Array1OfReal& W2, const TColStd_Array1OfReal& W3, const TColStd_Array1OfReal& W4);
Standard_EXPORT GeomFill_Curved(const TColgp_Array1OfPnt& P1, const TColgp_Array1OfPnt& P2, const TColgp_Array1OfPnt& P3);
Standard_EXPORT GeomFill_Curved(const TColgp_Array1OfPnt& P1, const TColgp_Array1OfPnt& P2, const TColgp_Array1OfPnt& P3, const TColStd_Array1OfReal& W1, const TColStd_Array1OfReal& W2, const TColStd_Array1OfReal& W3);
Standard_EXPORT GeomFill_Curved(const TColgp_Array1OfPnt& P1, const TColgp_Array1OfPnt& P2);
Standard_EXPORT GeomFill_Curved(const TColgp_Array1OfPnt& P1, const TColgp_Array1OfPnt& P2, const TColStd_Array1OfReal& W1, const TColStd_Array1OfReal& W2);
Standard_EXPORT void Init (const TColgp_Array1OfPnt& P1, const TColgp_Array1OfPnt& P2, const TColgp_Array1OfPnt& P3, const TColgp_Array1OfPnt& P4);
Standard_EXPORT void Init (const TColgp_Array1OfPnt& P1, const TColgp_Array1OfPnt& P2, const TColgp_Array1OfPnt& P3, const TColgp_Array1OfPnt& P4, const TColStd_Array1OfReal& W1, const TColStd_Array1OfReal& W2, const TColStd_Array1OfReal& W3, const TColStd_Array1OfReal& W4);
Standard_EXPORT void Init (const TColgp_Array1OfPnt& P1, const TColgp_Array1OfPnt& P2, const TColgp_Array1OfPnt& P3);
Standard_EXPORT void Init (const TColgp_Array1OfPnt& P1, const TColgp_Array1OfPnt& P2, const TColgp_Array1OfPnt& P3, const TColStd_Array1OfReal& W1, const TColStd_Array1OfReal& W2, const TColStd_Array1OfReal& W3);
Standard_EXPORT void Init (const TColgp_Array1OfPnt& P1, const TColgp_Array1OfPnt& P2);
Standard_EXPORT void Init (const TColgp_Array1OfPnt& P1, const TColgp_Array1OfPnt& P2, const TColStd_Array1OfReal& W1, const TColStd_Array1OfReal& W2);
protected:
private:
};
#endif // _GeomFill_Curved_HeaderFile

View File

@@ -1,127 +0,0 @@
-- Created on: 1998-03-04
-- Created by: Roman BORISOV
-- 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 Darboux from GeomFill
inherits TrihedronLaw from GeomFill
---Purpose: Defines Darboux case of Frenet Trihedron Law
uses
HSurface from Adaptor3d,
Shape from GeomAbs,
Array1OfReal from TColStd,
Vec from gp,
HArray1OfReal from TColStd,
CurveOnSurface from Adaptor3d
raises
OutOfRange, ConstructionError
is
Create
returns Darboux from GeomFill
raises ConstructionError;
Copy(me)
returns TrihedronLaw from GeomFill
is redefined;
--
--
--========== To compute Location and derivatives Location
--
D0(me : mutable;
Param: Real;
Tangent : out Vec from gp;
Normal : out Vec from gp;
BiNormal : out Vec from gp)
---Purpose: compute Triedrhon on curve at parameter <Param>
returns Boolean is redefined;
D1(me : mutable;
Param: Real;
Tangent : out Vec from gp;
DTangent : out Vec from gp;
Normal : out Vec from gp;
DNormal : out Vec from gp;
BiNormal : out Vec from gp;
DBiNormal : out Vec from gp)
---Purpose: compute Triedrhon and derivative Trihedron on curve
-- at parameter <Param>
-- Warning : It used only for C1 or C2 aproximation
returns Boolean
is redefined;
D2(me : mutable;
Param: Real;
Tangent : out Vec from gp;
DTangent : out Vec from gp;
D2Tangent : out Vec from gp;
Normal : out Vec from gp;
DNormal : out Vec from gp;
D2Normal : out Vec from gp;
BiNormal : out Vec from gp;
DBiNormal : out Vec from gp;
D2BiNormal : out Vec from gp)
---Purpose: compute Trihedron on curve
-- first and seconde derivatives.
-- Warning : It used only for C2 aproximation
returns Boolean
is redefined;
--
-- =================== Management of continuity ===================
--
NbIntervals(me; S : Shape from GeomAbs)
---Purpose: Returns the number of intervals for continuity
-- <S>.
-- May be one if Continuity(me) >= <S>
returns Integer is redefined;
Intervals(me; T : in out Array1OfReal from TColStd;
S : Shape from GeomAbs)
---Purpose: Stores in <T> the parameters bounding the intervals
-- of continuity <S>.
--
-- The array must provide enough room to accomodate
-- for the parameters. i.e. T.Length() > NbIntervals()
raises
OutOfRange from Standard
is redefined;
-- =================== To help computation of Tolerance ===============
GetAverageLaw(me : mutable;
ATangent : out Vec from gp;
ANormal : out Vec from gp;
ABiNormal : out Vec from gp)
---Purpose: Get average value of Tangent(t) and Normal(t) it is usfull to
-- make fast approximation of rational surfaces.
is redefined;
-- =================== To help Particular case ===============
IsConstant(me)
---Purpose: Say if the law is Constant.
returns Boolean
is redefined;
IsOnlyBy3dCurve(me)
---Purpose: Return False.
returns Boolean
is redefined;
end Darboux;

View File

@@ -14,20 +14,26 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GeomFill_Darboux.ixx>
#include <Adaptor3d_HCurve.hxx>
#include <gp_Pnt2d.hxx>
#include <gp_Vec2d.hxx>
#include <Adaptor2d_HCurve2d.hxx>
#include <Adaptor3d_CurveOnSurface.hxx>
#include <Adaptor3d_CurveOnSurfacePtr.hxx>
#include <Adaptor3d_HCurve.hxx>
#include <Adaptor3d_HCurveOnSurface.hxx>
#include <Adaptor3d_HSurface.hxx>
#include <Adaptor3d_CurveOnSurfacePtr.hxx>
#include <CSLib.hxx>
#include <TColgp_Array2OfVec.hxx>
#include <Geom_UndefinedValue.hxx>
#include <GeomAdaptor_HSurface.hxx>
#include <GeomAdaptor_Surface.hxx>
#include <GeomFill_Darboux.hxx>
#include <GeomFill_TrihedronLaw.hxx>
#include <gp_Pnt2d.hxx>
#include <gp_Vec.hxx>
#include <gp_Vec2d.hxx>
#include <Standard_ConstructionError.hxx>
#include <Standard_OutOfRange.hxx>
#include <Standard_Type.hxx>
#include <TColgp_Array2OfVec.hxx>
//=======================================================================
//function : FDeriv

View File

@@ -0,0 +1,107 @@
// Created on: 1998-03-04
// Created by: Roman BORISOV
// 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 _GeomFill_Darboux_HeaderFile
#define _GeomFill_Darboux_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <GeomFill_TrihedronLaw.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Real.hxx>
#include <Standard_Integer.hxx>
#include <GeomAbs_Shape.hxx>
#include <TColStd_Array1OfReal.hxx>
class Standard_OutOfRange;
class Standard_ConstructionError;
class GeomFill_TrihedronLaw;
class gp_Vec;
class GeomFill_Darboux;
DEFINE_STANDARD_HANDLE(GeomFill_Darboux, GeomFill_TrihedronLaw)
//! Defines Darboux case of Frenet Trihedron Law
class GeomFill_Darboux : public GeomFill_TrihedronLaw
{
public:
Standard_EXPORT GeomFill_Darboux();
Standard_EXPORT virtual Handle(GeomFill_TrihedronLaw) Copy() const Standard_OVERRIDE;
//! compute Triedrhon on curve at parameter <Param>
Standard_EXPORT virtual Standard_Boolean D0 (const Standard_Real Param, gp_Vec& Tangent, gp_Vec& Normal, gp_Vec& BiNormal) Standard_OVERRIDE;
//! compute Triedrhon and derivative Trihedron on curve
//! at parameter <Param>
//! Warning : It used only for C1 or C2 aproximation
Standard_EXPORT virtual Standard_Boolean D1 (const Standard_Real Param, gp_Vec& Tangent, gp_Vec& DTangent, gp_Vec& Normal, gp_Vec& DNormal, gp_Vec& BiNormal, gp_Vec& DBiNormal) Standard_OVERRIDE;
//! compute Trihedron on curve
//! first and seconde derivatives.
//! Warning : It used only for C2 aproximation
Standard_EXPORT virtual Standard_Boolean D2 (const Standard_Real Param, gp_Vec& Tangent, gp_Vec& DTangent, gp_Vec& D2Tangent, gp_Vec& Normal, gp_Vec& DNormal, gp_Vec& D2Normal, gp_Vec& BiNormal, gp_Vec& DBiNormal, gp_Vec& D2BiNormal) Standard_OVERRIDE;
//! Returns the number of intervals for continuity
//! <S>.
//! May be one if Continuity(me) >= <S>
Standard_EXPORT virtual Standard_Integer NbIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE;
//! Stores in <T> the parameters bounding the intervals
//! of continuity <S>.
//!
//! The array must provide enough room to accomodate
//! for the parameters. i.e. T.Length() > NbIntervals()
Standard_EXPORT virtual void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE;
//! Get average value of Tangent(t) and Normal(t) it is usfull to
//! make fast approximation of rational surfaces.
Standard_EXPORT virtual void GetAverageLaw (gp_Vec& ATangent, gp_Vec& ANormal, gp_Vec& ABiNormal) Standard_OVERRIDE;
//! Say if the law is Constant.
Standard_EXPORT virtual Standard_Boolean IsConstant() const Standard_OVERRIDE;
//! Return False.
Standard_EXPORT virtual Standard_Boolean IsOnlyBy3dCurve() const Standard_OVERRIDE;
DEFINE_STANDARD_RTTI(GeomFill_Darboux,GeomFill_TrihedronLaw)
protected:
private:
};
#endif // _GeomFill_Darboux_HeaderFile

View File

@@ -1,61 +0,0 @@
-- Created on: 1995-12-05
-- Created by: Laurent BOURESCHE
-- 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 DegeneratedBound from GeomFill inherits Boundary from GeomFill
---Purpose: Description of a degenerated boundary (a point).
-- Class defining a degenerated boundary for a
-- constrained filling with a point and no other
-- constraint. Only used to simulate an ordinary bound,
-- may not be usefull and desapear soon.
uses
Pnt from gp,
Vec from gp
is
Create(Point : Pnt from gp;
First, Last : Real from Standard;
Tol3d : Real from Standard;
Tolang : Real from Standard)
returns DegeneratedBound from GeomFill;
Value(me;
U : Real from Standard)
returns Pnt from gp;
D1(me;
U : Real from Standard;
P : out Pnt from gp;
V : out Vec from gp) ;
Reparametrize(me : mutable;
First, Last : Real from Standard;
HasDF, HasDL : Boolean from Standard;
DF, DL : Real from Standard;
Rev : Boolean from Standard);
Bounds(me; First, Last : out Real from Standard);
IsDegenerated(me) returns Boolean from Standard;
fields
myPoint : Pnt from gp;
myFirst : Real from Standard;
myLast : Real from Standard;
end DegeneratedBound;

View File

@@ -14,13 +14,16 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GeomFill_DegeneratedBound.ixx>
#include <GeomFill_DegeneratedBound.hxx>
#include <gp_Pnt.hxx>
#include <gp_Vec.hxx>
#include <Standard_Type.hxx>
//=======================================================================
//function : GeomFill_DegeneratedBound
//purpose :
//=======================================================================
GeomFill_DegeneratedBound::GeomFill_DegeneratedBound
(const gp_Pnt& Point,
const Standard_Real First,

View File

@@ -0,0 +1,83 @@
// Created on: 1995-12-05
// Created by: Laurent BOURESCHE
// 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 _GeomFill_DegeneratedBound_HeaderFile
#define _GeomFill_DegeneratedBound_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <gp_Pnt.hxx>
#include <Standard_Real.hxx>
#include <GeomFill_Boundary.hxx>
#include <Standard_Boolean.hxx>
class gp_Pnt;
class gp_Vec;
class GeomFill_DegeneratedBound;
DEFINE_STANDARD_HANDLE(GeomFill_DegeneratedBound, GeomFill_Boundary)
//! Description of a degenerated boundary (a point).
//! Class defining a degenerated boundary for a
//! constrained filling with a point and no other
//! constraint. Only used to simulate an ordinary bound,
//! may not be usefull and desapear soon.
class GeomFill_DegeneratedBound : public GeomFill_Boundary
{
public:
Standard_EXPORT GeomFill_DegeneratedBound(const gp_Pnt& Point, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol3d, const Standard_Real Tolang);
Standard_EXPORT gp_Pnt Value (const Standard_Real U) const;
Standard_EXPORT void D1 (const Standard_Real U, gp_Pnt& P, gp_Vec& V) const;
Standard_EXPORT void Reparametrize (const Standard_Real First, const Standard_Real Last, const Standard_Boolean HasDF, const Standard_Boolean HasDL, const Standard_Real DF, const Standard_Real DL, const Standard_Boolean Rev);
Standard_EXPORT void Bounds (Standard_Real& First, Standard_Real& Last) const;
Standard_EXPORT Standard_Boolean IsDegenerated() const;
DEFINE_STANDARD_RTTI(GeomFill_DegeneratedBound,GeomFill_Boundary)
protected:
private:
gp_Pnt myPoint;
Standard_Real myFirst;
Standard_Real myLast;
};
#endif // _GeomFill_DegeneratedBound_HeaderFile

View File

@@ -1,149 +0,0 @@
-- Created on: 2013-02-05
-- Created by: Julia GERASIMOVA
-- Copyright (c) 2001-2013 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 DiscreteTrihedron from GeomFill
inherits TrihedronLaw from GeomFill
---Purpose: Defined Discrete Trihedron Law.
-- The requirement for path curve is only G1.
-- The result is C0-continuous surface
-- that can be later approximated to C1.
uses
HCurve from Adaptor3d,
Shape from GeomAbs,
Pnt from gp,
Vec from gp,
Array1OfReal from TColStd,
Frenet from GeomFill,
HSequenceOfAx2 from GeomFill,
HSequenceOfReal from TColStd
raises
OutOfRange, ConstructionError
is
Create
returns DiscreteTrihedron from GeomFill
raises ConstructionError;
Copy(me)
returns TrihedronLaw from GeomFill
is redefined;
Init(me: mutable)
is static;
SetCurve(me : mutable; C : HCurve from Adaptor3d)
is redefined;
--
--
--========== To compute Location and derivatives Location
--
D0(me : mutable;
Param: Real;
Tangent : out Vec from gp;
Normal : out Vec from gp;
BiNormal : out Vec from gp)
---Purpose: compute Trihedron on curve at parameter <Param>
returns Boolean is redefined;
D1(me : mutable;
Param: Real;
Tangent : out Vec from gp;
DTangent : out Vec from gp;
Normal : out Vec from gp;
DNormal : out Vec from gp;
BiNormal : out Vec from gp;
DBiNormal : out Vec from gp)
---Purpose: compute Trihedron and derivative Trihedron on curve
-- at parameter <Param>
-- Warning : It used only for C1 or C2 aproximation
-- For the moment it returns null values for DTangent, DNormal
-- and DBiNormal.
returns Boolean
is redefined;
D2(me : mutable;
Param: Real;
Tangent : out Vec from gp;
DTangent : out Vec from gp;
D2Tangent : out Vec from gp;
Normal : out Vec from gp;
DNormal : out Vec from gp;
D2Normal : out Vec from gp;
BiNormal : out Vec from gp;
DBiNormal : out Vec from gp;
D2BiNormal : out Vec from gp)
---Purpose: compute Trihedron on curve
-- first and seconde derivatives.
-- Warning : It used only for C2 aproximation
-- For the moment it returns null values for DTangent, DNormal
-- DBiNormal, D2Tangent, D2Normal, D2BiNormal.
returns Boolean
is redefined;
--
-- =================== Management of continuity ===================
--
NbIntervals(me; S : Shape from GeomAbs)
---Purpose: Returns the number of intervals for continuity
-- <S>.
-- May be one if Continuity(me) >= <S>
returns Integer is redefined;
Intervals(me; T : in out Array1OfReal from TColStd;
S : Shape from GeomAbs)
---Purpose: Stores in <T> the parameters bounding the intervals
-- of continuity <S>.
--
-- The array must provide enough room to accomodate
-- for the parameters. i.e. T.Length() > NbIntervals()
raises
OutOfRange from Standard
is redefined;
-- =================== To help computation of Tolerance ===============
GetAverageLaw(me : mutable;
ATangent : out Vec from gp;
ANormal : out Vec from gp;
ABiNormal : out Vec from gp)
---Purpose: Get average value of Tangent(t) and Normal(t) it is usful to
-- make fast approximation of rational surfaces.
is redefined;
-- =================== To help Particular case ===============
IsConstant(me)
---Purpose: Say if the law is Constant.
returns Boolean
is redefined;
IsOnlyBy3dCurve(me)
---Purpose: Return True.
returns Boolean
is redefined;
fields
myPoint : Pnt from gp;
myTrihedrons : HSequenceOfAx2 from GeomFill;
myKnots : HSequenceOfReal from TColStd;
myFrenet : Frenet from GeomFill;
myUseFrenet : Boolean from Standard;
end DiscreteTrihedron;

View File

@@ -13,15 +13,19 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GeomFill_DiscreteTrihedron.ixx>
#include <Adaptor3d_HCurve.hxx>
#include <GeomAbs_CurveType.hxx>
#include <GeomFill_DiscreteTrihedron.hxx>
#include <GeomFill_Frenet.hxx>
#include <GeomAbs_CurveType.hxx>
#include <Adaptor3d_HCurve.hxx>
#include <GeomFill_HSequenceOfAx2.hxx>
#include <GeomFill_TrihedronLaw.hxx>
#include <gp_Vec.hxx>
#include <Standard_ConstructionError.hxx>
#include <Standard_OutOfRange.hxx>
#include <Standard_Type.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <TColStd_HSequenceOfReal.hxx>
#include <GeomFill_HSequenceOfAx2.hxx>
static const Standard_Real TolConf = Precision::Confusion();

View File

@@ -0,0 +1,127 @@
// Created on: 2013-02-05
// Created by: Julia GERASIMOVA
// Copyright (c) 2001-2013 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 _GeomFill_DiscreteTrihedron_HeaderFile
#define _GeomFill_DiscreteTrihedron_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <gp_Pnt.hxx>
#include <GeomFill_HSequenceOfAx2.hxx>
#include <TColStd_HSequenceOfReal.hxx>
#include <Standard_Boolean.hxx>
#include <GeomFill_TrihedronLaw.hxx>
#include <Standard_Real.hxx>
#include <Standard_Integer.hxx>
#include <GeomAbs_Shape.hxx>
#include <TColStd_Array1OfReal.hxx>
class GeomFill_Frenet;
class Standard_OutOfRange;
class Standard_ConstructionError;
class GeomFill_TrihedronLaw;
class Adaptor3d_HCurve;
class gp_Vec;
class GeomFill_DiscreteTrihedron;
DEFINE_STANDARD_HANDLE(GeomFill_DiscreteTrihedron, GeomFill_TrihedronLaw)
//! Defined Discrete Trihedron Law.
//! The requirement for path curve is only G1.
//! The result is C0-continuous surface
//! that can be later approximated to C1.
class GeomFill_DiscreteTrihedron : public GeomFill_TrihedronLaw
{
public:
Standard_EXPORT GeomFill_DiscreteTrihedron();
Standard_EXPORT virtual Handle(GeomFill_TrihedronLaw) Copy() const Standard_OVERRIDE;
Standard_EXPORT void Init();
Standard_EXPORT virtual void SetCurve (const Handle(Adaptor3d_HCurve)& C) Standard_OVERRIDE;
//! compute Trihedron on curve at parameter <Param>
Standard_EXPORT virtual Standard_Boolean D0 (const Standard_Real Param, gp_Vec& Tangent, gp_Vec& Normal, gp_Vec& BiNormal) Standard_OVERRIDE;
//! compute Trihedron and derivative Trihedron on curve
//! at parameter <Param>
//! Warning : It used only for C1 or C2 aproximation
//! For the moment it returns null values for DTangent, DNormal
//! and DBiNormal.
Standard_EXPORT virtual Standard_Boolean D1 (const Standard_Real Param, gp_Vec& Tangent, gp_Vec& DTangent, gp_Vec& Normal, gp_Vec& DNormal, gp_Vec& BiNormal, gp_Vec& DBiNormal) Standard_OVERRIDE;
//! compute Trihedron on curve
//! first and seconde derivatives.
//! Warning : It used only for C2 aproximation
//! For the moment it returns null values for DTangent, DNormal
//! DBiNormal, D2Tangent, D2Normal, D2BiNormal.
Standard_EXPORT virtual Standard_Boolean D2 (const Standard_Real Param, gp_Vec& Tangent, gp_Vec& DTangent, gp_Vec& D2Tangent, gp_Vec& Normal, gp_Vec& DNormal, gp_Vec& D2Normal, gp_Vec& BiNormal, gp_Vec& DBiNormal, gp_Vec& D2BiNormal) Standard_OVERRIDE;
//! Returns the number of intervals for continuity
//! <S>.
//! May be one if Continuity(me) >= <S>
Standard_EXPORT virtual Standard_Integer NbIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE;
//! Stores in <T> the parameters bounding the intervals
//! of continuity <S>.
//!
//! The array must provide enough room to accomodate
//! for the parameters. i.e. T.Length() > NbIntervals()
Standard_EXPORT virtual void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE;
//! Get average value of Tangent(t) and Normal(t) it is usful to
//! make fast approximation of rational surfaces.
Standard_EXPORT virtual void GetAverageLaw (gp_Vec& ATangent, gp_Vec& ANormal, gp_Vec& ABiNormal) Standard_OVERRIDE;
//! Say if the law is Constant.
Standard_EXPORT virtual Standard_Boolean IsConstant() const Standard_OVERRIDE;
//! Return True.
Standard_EXPORT virtual Standard_Boolean IsOnlyBy3dCurve() const Standard_OVERRIDE;
DEFINE_STANDARD_RTTI(GeomFill_DiscreteTrihedron,GeomFill_TrihedronLaw)
protected:
private:
gp_Pnt myPoint;
Handle(GeomFill_HSequenceOfAx2) myTrihedrons;
Handle(TColStd_HSequenceOfReal) myKnots;
Handle(GeomFill_Frenet) myFrenet;
Standard_Boolean myUseFrenet;
};
#endif // _GeomFill_DiscreteTrihedron_HeaderFile

View File

@@ -1,130 +0,0 @@
-- Created on: 1998-04-14
-- 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.
----------------------------------------------------
-- Triedre de Frenet pour une surface de depouille
----------------------------------------------------
class DraftTrihedron from GeomFill
inherits TrihedronLaw from GeomFill
uses
Shape from GeomAbs,
Array1OfReal from TColStd,
Vec from gp
raises
OutOfRange, ConstructionError
is
Create (BiNormal : Vec from gp;
Angle : Real )
returns DraftTrihedron from GeomFill;
SetAngle(me : mutable; Angle : Real)
is static;
Copy(me) returns TrihedronLaw from GeomFill
is redefined;
D0( me : mutable;
Param : Real;
Tangent : out Vec from gp;
Normal : out Vec from gp;
BiNormal : out Vec from gp)
returns Boolean is redefined;
---Purpose: compute Triedrhon and derivative Trihedron on curve at
-- parameter <Param>
-- Warning : It used only for C1 or C2 aproximation
D1( me : mutable;
Param: Real;
Tangent : out Vec from gp;
DTangent : out Vec from gp;
Normal : out Vec from gp;
DNormal : out Vec from gp;
BiNormal : out Vec from gp;
DBiNormal : out Vec from gp)
returns Boolean is redefined;
---Purpose: compute Trihedron on curve
-- first and seconde derivatives.
-- Warning : It used only for C2 aproximation
D2( me : mutable;
Param: Real;
Tangent : out Vec from gp;
DTangent : out Vec from gp;
D2Tangent : out Vec from gp;
Normal : out Vec from gp;
DNormal : out Vec from gp;
D2Normal : out Vec from gp;
BiNormal : out Vec from gp;
DBiNormal : out Vec from gp;
D2BiNormal : out Vec from gp)
returns Boolean is redefined;
--
-- =================== Management of continuity ===================
--
NbIntervals(me; S : Shape from GeomAbs)
---Purpose: Returns the number of intervals for continuity
-- <S>.
-- May be one if Continuity(me) >= <S>
returns Integer is redefined;
Intervals(me; T : in out Array1OfReal from TColStd;
S : Shape from GeomAbs)
---Purpose: Stores in <T> the parameters bounding the intervals
-- of continuity <S>.
--
-- The array must provide enough room to accomodate
-- for the parameters. i.e. T.Length() > NbIntervals()
raises
OutOfRange from Standard
is redefined;
-- ===================== To help computation of Tolerance ============
GetAverageLaw(me : mutable;
ATangent : out Vec from gp;
ANormal : out Vec from gp;
ABiNormal : out Vec from gp)
---Purpose: Get average value of Tangent(t) and Normal(t) it is usefull to
-- make fast approximation of rational surfaces.
is redefined;
-- =================== To help Particular case ===============
IsConstant(me)
---Purpose: Say if the law is Constant.
returns Boolean
is redefined;
IsOnlyBy3dCurve(me)
---Purpose: Return True.
returns Boolean
is redefined;
fields
B : Vec from gp;
myAngle : Real from Standard;
myCos : Real;
end DraftTrihedron;

View File

@@ -14,11 +14,16 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GeomFill_DraftTrihedron.ixx>
#include <Precision.hxx>
#include <GeomAbs_CurveType.hxx>
#include <Adaptor3d_HCurve.hxx>
#include <GeomAbs_CurveType.hxx>
#include <GeomFill_DraftTrihedron.hxx>
#include <GeomFill_TrihedronLaw.hxx>
#include <gp_Vec.hxx>
#include <Precision.hxx>
#include <Standard_ConstructionError.hxx>
#include <Standard_OutOfRange.hxx>
#include <Standard_Type.hxx>
//=======================================================================
//function : DDeriv

View File

@@ -0,0 +1,112 @@
// Created on: 1998-04-14
// 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 _GeomFill_DraftTrihedron_HeaderFile
#define _GeomFill_DraftTrihedron_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <gp_Vec.hxx>
#include <Standard_Real.hxx>
#include <GeomFill_TrihedronLaw.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Integer.hxx>
#include <GeomAbs_Shape.hxx>
#include <TColStd_Array1OfReal.hxx>
class Standard_OutOfRange;
class Standard_ConstructionError;
class gp_Vec;
class GeomFill_TrihedronLaw;
class GeomFill_DraftTrihedron;
DEFINE_STANDARD_HANDLE(GeomFill_DraftTrihedron, GeomFill_TrihedronLaw)
class GeomFill_DraftTrihedron : public GeomFill_TrihedronLaw
{
public:
Standard_EXPORT GeomFill_DraftTrihedron(const gp_Vec& BiNormal, const Standard_Real Angle);
Standard_EXPORT void SetAngle (const Standard_Real Angle);
Standard_EXPORT virtual Handle(GeomFill_TrihedronLaw) Copy() const Standard_OVERRIDE;
//! compute Triedrhon and derivative Trihedron on curve at
//! parameter <Param>
//! Warning : It used only for C1 or C2 aproximation
Standard_EXPORT virtual Standard_Boolean D0 (const Standard_Real Param, gp_Vec& Tangent, gp_Vec& Normal, gp_Vec& BiNormal) Standard_OVERRIDE;
//! compute Trihedron on curve
//! first and seconde derivatives.
//! Warning : It used only for C2 aproximation
Standard_EXPORT virtual Standard_Boolean D1 (const Standard_Real Param, gp_Vec& Tangent, gp_Vec& DTangent, gp_Vec& Normal, gp_Vec& DNormal, gp_Vec& BiNormal, gp_Vec& DBiNormal) Standard_OVERRIDE;
Standard_EXPORT virtual Standard_Boolean D2 (const Standard_Real Param, gp_Vec& Tangent, gp_Vec& DTangent, gp_Vec& D2Tangent, gp_Vec& Normal, gp_Vec& DNormal, gp_Vec& D2Normal, gp_Vec& BiNormal, gp_Vec& DBiNormal, gp_Vec& D2BiNormal) Standard_OVERRIDE;
//! Returns the number of intervals for continuity
//! <S>.
//! May be one if Continuity(me) >= <S>
Standard_EXPORT virtual Standard_Integer NbIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE;
//! Stores in <T> the parameters bounding the intervals
//! of continuity <S>.
//!
//! The array must provide enough room to accomodate
//! for the parameters. i.e. T.Length() > NbIntervals()
Standard_EXPORT virtual void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE;
//! Get average value of Tangent(t) and Normal(t) it is usefull to
//! make fast approximation of rational surfaces.
Standard_EXPORT virtual void GetAverageLaw (gp_Vec& ATangent, gp_Vec& ANormal, gp_Vec& ABiNormal) Standard_OVERRIDE;
//! Say if the law is Constant.
Standard_EXPORT virtual Standard_Boolean IsConstant() const Standard_OVERRIDE;
//! Return True.
Standard_EXPORT virtual Standard_Boolean IsOnlyBy3dCurve() const Standard_OVERRIDE;
DEFINE_STANDARD_RTTI(GeomFill_DraftTrihedron,GeomFill_TrihedronLaw)
protected:
private:
gp_Vec B;
Standard_Real myAngle;
Standard_Real myCos;
};
#endif // _GeomFill_DraftTrihedron_HeaderFile

View File

@@ -1,212 +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 EvolvedSection from GeomFill inherits SectionLaw from GeomFill
---Purpose: Define an Constant Section Law
uses
Curve from Geom,
BSplineSurface from Geom,
BSplineCurve from Geom,
Function from Law,
Shape from GeomAbs,
Pnt from gp,
Array1OfPnt from TColgp,
Array1OfVec from TColgp,
Array1OfInteger from TColStd,
Array1OfReal from TColStd
raises
OutOfRange
is
Create(C : Curve from Geom;
L : Function from Law)
---Purpose: Make an SectionLaw with a Curve and a real Law.
returns EvolvedSection from GeomFill;
--
--========== To compute Sections and derivatives Sections
--
D0(me : mutable;
Param: Real;
Poles : out Array1OfPnt from TColgp;
Weigths : out Array1OfReal from TColStd)
---Purpose: compute the section for v = param
returns Boolean is redefined;
D1(me : mutable;
Param: Real;
Poles : out Array1OfPnt from TColgp;
DPoles : out Array1OfVec from TColgp;
Weigths : out Array1OfReal from TColStd;
DWeigths : out Array1OfReal from TColStd)
---Purpose: compute the first derivative in v direction of the
-- section for v = param
-- Warning : It used only for C1 or C2 aproximation
returns Boolean
is redefined;
D2(me : mutable;
Param: Real;
Poles : out Array1OfPnt from TColgp;
DPoles : out Array1OfVec from TColgp;
D2Poles : out Array1OfVec from TColgp;
Weigths : out Array1OfReal from TColStd;
DWeigths : out Array1OfReal from TColStd;
D2Weigths : out Array1OfReal from TColStd)
---Purpose: compute the second derivative in v direction of the
-- section for v = param
-- Warning : It used only for C2 aproximation
returns Boolean
is redefined;
BSplineSurface(me)
---Purpose: give if possible an bspline Surface, like iso-v are the
-- section. If it is not possible this methode have to
-- get an Null Surface. Is it the default implementation.
returns BSplineSurface from Geom
is redefined;
SectionShape(me; NbPoles : out Integer from Standard;
NbKnots : out Integer from Standard;
Degree : out Integer from Standard)
---Purpose: get the format of an section
is redefined;
Knots(me; TKnots: out Array1OfReal from TColStd)
---Purpose: get the Knots of the section
is redefined;
Mults(me; TMults: out Array1OfInteger from TColStd)
---Purpose: get the Multplicities of the section
is redefined;
IsRational(me)
---Purpose: Returns if the sections are rationnal or not
returns Boolean is redefined;
IsUPeriodic(me)
---Purpose: Returns if the sections are periodic or not
returns Boolean is redefined;
IsVPeriodic(me)
---Purpose: Returns if the law isperiodic or not
returns Boolean is redefined;
--
-- =================== Management of continuity ===================
--
NbIntervals(me; S : Shape from GeomAbs)
---Purpose: Returns the number of intervals for continuity
-- <S>.
-- May be one if Continuity(me) >= <S>
returns Integer is redefined;
Intervals(me; T : in out Array1OfReal from TColStd;
S : Shape from GeomAbs)
---Purpose: Stores in <T> the parameters bounding the intervals
-- of continuity <S>.
--
-- The array must provide enough room to accomodate
-- for the parameters. i.e. T.Length() > NbIntervals()
raises
OutOfRange from Standard
is redefined;
SetInterval(me: mutable; First, Last: Real from Standard)
---Purpose: Sets the bounds of the parametric interval on
-- the function
-- This determines the derivatives in these values if the
-- function is not Cn.
is redefined;
GetInterval(me; First, Last: out Real from Standard)
---Purpose: Gets the bounds of the parametric interval on
-- the function
is redefined;
GetDomain(me; First, Last: out Real from Standard)
---Purpose: Gets the bounds of the function parametric domain.
-- Warning: This domain it is not modified by the
-- SetValue method
is redefined;
-- ===================== To help computation of Tolerance ======
-- Evaluation of error, in 2d space, or on rational function, is
-- difficult. The following methods can help the approximation to
-- make good evaluation and use good tolerances.
--
-- It is not necessary for the following informations to be very
-- precise. A fast evaluation is sufficient.
GetTolerance(me;
BoundTol, SurfTol, AngleTol : Real;
Tol3d : out Array1OfReal)
---Purpose: Returns the tolerances associated at each poles to
-- reach in approximation, to satisfy: BoundTol error
-- at the Boundary AngleTol tangent error at the
-- Boundary (in radian) SurfTol error inside the
-- surface.
is redefined;
BarycentreOfSurf(me)
---Purpose: Get the barycentre of Surface.
-- An very poor estimation is sufficent.
-- This information is usefull to perform well
-- conditioned rational approximation.
-- Warning: Used only if <me> IsRational
returns Pnt from gp
is redefined;
MaximalSection(me) returns Real
---Purpose: Returns the length of the greater section. This
-- information is usefull to G1's control.
-- Warning: With an little value, approximation can be slower.
is redefined;
GetMinimalWeight(me; Weigths : out Array1OfReal from TColStd)
---Purpose: Compute the minimal value of weight for each poles
-- in all sections.
-- This information is usefull to control error
-- in rational approximation.
-- Warning: Used only if <me> IsRational
is redefined;
IsConstant(me; Error : out Real)
---Purpose: return True If the Law isConstant
returns Boolean
is redefined;
ConstantSection(me)
---Purpose: Return the constant Section if <me> IsConstant.
--
returns Curve from Geom
is redefined;
fields
First, Last : Real;
mySection : Curve from Geom;
myLaw : Function from Law;
TLaw : Function from Law;
myCurve : BSplineCurve from Geom;
end EvolvedSection;

View File

@@ -14,25 +14,27 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <stdio.h>
#include <GeomFill_EvolvedSection.ixx>
#include <GeomConvert.hxx>
#include <Convert_ParameterisationType.hxx>
#include <GCPnts_AbscissaPoint.hxx>
#include <Geom_BSplineCurve.hxx>
#include <Geom_BSplineSurface.hxx>
#include <Geom_Curve.hxx>
#include <Geom_Geometry.hxx>
#include <Geom_Surface.hxx>
#include <Geom_BSplineSurface.hxx>
#include <GeomAdaptor_Curve.hxx>
#include <GCPnts_AbscissaPoint.hxx>
#include <TColgp_Array2OfPnt.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <TColStd_Array1OfInteger.hxx>
#include <GeomConvert.hxx>
#include <GeomFill_EvolvedSection.hxx>
#include <gp_Pnt.hxx>
#include <Law_Function.hxx>
#include <Precision.hxx>
#include <Standard_OutOfRange.hxx>
#include <Standard_Type.hxx>
#include <TColgp_Array2OfPnt.hxx>
#include <TColStd_Array1OfInteger.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <stdio.h>
#ifdef DRAW
#include <DrawTrSurf.hxx>
#include <Geom_Curve.hxx>

View File

@@ -0,0 +1,177 @@
// 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 _GeomFill_EvolvedSection_HeaderFile
#define _GeomFill_EvolvedSection_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Standard_Real.hxx>
#include <GeomFill_SectionLaw.hxx>
#include <Standard_Boolean.hxx>
#include <TColgp_Array1OfPnt.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <TColgp_Array1OfVec.hxx>
#include <Standard_Integer.hxx>
#include <TColStd_Array1OfInteger.hxx>
#include <GeomAbs_Shape.hxx>
class Geom_Curve;
class Law_Function;
class Geom_BSplineCurve;
class Standard_OutOfRange;
class Geom_BSplineSurface;
class gp_Pnt;
class GeomFill_EvolvedSection;
DEFINE_STANDARD_HANDLE(GeomFill_EvolvedSection, GeomFill_SectionLaw)
//! Define an Constant Section Law
class GeomFill_EvolvedSection : public GeomFill_SectionLaw
{
public:
//! Make an SectionLaw with a Curve and a real Law.
Standard_EXPORT GeomFill_EvolvedSection(const Handle(Geom_Curve)& C, const Handle(Law_Function)& L);
//! compute the section for v = param
Standard_EXPORT virtual Standard_Boolean D0 (const Standard_Real Param, TColgp_Array1OfPnt& Poles, TColStd_Array1OfReal& Weigths) Standard_OVERRIDE;
//! compute the first derivative in v direction of the
//! section for v = param
//! Warning : It used only for C1 or C2 aproximation
Standard_EXPORT virtual Standard_Boolean D1 (const Standard_Real Param, TColgp_Array1OfPnt& Poles, TColgp_Array1OfVec& DPoles, TColStd_Array1OfReal& Weigths, TColStd_Array1OfReal& DWeigths) Standard_OVERRIDE;
//! compute the second derivative in v direction of the
//! section for v = param
//! Warning : It used only for C2 aproximation
Standard_EXPORT virtual Standard_Boolean D2 (const Standard_Real Param, TColgp_Array1OfPnt& Poles, TColgp_Array1OfVec& DPoles, TColgp_Array1OfVec& D2Poles, TColStd_Array1OfReal& Weigths, TColStd_Array1OfReal& DWeigths, TColStd_Array1OfReal& D2Weigths) Standard_OVERRIDE;
//! give if possible an bspline Surface, like iso-v are the
//! section. If it is not possible this methode have to
//! get an Null Surface. Is it the default implementation.
Standard_EXPORT virtual Handle(Geom_BSplineSurface) BSplineSurface() const Standard_OVERRIDE;
//! get the format of an section
Standard_EXPORT virtual void SectionShape (Standard_Integer& NbPoles, Standard_Integer& NbKnots, Standard_Integer& Degree) const Standard_OVERRIDE;
//! get the Knots of the section
Standard_EXPORT virtual void Knots (TColStd_Array1OfReal& TKnots) const Standard_OVERRIDE;
//! get the Multplicities of the section
Standard_EXPORT virtual void Mults (TColStd_Array1OfInteger& TMults) const Standard_OVERRIDE;
//! Returns if the sections are rationnal or not
Standard_EXPORT virtual Standard_Boolean IsRational() const Standard_OVERRIDE;
//! Returns if the sections are periodic or not
Standard_EXPORT virtual Standard_Boolean IsUPeriodic() const Standard_OVERRIDE;
//! Returns if the law isperiodic or not
Standard_EXPORT virtual Standard_Boolean IsVPeriodic() const Standard_OVERRIDE;
//! Returns the number of intervals for continuity
//! <S>.
//! May be one if Continuity(me) >= <S>
Standard_EXPORT virtual Standard_Integer NbIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE;
//! Stores in <T> the parameters bounding the intervals
//! of continuity <S>.
//!
//! The array must provide enough room to accomodate
//! for the parameters. i.e. T.Length() > NbIntervals()
Standard_EXPORT virtual void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE;
//! Sets the bounds of the parametric interval on
//! the function
//! This determines the derivatives in these values if the
//! function is not Cn.
Standard_EXPORT virtual void SetInterval (const Standard_Real First, const Standard_Real Last) Standard_OVERRIDE;
//! Gets the bounds of the parametric interval on
//! the function
Standard_EXPORT virtual void GetInterval (Standard_Real& First, Standard_Real& Last) const Standard_OVERRIDE;
//! Gets the bounds of the function parametric domain.
//! Warning: This domain it is not modified by the
//! SetValue method
Standard_EXPORT virtual void GetDomain (Standard_Real& First, Standard_Real& Last) const Standard_OVERRIDE;
//! Returns the tolerances associated at each poles to
//! reach in approximation, to satisfy: BoundTol error
//! at the Boundary AngleTol tangent error at the
//! Boundary (in radian) SurfTol error inside the
//! surface.
Standard_EXPORT virtual void GetTolerance (const Standard_Real BoundTol, const Standard_Real SurfTol, const Standard_Real AngleTol, TColStd_Array1OfReal& Tol3d) const Standard_OVERRIDE;
//! Get the barycentre of Surface.
//! An very poor estimation is sufficent.
//! This information is usefull to perform well
//! conditioned rational approximation.
//! Warning: Used only if <me> IsRational
Standard_EXPORT virtual gp_Pnt BarycentreOfSurf() const Standard_OVERRIDE;
//! Returns the length of the greater section. This
//! information is usefull to G1's control.
//! Warning: With an little value, approximation can be slower.
Standard_EXPORT virtual Standard_Real MaximalSection() const Standard_OVERRIDE;
//! Compute the minimal value of weight for each poles
//! in all sections.
//! This information is usefull to control error
//! in rational approximation.
//! Warning: Used only if <me> IsRational
Standard_EXPORT virtual void GetMinimalWeight (TColStd_Array1OfReal& Weigths) const Standard_OVERRIDE;
//! return True If the Law isConstant
Standard_EXPORT virtual Standard_Boolean IsConstant (Standard_Real& Error) const Standard_OVERRIDE;
//! Return the constant Section if <me> IsConstant.
Standard_EXPORT virtual Handle(Geom_Curve) ConstantSection() const Standard_OVERRIDE;
DEFINE_STANDARD_RTTI(GeomFill_EvolvedSection,GeomFill_SectionLaw)
protected:
private:
Standard_Real First;
Standard_Real Last;
Handle(Geom_Curve) mySection;
Handle(Law_Function) myLaw;
Handle(Law_Function) TLaw;
Handle(Geom_BSplineCurve) myCurve;
};
#endif // _GeomFill_EvolvedSection_HeaderFile

View File

@@ -1,58 +0,0 @@
-- Created on: 1993-09-28
-- Created by: Bruno DUMORTIER
-- Copyright (c) 1993-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 GeomFill
---Purpose: Root class for Filling;
uses
Array1OfPnt from TColgp,
Array2OfPnt from TColgp,
HArray2OfPnt from TColgp,
Array1OfReal from TColStd,
Array2OfReal from TColStd,
HArray2OfReal from TColStd
raises
NoSuchObject from Standard
is
Create;
NbUPoles(me) returns Integer from Standard
is static;
NbVPoles(me) returns Integer from Standard
is static;
Poles(me; Poles : in out Array2OfPnt from TColgp)
is static;
isRational(me) returns Boolean from Standard
is static;
Weights(me; Weights : in out Array2OfReal from TColStd)
raises
NoSuchObject from Standard
is static;
fields
IsRational : Boolean from Standard is protected;
myPoles : HArray2OfPnt from TColgp is protected;
myWeights : HArray2OfReal from TColStd is protected;
end Filling;

View File

@@ -14,15 +14,15 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GeomFill_Filling.ixx>
#include <GeomFill_Filling.hxx>
#include <gp_Pnt.hxx>
#include <Standard_NoSuchObject.hxx>
//=======================================================================
//function : GeomFill_Filling
//purpose :
//=======================================================================
GeomFill_Filling::GeomFill_Filling()
{
}

View File

@@ -0,0 +1,79 @@
// Created on: 1993-09-28
// Created by: Bruno DUMORTIER
// Copyright (c) 1993-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 _GeomFill_Filling_HeaderFile
#define _GeomFill_Filling_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Boolean.hxx>
#include <TColgp_HArray2OfPnt.hxx>
#include <TColStd_HArray2OfReal.hxx>
#include <Standard_Integer.hxx>
#include <TColgp_Array2OfPnt.hxx>
#include <TColStd_Array2OfReal.hxx>
class Standard_NoSuchObject;
//! Root class for Filling;
class GeomFill_Filling
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT GeomFill_Filling();
Standard_EXPORT Standard_Integer NbUPoles() const;
Standard_EXPORT Standard_Integer NbVPoles() const;
Standard_EXPORT void Poles (TColgp_Array2OfPnt& Poles) const;
Standard_EXPORT Standard_Boolean isRational() const;
Standard_EXPORT void Weights (TColStd_Array2OfReal& Weights) const;
protected:
Standard_Boolean IsRational;
Handle(TColgp_HArray2OfPnt) myPoles;
Handle(TColStd_HArray2OfReal) myWeights;
private:
};
#endif // _GeomFill_Filling_HeaderFile

View File

@@ -0,0 +1,32 @@
// Created on: 1993-09-28
// Created by: Bruno DUMORTIER
// Copyright (c) 1993-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 _GeomFill_FillingStyle_HeaderFile
#define _GeomFill_FillingStyle_HeaderFile
//! Defines the three filling styles used in this package
//! - GeomFill_Stretch - the style with the flattest patches
//! - GeomFill_Coons - a rounded style of patch with
//! less depth than those of Curved
//! - GeomFill_Curved - the style with the most rounded patches.
enum GeomFill_FillingStyle
{
GeomFill_StretchStyle,
GeomFill_CoonsStyle,
GeomFill_CurvedStyle
};
#endif // _GeomFill_FillingStyle_HeaderFile

View File

@@ -1,120 +0,0 @@
-- Created on: 1997-12-09
-- 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 Fixed from GeomFill
inherits TrihedronLaw from GeomFill
---Purpose: Defined an constant TrihedronLaw
uses
Shape from GeomAbs,
Array1OfReal from TColStd,
Vec from gp
raises
OutOfRange, ConstructionError
is
Create(Tangent, Normal : Vec from gp)
returns Fixed from GeomFill
raises ConstructionError;
-- if <Tangent> and <Normal> are colinear
Copy(me)
returns TrihedronLaw from GeomFill
is redefined;
--
--
--========== To compute Location and derivatives Location
--
D0(me : mutable;
Param: Real;
Tangent : out Vec from gp;
Normal : out Vec from gp;
BiNormal : out Vec from gp)
---Purpose: compute Triedrhon on curve at parameter <Param>
returns Boolean is redefined;
D1(me : mutable;
Param: Real;
Tangent : out Vec from gp;
DTangent : out Vec from gp;
Normal : out Vec from gp;
DNormal : out Vec from gp;
BiNormal : out Vec from gp;
DBiNormal : out Vec from gp)
---Purpose: compute Triedrhon and derivative Trihedron on curve
-- at parameter <Param>
-- Warning : It used only for C1 or C2 aproximation
returns Boolean
is redefined;
D2(me : mutable;
Param: Real;
Tangent : out Vec from gp;
DTangent : out Vec from gp;
D2Tangent : out Vec from gp;
Normal : out Vec from gp;
DNormal : out Vec from gp;
D2Normal : out Vec from gp;
BiNormal : out Vec from gp;
DBiNormal : out Vec from gp;
D2BiNormal : out Vec from gp)
---Purpose: compute Trihedron on curve
-- first and seconde derivatives.
-- Warning : It used only for C2 aproximation
returns Boolean
is redefined;
--
-- =================== Management of continuity ===================
--
NbIntervals(me; S : Shape from GeomAbs)
---Purpose: Returns the number of intervals for continuity
-- <S>.
-- May be one if Continuity(me) >= <S>
returns Integer is redefined;
Intervals(me; T : in out Array1OfReal from TColStd;
S : Shape from GeomAbs)
---Purpose: Stores in <T> the parameters bounding the intervals
-- of continuity <S>.
--
-- The array must provide enough room to accomodate
-- for the parameters. i.e. T.Length() > NbIntervals()
raises
OutOfRange from Standard
is redefined;
-- ===================== To help computation of Tolerance ============
GetAverageLaw(me : mutable;
ATangent : out Vec from gp;
ANormal : out Vec from gp;
ABiNormal : out Vec from gp)
---Purpose: Get average value of Tangent(t) and Normal(t) it is usfull to
-- make fast approximation of rational surfaces.
is redefined;
-- =================== To help Particular case ===============
IsConstant(me)
---Purpose: Return True.
returns Boolean
is redefined;
fields
T, N, B : Vec from gp;
end Fixed;

View File

@@ -14,8 +14,14 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GeomFill_Fixed.ixx>
#include <GeomFill_Fixed.hxx>
#include <GeomFill_TrihedronLaw.hxx>
#include <gp_Vec.hxx>
#include <Precision.hxx>
#include <Standard_ConstructionError.hxx>
#include <Standard_OutOfRange.hxx>
#include <Standard_Type.hxx>
GeomFill_Fixed::GeomFill_Fixed(const gp_Vec& Tangent,
const gp_Vec& Normal)

View File

@@ -0,0 +1,108 @@
// Created on: 1997-12-09
// 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 _GeomFill_Fixed_HeaderFile
#define _GeomFill_Fixed_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <gp_Vec.hxx>
#include <GeomFill_TrihedronLaw.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Real.hxx>
#include <Standard_Integer.hxx>
#include <GeomAbs_Shape.hxx>
#include <TColStd_Array1OfReal.hxx>
class Standard_OutOfRange;
class Standard_ConstructionError;
class gp_Vec;
class GeomFill_TrihedronLaw;
class GeomFill_Fixed;
DEFINE_STANDARD_HANDLE(GeomFill_Fixed, GeomFill_TrihedronLaw)
//! Defined an constant TrihedronLaw
class GeomFill_Fixed : public GeomFill_TrihedronLaw
{
public:
Standard_EXPORT GeomFill_Fixed(const gp_Vec& Tangent, const gp_Vec& Normal);
Standard_EXPORT virtual Handle(GeomFill_TrihedronLaw) Copy() const Standard_OVERRIDE;
//! compute Triedrhon on curve at parameter <Param>
Standard_EXPORT virtual Standard_Boolean D0 (const Standard_Real Param, gp_Vec& Tangent, gp_Vec& Normal, gp_Vec& BiNormal) Standard_OVERRIDE;
//! compute Triedrhon and derivative Trihedron on curve
//! at parameter <Param>
//! Warning : It used only for C1 or C2 aproximation
Standard_EXPORT virtual Standard_Boolean D1 (const Standard_Real Param, gp_Vec& Tangent, gp_Vec& DTangent, gp_Vec& Normal, gp_Vec& DNormal, gp_Vec& BiNormal, gp_Vec& DBiNormal) Standard_OVERRIDE;
//! compute Trihedron on curve
//! first and seconde derivatives.
//! Warning : It used only for C2 aproximation
Standard_EXPORT virtual Standard_Boolean D2 (const Standard_Real Param, gp_Vec& Tangent, gp_Vec& DTangent, gp_Vec& D2Tangent, gp_Vec& Normal, gp_Vec& DNormal, gp_Vec& D2Normal, gp_Vec& BiNormal, gp_Vec& DBiNormal, gp_Vec& D2BiNormal) Standard_OVERRIDE;
//! Returns the number of intervals for continuity
//! <S>.
//! May be one if Continuity(me) >= <S>
Standard_EXPORT virtual Standard_Integer NbIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE;
//! Stores in <T> the parameters bounding the intervals
//! of continuity <S>.
//!
//! The array must provide enough room to accomodate
//! for the parameters. i.e. T.Length() > NbIntervals()
Standard_EXPORT virtual void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE;
//! Get average value of Tangent(t) and Normal(t) it is usfull to
//! make fast approximation of rational surfaces.
Standard_EXPORT virtual void GetAverageLaw (gp_Vec& ATangent, gp_Vec& ANormal, gp_Vec& ABiNormal) Standard_OVERRIDE;
//! Return True.
Standard_EXPORT virtual Standard_Boolean IsConstant() const Standard_OVERRIDE;
DEFINE_STANDARD_RTTI(GeomFill_Fixed,GeomFill_TrihedronLaw)
protected:
private:
gp_Vec T;
gp_Vec N;
gp_Vec B;
};
#endif // _GeomFill_Fixed_HeaderFile

View File

@@ -1,204 +0,0 @@
-- Created on: 1997-12-19
-- 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 Frenet from GeomFill
inherits TrihedronLaw from GeomFill
---Purpose: Defined Frenet Trihedron Law
uses
HCurve from Adaptor3d,
Shape from GeomAbs,
Array1OfReal from TColStd,
Pnt from gp,
Vec from gp,
HArray1OfReal from TColStd,
HArray1OfBoolean from TColStd
raises
OutOfRange, ConstructionError
is
Create
returns Frenet from GeomFill
raises ConstructionError;
Copy(me)
returns TrihedronLaw from GeomFill
is redefined;
Init(me: mutable)
is static;
SetCurve(me : mutable; C : HCurve from Adaptor3d)
is redefined;
--
--
--========== To compute Location and derivatives Location
--
D0(me : mutable;
Param: Real;
Tangent : out Vec from gp;
Normal : out Vec from gp;
BiNormal : out Vec from gp)
---Purpose: compute Triedrhon on curve at parameter <Param>
returns Boolean is redefined;
D1(me : mutable;
Param: Real;
Tangent : out Vec from gp;
DTangent : out Vec from gp;
Normal : out Vec from gp;
DNormal : out Vec from gp;
BiNormal : out Vec from gp;
DBiNormal : out Vec from gp)
---Purpose: compute Triedrhon and derivative Trihedron on curve
-- at parameter <Param>
-- Warning : It used only for C1 or C2 aproximation
returns Boolean
is redefined;
D2(me : mutable;
Param: Real;
Tangent : out Vec from gp;
DTangent : out Vec from gp;
D2Tangent : out Vec from gp;
Normal : out Vec from gp;
DNormal : out Vec from gp;
D2Normal : out Vec from gp;
BiNormal : out Vec from gp;
DBiNormal : out Vec from gp;
D2BiNormal : out Vec from gp)
---Purpose: compute Trihedron on curve
-- first and seconde derivatives.
-- Warning : It used only for C2 aproximation
returns Boolean
is redefined;
--
-- =================== Management of continuity ===================
--
NbIntervals(me; S : Shape from GeomAbs)
---Purpose: Returns the number of intervals for continuity
-- <S>.
-- May be one if Continuity(me) >= <S>
returns Integer is redefined;
Intervals(me; T : in out Array1OfReal from TColStd;
S : Shape from GeomAbs)
---Purpose: Stores in <T> the parameters bounding the intervals
-- of continuity <S>.
--
-- The array must provide enough room to accomodate
-- for the parameters. i.e. T.Length() > NbIntervals()
raises
OutOfRange from Standard
is redefined;
-- =================== To help computation of Tolerance ===============
GetAverageLaw(me : mutable;
ATangent : out Vec from gp;
ANormal : out Vec from gp;
ABiNormal : out Vec from gp)
---Purpose: Get average value of Tangent(t) and Normal(t) it is usfull to
-- make fast approximation of rational surfaces.
is redefined;
-- =================== To help Particular case ===============
IsConstant(me)
---Purpose: Say if the law is Constant.
returns Boolean
is redefined;
IsOnlyBy3dCurve(me)
---Purpose: Return True.
returns Boolean
is redefined;
IsSingular(me; U: Real; Index: out Integer)
returns Boolean
is private;
DoSingular(me: mutable; U: Real; Index: Integer;
Tangent, BiNormal: out Vec from gp;
n, k, TFlag, BNFlag: out Integer;
Delta: out Real)
returns Boolean
is private;
SingularD0(me : mutable;
Param: Real; Index: Integer;
Tangent : out Vec from gp;
Normal : out Vec from gp;
BiNormal : out Vec from gp;
Delta : out Real)
---Purpose: computes Triedrhon on curve at parameter <Param>
returns Boolean
is private;
SingularD1(me : mutable;
Param: Real; Index: Integer;
Tangent : out Vec from gp;
DTangent : out Vec from gp;
Normal : out Vec from gp;
DNormal : out Vec from gp;
BiNormal : out Vec from gp;
DBiNormal : out Vec from gp;
Delta : out Real)
---Purpose: computes Triedrhon and derivative Trihedron on curve
-- at parameter <Param>
-- Warning : It used only for C1 or C2 aproximation
returns Boolean
is private;
SingularD2(me : mutable;
Param: Real; Index: Integer;
Tangent : out Vec from gp;
DTangent : out Vec from gp;
D2Tangent : out Vec from gp;
Normal : out Vec from gp;
DNormal : out Vec from gp;
D2Normal : out Vec from gp;
BiNormal : out Vec from gp;
DBiNormal : out Vec from gp;
D2BiNormal : out Vec from gp;
Delta : out Real)
---Purpose: computes Trihedron on curve
-- first and seconde derivatives.
-- Warning : It used only for C2 aproximation
returns Boolean
is private;
RotateTrihedron(me;
Tangent : out Vec from gp;
Normal : out Vec from gp;
BiNormal : out Vec from gp;
NewTangent : in Vec from gp)
---Purpose: revolves the trihedron (which is determined
-- of given "Tangent", "Normal" and "BiNormal" vectors)
-- to coincide "Tangent" and "NewTangent" axes.
returns Boolean from Standard
is private;
fields
P : Pnt from gp;
mySngl : HArray1OfReal from TColStd;
mySnglLen : HArray1OfReal from TColStd;
isSngl : Boolean from Standard; -- True if there is some
-- singular points
end Frenet;

View File

@@ -14,18 +14,24 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GeomFill_Frenet.ixx>
#include <GeomAbs_CurveType.hxx>
#include <Adaptor3d_HCurve.hxx>
#include <Precision.hxx>
#include <GeomLib.hxx>
#include <GeomFill_SnglrFunc.hxx>
#include <Extrema_ExtPC.hxx>
#include <TColStd_HArray1OfBoolean.hxx>
#include <TColgp_SequenceOfPnt2d.hxx>
#include <NCollection_Array1.hxx>
#include <algorithm>
#include <Adaptor3d_HCurve.hxx>
#include <Extrema_ExtPC.hxx>
#include <GeomAbs_CurveType.hxx>
#include <GeomFill_Frenet.hxx>
#include <GeomFill_SnglrFunc.hxx>
#include <GeomFill_TrihedronLaw.hxx>
#include <GeomLib.hxx>
#include <gp_Vec.hxx>
#include <NCollection_Array1.hxx>
#include <Precision.hxx>
#include <Standard_ConstructionError.hxx>
#include <Standard_OutOfRange.hxx>
#include <Standard_Type.hxx>
#include <TColgp_SequenceOfPnt2d.hxx>
#include <TColStd_HArray1OfBoolean.hxx>
#include <algorithm>
static const Standard_Real NullTol = 1.e-10;
static const Standard_Real MaxSingular = 1.e-5;

View File

@@ -0,0 +1,140 @@
// Created on: 1997-12-19
// 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 _GeomFill_Frenet_HeaderFile
#define _GeomFill_Frenet_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <gp_Pnt.hxx>
#include <TColStd_HArray1OfReal.hxx>
#include <Standard_Boolean.hxx>
#include <GeomFill_TrihedronLaw.hxx>
#include <Standard_Real.hxx>
#include <Standard_Integer.hxx>
#include <GeomAbs_Shape.hxx>
#include <TColStd_Array1OfReal.hxx>
class Standard_OutOfRange;
class Standard_ConstructionError;
class GeomFill_TrihedronLaw;
class Adaptor3d_HCurve;
class gp_Vec;
class GeomFill_Frenet;
DEFINE_STANDARD_HANDLE(GeomFill_Frenet, GeomFill_TrihedronLaw)
//! Defined Frenet Trihedron Law
class GeomFill_Frenet : public GeomFill_TrihedronLaw
{
public:
Standard_EXPORT GeomFill_Frenet();
Standard_EXPORT virtual Handle(GeomFill_TrihedronLaw) Copy() const Standard_OVERRIDE;
Standard_EXPORT void Init();
Standard_EXPORT virtual void SetCurve (const Handle(Adaptor3d_HCurve)& C) Standard_OVERRIDE;
//! compute Triedrhon on curve at parameter <Param>
Standard_EXPORT virtual Standard_Boolean D0 (const Standard_Real Param, gp_Vec& Tangent, gp_Vec& Normal, gp_Vec& BiNormal) Standard_OVERRIDE;
//! compute Triedrhon and derivative Trihedron on curve
//! at parameter <Param>
//! Warning : It used only for C1 or C2 aproximation
Standard_EXPORT virtual Standard_Boolean D1 (const Standard_Real Param, gp_Vec& Tangent, gp_Vec& DTangent, gp_Vec& Normal, gp_Vec& DNormal, gp_Vec& BiNormal, gp_Vec& DBiNormal) Standard_OVERRIDE;
//! compute Trihedron on curve
//! first and seconde derivatives.
//! Warning : It used only for C2 aproximation
Standard_EXPORT virtual Standard_Boolean D2 (const Standard_Real Param, gp_Vec& Tangent, gp_Vec& DTangent, gp_Vec& D2Tangent, gp_Vec& Normal, gp_Vec& DNormal, gp_Vec& D2Normal, gp_Vec& BiNormal, gp_Vec& DBiNormal, gp_Vec& D2BiNormal) Standard_OVERRIDE;
//! Returns the number of intervals for continuity
//! <S>.
//! May be one if Continuity(me) >= <S>
Standard_EXPORT virtual Standard_Integer NbIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE;
//! Stores in <T> the parameters bounding the intervals
//! of continuity <S>.
//!
//! The array must provide enough room to accomodate
//! for the parameters. i.e. T.Length() > NbIntervals()
Standard_EXPORT virtual void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE;
//! Get average value of Tangent(t) and Normal(t) it is usfull to
//! make fast approximation of rational surfaces.
Standard_EXPORT virtual void GetAverageLaw (gp_Vec& ATangent, gp_Vec& ANormal, gp_Vec& ABiNormal) Standard_OVERRIDE;
//! Say if the law is Constant.
Standard_EXPORT virtual Standard_Boolean IsConstant() const Standard_OVERRIDE;
//! Return True.
Standard_EXPORT virtual Standard_Boolean IsOnlyBy3dCurve() const Standard_OVERRIDE;
DEFINE_STANDARD_RTTI(GeomFill_Frenet,GeomFill_TrihedronLaw)
protected:
private:
Standard_EXPORT Standard_Boolean IsSingular (const Standard_Real U, Standard_Integer& Index) const;
Standard_EXPORT Standard_Boolean DoSingular (const Standard_Real U, const Standard_Integer Index, gp_Vec& Tangent, gp_Vec& BiNormal, Standard_Integer& n, Standard_Integer& k, Standard_Integer& TFlag, Standard_Integer& BNFlag, Standard_Real& Delta);
//! computes Triedrhon on curve at parameter <Param>
Standard_EXPORT Standard_Boolean SingularD0 (const Standard_Real Param, const Standard_Integer Index, gp_Vec& Tangent, gp_Vec& Normal, gp_Vec& BiNormal, Standard_Real& Delta);
//! computes Triedrhon and derivative Trihedron on curve
//! at parameter <Param>
//! Warning : It used only for C1 or C2 aproximation
Standard_EXPORT Standard_Boolean SingularD1 (const Standard_Real Param, const Standard_Integer Index, gp_Vec& Tangent, gp_Vec& DTangent, gp_Vec& Normal, gp_Vec& DNormal, gp_Vec& BiNormal, gp_Vec& DBiNormal, Standard_Real& Delta);
//! computes Trihedron on curve
//! first and seconde derivatives.
//! Warning : It used only for C2 aproximation
Standard_EXPORT Standard_Boolean SingularD2 (const Standard_Real Param, const Standard_Integer Index, gp_Vec& Tangent, gp_Vec& DTangent, gp_Vec& D2Tangent, gp_Vec& Normal, gp_Vec& DNormal, gp_Vec& D2Normal, gp_Vec& BiNormal, gp_Vec& DBiNormal, gp_Vec& D2BiNormal, Standard_Real& Delta);
//! revolves the trihedron (which is determined
//! of given "Tangent", "Normal" and "BiNormal" vectors)
//! to coincide "Tangent" and "NewTangent" axes.
Standard_EXPORT Standard_Boolean RotateTrihedron (gp_Vec& Tangent, gp_Vec& Normal, gp_Vec& BiNormal, const gp_Vec& NewTangent) const;
gp_Pnt P;
Handle(TColStd_HArray1OfReal) mySngl;
Handle(TColStd_HArray1OfReal) mySnglLen;
Standard_Boolean isSngl;
};
#endif // _GeomFill_Frenet_HeaderFile

View File

@@ -1,119 +0,0 @@
-- Created on: 1998-04-27
-- 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.
private class FunctionDraft from GeomFill
inherits FunctionSetWithDerivatives from math
uses
Vector from math,
Matrix from math,
HSurface from Adaptor3d,
HCurve from Adaptor3d,
Vec from gp,
Tensor from GeomFill
is
Create(S : HSurface from Adaptor3d ; C : HCurve from Adaptor3d)
returns FunctionDraft from GeomFill ;
NbVariables(me)
---Purpose: returns the number of variables of the function.
returns Integer is redefined;
NbEquations(me)
---Purpose: returns the number of equations of the function.
returns Integer is redefined;
Value(me: in out; X: Vector; F: out Vector)
---Purpose: computes the values <F> of the Functions for the
-- variable <X>.
-- Returns True if the computation was done successfully,
-- False otherwise.
returns Boolean is redefined;
Derivatives(me: in out; X: Vector; D: out Matrix)
---Purpose: returns the values <D> of the derivatives for the
-- variable <X>.
-- Returns True if the computation was done successfully,
-- False otherwise.
returns Boolean is redefined;
Values(me: in out; X: Vector; F: out Vector; D: out Matrix)
---Purpose: returns the values <F> of the functions and the derivatives
-- <D> for the variable <X>.
-- Returns True if the computation was done successfully,
-- False otherwise.
returns Boolean is redefined;
DerivT(me: in out;
C : HCurve from Adaptor3d;
Param : Real from Standard;
W : Real from Standard;
dN : Vec from gp;
teta : Real;
F: out Vector)
---Purpose: returns the values <F> of the T derivatives for
-- the parameter Param .
returns Boolean is static;
Deriv2T(me: in out;
C : HCurve from Adaptor3d;
Param : Real from Standard;
W : Real from Standard;
d2N : Vec from gp;
teta : Real;
F: out Vector)
---Purpose: returns the values <F> of the T2 derivatives for
-- the parameter Param .
returns Boolean is static;
DerivTX(me: in out;
dN : Vec from gp;
teta : Real;
D: out Matrix)
---Purpose: returns the values <D> of the TX derivatives for
-- the parameter Param .
returns Boolean is static;
Deriv2X(me: in out;
X : Vector from math;
T: out Tensor)
---Purpose: returns the values <T> of the X2 derivatives for
-- the parameter Param .
returns Boolean is static;
fields
TheCurve : HCurve from Adaptor3d;
TheSurface : HSurface from Adaptor3d;
end FunctionDraft;

View File

@@ -14,21 +14,24 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GeomFill_FunctionDraft.ixx>
#include <GeomAdaptor_HSurface.hxx>
#include <Adaptor3d_HCurve.hxx>
#include <Adaptor3d_HSurface.hxx>
#include <GeomAdaptor_HCurve.hxx>
//#include <Precision.hxx>
#include <GeomAdaptor_HSurface.hxx>
#include <GeomFill_FunctionDraft.hxx>
#include <GeomFill_Tensor.hxx>
#include <gp_Pnt.hxx>
#include <gp_Vec.hxx>
#include <math_Matrix.hxx>
//#include <Precision.hxx>
//*******************************************************
// Calcul de la valeur de la fonction :
// G(w(t)) - S(u(t),v(t)) = 0
// ou G = generatrice et S = surface d'arret
// et de ses derivees
//*******************************************************
//*******************************************************
// Function : FunctionDraft
// Purpose : Initialisation de la section et de la surface d'arret

View File

@@ -0,0 +1,111 @@
// Created on: 1998-04-27
// 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 _GeomFill_FunctionDraft_HeaderFile
#define _GeomFill_FunctionDraft_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <math_FunctionSetWithDerivatives.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Boolean.hxx>
#include <math_Vector.hxx>
#include <Standard_Real.hxx>
class Adaptor3d_HCurve;
class Adaptor3d_HSurface;
class math_Matrix;
class gp_Vec;
class GeomFill_Tensor;
class GeomFill_FunctionDraft : public math_FunctionSetWithDerivatives
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT GeomFill_FunctionDraft(const Handle(Adaptor3d_HSurface)& S, const Handle(Adaptor3d_HCurve)& C);
//! returns the number of variables of the function.
Standard_EXPORT virtual Standard_Integer NbVariables() const Standard_OVERRIDE;
//! returns the number of equations of the function.
Standard_EXPORT virtual Standard_Integer NbEquations() const Standard_OVERRIDE;
//! computes the values <F> of the Functions for the
//! variable <X>.
//! Returns True if the computation was done successfully,
//! False otherwise.
Standard_EXPORT virtual Standard_Boolean Value (const math_Vector& X, math_Vector& F) Standard_OVERRIDE;
//! returns the values <D> of the derivatives for the
//! variable <X>.
//! Returns True if the computation was done successfully,
//! False otherwise.
Standard_EXPORT virtual Standard_Boolean Derivatives (const math_Vector& X, math_Matrix& D) Standard_OVERRIDE;
//! returns the values <F> of the functions and the derivatives
//! <D> for the variable <X>.
//! Returns True if the computation was done successfully,
//! False otherwise.
Standard_EXPORT virtual Standard_Boolean Values (const math_Vector& X, math_Vector& F, math_Matrix& D) Standard_OVERRIDE;
//! returns the values <F> of the T derivatives for
//! the parameter Param .
Standard_EXPORT Standard_Boolean DerivT (const Handle(Adaptor3d_HCurve)& C, const Standard_Real Param, const Standard_Real W, const gp_Vec& dN, const Standard_Real teta, math_Vector& F);
//! returns the values <F> of the T2 derivatives for
//! the parameter Param .
Standard_EXPORT Standard_Boolean Deriv2T (const Handle(Adaptor3d_HCurve)& C, const Standard_Real Param, const Standard_Real W, const gp_Vec& d2N, const Standard_Real teta, math_Vector& F);
//! returns the values <D> of the TX derivatives for
//! the parameter Param .
Standard_EXPORT Standard_Boolean DerivTX (const gp_Vec& dN, const Standard_Real teta, math_Matrix& D);
//! returns the values <T> of the X2 derivatives for
//! the parameter Param .
Standard_EXPORT Standard_Boolean Deriv2X (const math_Vector& X, GeomFill_Tensor& T);
protected:
private:
Handle(Adaptor3d_HCurve) TheCurve;
Handle(Adaptor3d_HSurface) TheSurface;
};
#endif // _GeomFill_FunctionDraft_HeaderFile

View File

@@ -1,141 +0,0 @@
-- Created on: 1998-07-09
-- 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.
private class FunctionGuide from GeomFill
inherits FunctionSetWithDerivatives from math
uses
Vector from math,
Matrix from math,
Surface from Geom,
Curve from Geom,
HCurve from Adaptor3d,
Vec from gp,
XYZ from gp,
Pnt from gp,
SectionLaw from GeomFill
is
Create(S : SectionLaw from GeomFill;
Guide : HCurve from Adaptor3d;
ParamOnLaw : Real = 0.0)
returns FunctionGuide from GeomFill ;
SetParam(me : in out;
Param : Real;
Centre : Pnt from gp;
Dir : XYZ from gp;
XDir : XYZ from gp)
is static;
NbVariables(me)
---Purpose: returns the number of variables of the function.
returns Integer is redefined;
NbEquations(me)
---Purpose: returns the number of equations of the function.
returns Integer is redefined;
Value(me: in out; X: Vector; F: out Vector)
---Purpose: computes the values <F> of the Functions for the
-- variable <X>.
-- Returns True if the computation was done successfully,
-- False otherwise.
returns Boolean is redefined;
Derivatives(me: in out; X: Vector; D: out Matrix)
---Purpose: returns the values <D> of the derivatives for the
-- variable <X>.
-- Returns True if the computation was done successfully,
-- False otherwise.
returns Boolean is redefined;
Values(me: in out; X: Vector; F: out Vector; D: out Matrix)
---Purpose: returns the values <F> of the functions and the derivatives
-- <D> for the variable <X>.
-- Returns True if the computation was done successfully,
-- False otherwise.
returns Boolean is redefined;
DerivT(me : in out;
X : Vector from math;
DCentre: XYZ from gp;
DDir : XYZ from gp;
DFDT : out Vector)
---Purpose: returns the values <F> of the T derivatives for
-- the parameter Param .
returns Boolean is static;
DSDT(me;
U, V : Real;
DCentre: XYZ from gp;
DDir : XYZ from gp;
DSDT : out Vec from gp)
is private;
Deriv2T(me: in out;
DCentre: XYZ from gp;
DDir : XYZ from gp;
DFDT, D2FT : out Vector)
---Purpose: returns the values <F> of the T2 derivatives for
-- the parameter Param .
returns Boolean is static;
-- DerivTX(me: in out;
-- Param : Real from Standard;
-- Param0 : Real from Standard;
-- R : Vector from math;
-- X0 : Vector from math;
-- D: out Matrix)
---Purpose: returns the values <D> of the TX derivatives for
-- the parameter Param .
-- returns Boolean is static;
-- Deriv2X(me: in out;
-- X : Vector from math;
-- T: out Tensor)
---Purpose: returns the values <T> of the X2 derivatives for
-- the parameter Param .
-- returns Boolean is static;
fields
TheGuide : HCurve from Adaptor3d;
TheLaw : SectionLaw from GeomFill;
isconst : Boolean;
TheCurve : Curve from Geom;
TheConst : Curve from Geom;
TheSurface: Surface from Geom;
First,Last: Real;
TheUonS : Real;
Centre : XYZ;
Dir : XYZ;
end FunctionGuide;

View File

@@ -14,41 +14,36 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GeomFill_FunctionGuide.ixx>
#include <GeomFill_SectionLaw.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <Adaptor3d_HCurve.hxx>
#include <Geom_BSplineCurve.hxx>
#include <Geom_Curve.hxx>
#include <Geom_Surface.hxx>
#include <Geom_SurfaceOfRevolution.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <GeomAdaptor_HCurve.hxx>
#include <GeomFill_FunctionGuide.hxx>
#include <GeomFill_SectionLaw.hxx>
#include <GeomTools.hxx>
#include <Precision.hxx>
#include <gp_Pnt.hxx>
#include <gp_Vec.hxx>
#include <gp_XYZ.hxx>
#include <gp_Dir.hxx>
#include <gp_Trsf.hxx>
#include <gp_Ax1.hxx>
#include <gp_Ax3.hxx>
#include <gp_Dir.hxx>
#include <gp_Pnt.hxx>
#include <gp_Trsf.hxx>
#include <gp_Vec.hxx>
#include <gp_XYZ.hxx>
#include <math_Matrix.hxx>
#include <Precision.hxx>
#include <TColgp_HArray1OfPnt.hxx>
#include <TColStd_HArray1OfInteger.hxx>
#include <TColStd_HArray1OfReal.hxx>
#include <TColgp_HArray1OfPnt.hxx>
#include <Geom_Curve.hxx>
//#include <Standard_NotImplemented.hxx>
//==============================================
// Calcul de la valeur de la fonction :
// G(w) - S(teta,v) = 0
// ou G : guide et S : surface de revolution
//==============================================
//==============================================
// Function : FunctionGuide
// Purpose : Initialisation de la section et de la surface d'arret

View File

@@ -0,0 +1,126 @@
// Created on: 1998-07-09
// 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 _GeomFill_FunctionGuide_HeaderFile
#define _GeomFill_FunctionGuide_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Real.hxx>
#include <gp_XYZ.hxx>
#include <math_FunctionSetWithDerivatives.hxx>
#include <Standard_Integer.hxx>
#include <math_Vector.hxx>
class Adaptor3d_HCurve;
class GeomFill_SectionLaw;
class Geom_Curve;
class Geom_Surface;
class gp_Pnt;
class gp_XYZ;
class math_Matrix;
class gp_Vec;
class GeomFill_FunctionGuide : public math_FunctionSetWithDerivatives
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT GeomFill_FunctionGuide(const Handle(GeomFill_SectionLaw)& S, const Handle(Adaptor3d_HCurve)& Guide, const Standard_Real ParamOnLaw = 0.0);
Standard_EXPORT void SetParam (const Standard_Real Param, const gp_Pnt& Centre, const gp_XYZ& Dir, const gp_XYZ& XDir);
//! returns the number of variables of the function.
Standard_EXPORT virtual Standard_Integer NbVariables() const Standard_OVERRIDE;
//! returns the number of equations of the function.
Standard_EXPORT virtual Standard_Integer NbEquations() const Standard_OVERRIDE;
//! computes the values <F> of the Functions for the
//! variable <X>.
//! Returns True if the computation was done successfully,
//! False otherwise.
Standard_EXPORT virtual Standard_Boolean Value (const math_Vector& X, math_Vector& F) Standard_OVERRIDE;
//! returns the values <D> of the derivatives for the
//! variable <X>.
//! Returns True if the computation was done successfully,
//! False otherwise.
Standard_EXPORT virtual Standard_Boolean Derivatives (const math_Vector& X, math_Matrix& D) Standard_OVERRIDE;
//! returns the values <F> of the functions and the derivatives
//! <D> for the variable <X>.
//! Returns True if the computation was done successfully,
//! False otherwise.
Standard_EXPORT virtual Standard_Boolean Values (const math_Vector& X, math_Vector& F, math_Matrix& D) Standard_OVERRIDE;
//! returns the values <F> of the T derivatives for
//! the parameter Param .
Standard_EXPORT Standard_Boolean DerivT (const math_Vector& X, const gp_XYZ& DCentre, const gp_XYZ& DDir, math_Vector& DFDT);
//! returns the values <F> of the T2 derivatives for
//! the parameter Param .
//! returns the values <D> of the TX derivatives for
//! the parameter Param .
//! returns Boolean is static;
//! returns the values <T> of the X2 derivatives for
//! the parameter Param .
//! returns Boolean is static;
Standard_EXPORT Standard_Boolean Deriv2T (const gp_XYZ& DCentre, const gp_XYZ& DDir, math_Vector& DFDT, math_Vector& D2FT);
protected:
private:
Standard_EXPORT void DSDT (const Standard_Real U, const Standard_Real V, const gp_XYZ& DCentre, const gp_XYZ& DDir, gp_Vec& DSDT) const;
Handle(Adaptor3d_HCurve) TheGuide;
Handle(GeomFill_SectionLaw) TheLaw;
Standard_Boolean isconst;
Handle(Geom_Curve) TheCurve;
Handle(Geom_Curve) TheConst;
Handle(Geom_Surface) TheSurface;
Standard_Real First;
Standard_Real Last;
Standard_Real TheUonS;
gp_XYZ Centre;
gp_XYZ Dir;
};
#endif // _GeomFill_FunctionGuide_HeaderFile

View File

@@ -1,55 +0,0 @@
-- Created on: 1994-02-17
-- 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 Generator from GeomFill inherits Profiler from GeomFill
---Purpose: Create a surface using generating lines. Inherits
-- profiler. The surface will be a BSplineSurface
-- passing by all the curves described in the
-- generator. The VDegree of the resulting surface is
-- 1.
uses
Surface from Geom
raises
NotDone from StdFail,
DomainError from Standard
is
Create returns Generator from GeomFill;
Perform(me : in out ;
PTol : in Real from Standard)
---Purpose: Converts all curves to BSplineCurves.
-- Set them to the common profile.
-- Compute the surface (degv = 1).
-- <PTol> is used to compare 2 knots.
is redefined;
Surface(me)
returns Surface from Geom
---C++: return const&
---C++: inline
is static;
fields
mySurface : Surface from Geom;
end Generator;

View File

@@ -14,22 +14,23 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GeomFill_Generator.ixx>
#include <TColgp_Array1OfPnt.hxx>
#include <TColgp_Array2OfPnt.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <TColStd_Array2OfReal.hxx>
#include <TColStd_Array1OfInteger.hxx>
#include <Geom_BSplineCurve.hxx>
#include <Geom_BSplineSurface.hxx>
#include <Geom_Surface.hxx>
#include <GeomFill_Generator.hxx>
#include <Standard_DomainError.hxx>
#include <StdFail_NotDone.hxx>
#include <TColgp_Array1OfPnt.hxx>
#include <TColgp_Array2OfPnt.hxx>
#include <TColStd_Array1OfInteger.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <TColStd_Array2OfReal.hxx>
//=======================================================================
//function : GeomFill_Generator
//purpose :
//=======================================================================
GeomFill_Generator::GeomFill_Generator()
{
}

View File

@@ -0,0 +1,78 @@
// Created on: 1994-02-17
// 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 _GeomFill_Generator_HeaderFile
#define _GeomFill_Generator_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <GeomFill_Profiler.hxx>
#include <Standard_Real.hxx>
class Geom_Surface;
class StdFail_NotDone;
class Standard_DomainError;
//! Create a surface using generating lines. Inherits
//! profiler. The surface will be a BSplineSurface
//! passing by all the curves described in the
//! generator. The VDegree of the resulting surface is
//! 1.
class GeomFill_Generator : public GeomFill_Profiler
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT GeomFill_Generator();
//! Converts all curves to BSplineCurves.
//! Set them to the common profile.
//! Compute the surface (degv = 1).
//! <PTol> is used to compare 2 knots.
Standard_EXPORT virtual void Perform (const Standard_Real PTol) Standard_OVERRIDE;
const Handle(Geom_Surface)& Surface() const;
protected:
private:
Handle(Geom_Surface) mySurface;
};
#include <GeomFill_Generator.lxx>
#endif // _GeomFill_Generator_HeaderFile

View File

@@ -1,149 +0,0 @@
-- Created on: 1998-06-23
-- 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 GuideTrihedronAC from GeomFill
inherits TrihedronWithGuide from GeomFill
---Purpose: Trihedron in the case of a sweeping along a guide curve.
-- defined by curviline absciss
uses
Shape from GeomAbs,
Array1OfReal from TColStd,
Vec from gp,
Curve from Geom,
HCurve from Adaptor3d,
TrihedronLaw from GeomFill,
CurvlinFunc from Approx
raises
OutOfRange, ConstructionError
is
Create(guide : HCurve from Adaptor3d)
returns GuideTrihedronAC from GeomFill;
SetCurve(me:mutable; C : HCurve from Adaptor3d)
is redefined;
Copy(me) returns TrihedronLaw from GeomFill
is redefined;
Guide(me)
returns HCurve from Adaptor3d
is redefined;
D0( me : mutable;
Param : Real;
Tangent : out Vec from gp;
Normal : out Vec from gp;
BiNormal : out Vec from gp)
returns Boolean is redefined;
D1( me : mutable;
Param : Real;
Tangent : out Vec from gp;
DTangent : out Vec from gp;
Normal : out Vec from gp;
DNormal : out Vec from gp;
BiNormal : out Vec from gp;
DBiNormal : out Vec from gp)
returns Boolean is redefined;
D2( me : mutable;
Param : Real;
Tangent : out Vec from gp;
DTangent : out Vec from gp;
D2Tangent : out Vec from gp;
Normal : out Vec from gp;
DNormal : out Vec from gp;
D2Normal : out Vec from gp;
BiNormal : out Vec from gp;
DBiNormal : out Vec from gp;
D2BiNormal : out Vec from gp)
returns Boolean is redefined;
--
-- =================== Management of continuity ===================
--
NbIntervals(me; S : Shape from GeomAbs)
---Purpose: Returns the number of intervals for continuity
-- <S>.
-- May be one if Continuity(me) >= <S>
returns Integer is redefined;
Intervals(me; T : in out Array1OfReal from TColStd;
S : Shape from GeomAbs)
---Purpose: Stores in <T> the parameters bounding the intervals
-- of continuity <S>.
--
-- The array must provide enough room to accomodate
-- for the parameters. i.e. T.Length() > NbIntervals()
raises
OutOfRange from Standard
is redefined;
SetInterval(me: mutable; First, Last: Real from Standard)
---Purpose: Sets the bounds of the parametric interval on
-- the function
-- This determines the derivatives in these values if the
-- function is not Cn.
is redefined;
-- =================== To help computation of Tolerance ===============
GetAverageLaw(me : mutable;
ATangent : out Vec from gp;
ANormal : out Vec from gp;
ABiNormal : out Vec from gp)
---Purpose: Get average value of M(t) and V(t) it is usfull to
-- make fast approximation of rational surfaces.
is redefined;
-- =================== To help Particular case ===============
IsConstant(me)
---Purpose: Say if the law is Constant
-- Return False by Default.
returns Boolean
is redefined;
IsOnlyBy3dCurve(me)
---Purpose: Say if the law is defined, only by the 3d Geometry of
-- the setted Curve
-- Return False by Default.
returns Boolean
is redefined;
Origine(me : mutable;
OrACR1 : Real;
OrACR2 : Real)
is redefined;
fields
myGuideAC : CurvlinFunc from Approx;
Lguide : Real from Standard;
myCurveAC : CurvlinFunc from Approx;
L : Real from Standard;
myCurve : HCurve from Adaptor3d;
UTol, STol : Real;
Orig1 : Real from Standard;
Orig2 : Real from Standard;
end GuideTrihedronAC;

View File

@@ -15,23 +15,23 @@
// Creted: Tue Jun 23 15:39:24 1998
#include <GeomFill_GuideTrihedronAC.ixx>
#include <gp_Pnt.hxx>
#include <gp_Dir.hxx>
#include <gp_Vec.hxx>
#include <Precision.hxx>
#include <TColStd_SequenceOfReal.hxx>
#include <Approx_CurvlinFunc.hxx>
#include <Adaptor3d_Curve.hxx>
#include <Adaptor3d_HCurve.hxx>
#include <Approx_CurvlinFunc.hxx>
#include <GeomAdaptor.hxx>
#include <GeomAdaptor_HCurve.hxx>
#include <GeomFill_Frenet.hxx>
#include <GeomFill_GuideTrihedronAC.hxx>
#include <GeomFill_TrihedronLaw.hxx>
#include <GeomLib.hxx>
#include <gp_Dir.hxx>
#include <gp_Pnt.hxx>
#include <gp_Vec.hxx>
#include <Precision.hxx>
#include <Standard_ConstructionError.hxx>
#include <Standard_OutOfRange.hxx>
#include <Standard_Type.hxx>
#include <TColStd_SequenceOfReal.hxx>
//=======================================================================
//function : GuideTrihedron

View File

@@ -0,0 +1,126 @@
// Created on: 1998-06-23
// 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 _GeomFill_GuideTrihedronAC_HeaderFile
#define _GeomFill_GuideTrihedronAC_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Standard_Real.hxx>
#include <GeomFill_TrihedronWithGuide.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Integer.hxx>
#include <GeomAbs_Shape.hxx>
#include <TColStd_Array1OfReal.hxx>
class Approx_CurvlinFunc;
class Adaptor3d_HCurve;
class Standard_OutOfRange;
class Standard_ConstructionError;
class GeomFill_TrihedronLaw;
class gp_Vec;
class GeomFill_GuideTrihedronAC;
DEFINE_STANDARD_HANDLE(GeomFill_GuideTrihedronAC, GeomFill_TrihedronWithGuide)
//! Trihedron in the case of a sweeping along a guide curve.
//! defined by curviline absciss
class GeomFill_GuideTrihedronAC : public GeomFill_TrihedronWithGuide
{
public:
Standard_EXPORT GeomFill_GuideTrihedronAC(const Handle(Adaptor3d_HCurve)& guide);
Standard_EXPORT virtual void SetCurve (const Handle(Adaptor3d_HCurve)& C) Standard_OVERRIDE;
Standard_EXPORT virtual Handle(GeomFill_TrihedronLaw) Copy() const Standard_OVERRIDE;
Standard_EXPORT virtual Handle(Adaptor3d_HCurve) Guide() const Standard_OVERRIDE;
Standard_EXPORT virtual Standard_Boolean D0 (const Standard_Real Param, gp_Vec& Tangent, gp_Vec& Normal, gp_Vec& BiNormal) Standard_OVERRIDE;
Standard_EXPORT virtual Standard_Boolean D1 (const Standard_Real Param, gp_Vec& Tangent, gp_Vec& DTangent, gp_Vec& Normal, gp_Vec& DNormal, gp_Vec& BiNormal, gp_Vec& DBiNormal) Standard_OVERRIDE;
Standard_EXPORT virtual Standard_Boolean D2 (const Standard_Real Param, gp_Vec& Tangent, gp_Vec& DTangent, gp_Vec& D2Tangent, gp_Vec& Normal, gp_Vec& DNormal, gp_Vec& D2Normal, gp_Vec& BiNormal, gp_Vec& DBiNormal, gp_Vec& D2BiNormal) Standard_OVERRIDE;
//! Returns the number of intervals for continuity
//! <S>.
//! May be one if Continuity(me) >= <S>
Standard_EXPORT virtual Standard_Integer NbIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE;
//! Stores in <T> the parameters bounding the intervals
//! of continuity <S>.
//!
//! The array must provide enough room to accomodate
//! for the parameters. i.e. T.Length() > NbIntervals()
Standard_EXPORT virtual void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE;
//! Sets the bounds of the parametric interval on
//! the function
//! This determines the derivatives in these values if the
//! function is not Cn.
Standard_EXPORT virtual void SetInterval (const Standard_Real First, const Standard_Real Last) Standard_OVERRIDE;
//! Get average value of M(t) and V(t) it is usfull to
//! make fast approximation of rational surfaces.
Standard_EXPORT virtual void GetAverageLaw (gp_Vec& ATangent, gp_Vec& ANormal, gp_Vec& ABiNormal) Standard_OVERRIDE;
//! Say if the law is Constant
Standard_EXPORT virtual Standard_Boolean IsConstant() const Standard_OVERRIDE;
//! Say if the law is defined, only by the 3d Geometry of
//! the setted Curve
//! Return False by Default.
Standard_EXPORT virtual Standard_Boolean IsOnlyBy3dCurve() const Standard_OVERRIDE;
Standard_EXPORT virtual void Origine (const Standard_Real OrACR1, const Standard_Real OrACR2) Standard_OVERRIDE;
DEFINE_STANDARD_RTTI(GeomFill_GuideTrihedronAC,GeomFill_TrihedronWithGuide)
protected:
private:
Handle(Approx_CurvlinFunc) myGuideAC;
Standard_Real Lguide;
Handle(Approx_CurvlinFunc) myCurveAC;
Standard_Real L;
Handle(Adaptor3d_HCurve) myCurve;
Standard_Real UTol;
Standard_Real STol;
Standard_Real Orig1;
Standard_Real Orig2;
};
#endif // _GeomFill_GuideTrihedronAC_HeaderFile

View File

@@ -1,168 +0,0 @@
-- Created on: 1998-06-23
-- 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 GuideTrihedronPlan from GeomFill
---Purpose: Trihedron in the case of sweeping along a guide curve defined
-- by the orthogonal plan on the trajectory
inherits TrihedronWithGuide from GeomFill
uses
Shape from GeomAbs,
Array1OfReal from TColStd,
HArray2OfPnt2d from TColgp,
Vec from gp,
Curve from Geom,
HCurve from Adaptor3d,
TrihedronLaw from GeomFill,
Frenet from GeomFill,
PipeError from GeomFill,
Vector from math
raises
OutOfRange, ConstructionError
is
Create (theGuide : HCurve from Adaptor3d)
returns GuideTrihedronPlan from GeomFill;
Init (me : mutable)
is static private;
SetCurve(me:mutable;
thePath : HCurve from Adaptor3d)
is redefined;
Copy(me) returns TrihedronLaw from GeomFill
is redefined;
ErrorStatus(me)
---Purpose:Give a status to the Law
-- Returns PipeOk (default implementation)
returns PipeError from GeomFill
is redefined;
Guide(me)
returns HCurve from Adaptor3d
is redefined;
D0( me : mutable;
Param : Real;
Tangent : out Vec from gp;
Normal : out Vec from gp;
BiNormal : out Vec from gp)
returns Boolean is redefined;
D1( me : mutable;
Param : Real;
Tangent : out Vec from gp;
DTangent : out Vec from gp;
Normal : out Vec from gp;
DNormal : out Vec from gp;
BiNormal : out Vec from gp;
DBiNormal : out Vec from gp)
returns Boolean is redefined;
D2( me : mutable;
Param : Real;
Tangent : out Vec from gp;
DTangent : out Vec from gp;
D2Tangent : out Vec from gp;
Normal : out Vec from gp;
DNormal : out Vec from gp;
D2Normal : out Vec from gp;
BiNormal : out Vec from gp;
DBiNormal : out Vec from gp;
D2BiNormal : out Vec from gp)
returns Boolean is redefined;
--
-- =================== Management of continuity ===================
--
SetInterval(me: mutable; First, Last: Real from Standard)
---Purpose: Sets the bounds of the parametric interval on
-- the function
-- This determines the derivatives in these values if the
-- function is not Cn.
is redefined;
NbIntervals(me; S : Shape from GeomAbs)
---Purpose: Returns the number of intervals for continuity
-- <S>.
-- May be one if Continuity(me) >= <S>
returns Integer is redefined;
Intervals(me; T : in out Array1OfReal from TColStd;
S : Shape from GeomAbs)
---Purpose: Stores in <T> the parameters bounding the intervals
-- of continuity <S>.
--
-- The array must provide enough room to accomodate
-- for the parameters. i.e. T.Length() > NbIntervals()
raises
OutOfRange from Standard
is redefined;
-- =================== To help computation of Tolerance ===============
GetAverageLaw(me : mutable;
ATangent : out Vec from gp;
ANormal : out Vec from gp;
ABiNormal : out Vec from gp)
---Purpose: Get average value of M(t) and V(t) it is usfull to
-- make fast approximation of rational surfaces.
is redefined;
-- =================== To help Particular case ===============
IsConstant(me)
---Purpose: Say if the law is Constant
-- Return False by Default.
returns Boolean
is redefined;
IsOnlyBy3dCurve(me)
---Purpose: Say if the law is defined, only by the 3d Geometry of
-- the setted Curve
-- Return False by Default.
returns Boolean
is redefined;
Origine(me : mutable;
OrACR1 : Real;
OrACR2 : Real)
is redefined;
InitX(me : mutable;
Param : Real from Standard)
is private;
fields
myTrimmed : HCurve from Adaptor3d;
myCurve : HCurve from Adaptor3d;
Pole : HArray2OfPnt2d from TColgp;
X, XTol : Vector from math;
Inf, Sup : Vector from math;
frenet : Frenet from GeomFill;
myNbPts : Integer from Standard;
myStatus : PipeError from GeomFill;
end GuideTrihedronPlan;

View File

@@ -14,33 +14,32 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GeomFill_GuideTrihedronPlan.ixx>
#include <gp_Pnt.hxx>
#include <gp_Pnt2d.hxx>
//#include <gp_Trsf2d.hxx>
//#include <Bnd_Box2d.hxx>
#include <ElCLib.hxx>
#include <Adaptor3d_Curve.hxx>
#include <Adaptor3d_HCurve.hxx>
#include <ElCLib.hxx>
#include <Geom_Plane.hxx>
#include <GeomAdaptor_HCurve.hxx>
#include <GeomAdaptor_HSurface.hxx>
#include <Geom_Plane.hxx>
#include <IntCurveSurface_IntersectionPoint.hxx>
#include <IntCurveSurface_HInter.hxx>
#include <GeomFill_Frenet.hxx>
#include <GeomFill_GuideTrihedronPlan.hxx>
#include <GeomFill_PlanFunc.hxx>
#include <math_Vector.hxx>
#include <GeomFill_TrihedronLaw.hxx>
#include <gp_Pnt.hxx>
#include <gp_Pnt2d.hxx>
#include <gp_Vec.hxx>
#include <IntCurveSurface_HInter.hxx>
#include <IntCurveSurface_IntersectionPoint.hxx>
#include <math_FunctionRoot.hxx>
#include <math_Matrix.hxx>
#include <math_Vector.hxx>
#include <Precision.hxx>
#include <Standard_ConstructionError.hxx>
#include <Standard_OutOfRange.hxx>
#include <Standard_Type.hxx>
//#include <gp_Trsf2d.hxx>
//#include <Bnd_Box2d.hxx>
#if DRAW
#include <DrawTrSurf.hxx>
#endif

View File

@@ -0,0 +1,138 @@
// Created on: 1998-06-23
// 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 _GeomFill_GuideTrihedronPlan_HeaderFile
#define _GeomFill_GuideTrihedronPlan_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <TColgp_HArray2OfPnt2d.hxx>
#include <math_Vector.hxx>
#include <Standard_Integer.hxx>
#include <GeomFill_PipeError.hxx>
#include <GeomFill_TrihedronWithGuide.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Real.hxx>
#include <GeomAbs_Shape.hxx>
#include <TColStd_Array1OfReal.hxx>
class Adaptor3d_HCurve;
class GeomFill_Frenet;
class Standard_OutOfRange;
class Standard_ConstructionError;
class GeomFill_TrihedronLaw;
class gp_Vec;
class GeomFill_GuideTrihedronPlan;
DEFINE_STANDARD_HANDLE(GeomFill_GuideTrihedronPlan, GeomFill_TrihedronWithGuide)
//! Trihedron in the case of sweeping along a guide curve defined
//! by the orthogonal plan on the trajectory
class GeomFill_GuideTrihedronPlan : public GeomFill_TrihedronWithGuide
{
public:
Standard_EXPORT GeomFill_GuideTrihedronPlan(const Handle(Adaptor3d_HCurve)& theGuide);
Standard_EXPORT virtual void SetCurve (const Handle(Adaptor3d_HCurve)& thePath) Standard_OVERRIDE;
Standard_EXPORT virtual Handle(GeomFill_TrihedronLaw) Copy() const Standard_OVERRIDE;
//! Give a status to the Law
//! Returns PipeOk (default implementation)
Standard_EXPORT virtual GeomFill_PipeError ErrorStatus() const Standard_OVERRIDE;
Standard_EXPORT virtual Handle(Adaptor3d_HCurve) Guide() const Standard_OVERRIDE;
Standard_EXPORT virtual Standard_Boolean D0 (const Standard_Real Param, gp_Vec& Tangent, gp_Vec& Normal, gp_Vec& BiNormal) Standard_OVERRIDE;
Standard_EXPORT virtual Standard_Boolean D1 (const Standard_Real Param, gp_Vec& Tangent, gp_Vec& DTangent, gp_Vec& Normal, gp_Vec& DNormal, gp_Vec& BiNormal, gp_Vec& DBiNormal) Standard_OVERRIDE;
Standard_EXPORT virtual Standard_Boolean D2 (const Standard_Real Param, gp_Vec& Tangent, gp_Vec& DTangent, gp_Vec& D2Tangent, gp_Vec& Normal, gp_Vec& DNormal, gp_Vec& D2Normal, gp_Vec& BiNormal, gp_Vec& DBiNormal, gp_Vec& D2BiNormal) Standard_OVERRIDE;
//! Sets the bounds of the parametric interval on
//! the function
//! This determines the derivatives in these values if the
//! function is not Cn.
Standard_EXPORT virtual void SetInterval (const Standard_Real First, const Standard_Real Last) Standard_OVERRIDE;
//! Returns the number of intervals for continuity
//! <S>.
//! May be one if Continuity(me) >= <S>
Standard_EXPORT virtual Standard_Integer NbIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE;
//! Stores in <T> the parameters bounding the intervals
//! of continuity <S>.
//!
//! The array must provide enough room to accomodate
//! for the parameters. i.e. T.Length() > NbIntervals()
Standard_EXPORT virtual void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE;
//! Get average value of M(t) and V(t) it is usfull to
//! make fast approximation of rational surfaces.
Standard_EXPORT virtual void GetAverageLaw (gp_Vec& ATangent, gp_Vec& ANormal, gp_Vec& ABiNormal) Standard_OVERRIDE;
//! Say if the law is Constant
Standard_EXPORT virtual Standard_Boolean IsConstant() const Standard_OVERRIDE;
//! Say if the law is defined, only by the 3d Geometry of
//! the setted Curve
//! Return False by Default.
Standard_EXPORT virtual Standard_Boolean IsOnlyBy3dCurve() const Standard_OVERRIDE;
Standard_EXPORT virtual void Origine (const Standard_Real OrACR1, const Standard_Real OrACR2) Standard_OVERRIDE;
DEFINE_STANDARD_RTTI(GeomFill_GuideTrihedronPlan,GeomFill_TrihedronWithGuide)
protected:
private:
Standard_EXPORT void Init();
Standard_EXPORT void InitX (const Standard_Real Param);
Handle(Adaptor3d_HCurve) myTrimmed;
Handle(Adaptor3d_HCurve) myCurve;
Handle(TColgp_HArray2OfPnt2d) Pole;
math_Vector X;
math_Vector XTol;
math_Vector Inf;
math_Vector Sup;
Handle(GeomFill_Frenet) frenet;
Standard_Integer myNbPts;
GeomFill_PipeError myStatus;
};
#endif // _GeomFill_GuideTrihedronPlan_HeaderFile

View File

@@ -1,46 +0,0 @@
-- Created on: 1994-02-18
-- 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 Line from GeomFill
---Purpose: class for instantiation of AppBlend
inherits TShared from MMgt
is
Create returns Line from GeomFill;
Create(NbPoints : Integer from Standard)
returns Line from GeomFill;
NbPoints(me)
returns Integer from Standard
---C++: inline
is static;
Point(me; Index: Integer from Standard)
returns Integer from Standard
---C++: inline
is static;
fields
myNbPoints : Integer from Standard;
end Line;

View File

@@ -14,15 +14,14 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GeomFill_Line.ixx>
#include <GeomFill_Line.hxx>
#include <Standard_Type.hxx>
//=======================================================================
//function : GeomFill_Line
//purpose :
//=======================================================================
GeomFill_Line::GeomFill_Line()
{
myNbPoints = 0;

View File

@@ -0,0 +1,70 @@
// Created on: 1994-02-18
// 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 _GeomFill_Line_HeaderFile
#define _GeomFill_Line_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Standard_Integer.hxx>
#include <MMgt_TShared.hxx>
class GeomFill_Line;
DEFINE_STANDARD_HANDLE(GeomFill_Line, MMgt_TShared)
//! class for instantiation of AppBlend
class GeomFill_Line : public MMgt_TShared
{
public:
Standard_EXPORT GeomFill_Line();
Standard_EXPORT GeomFill_Line(const Standard_Integer NbPoints);
Standard_Integer NbPoints() const;
Standard_Integer Point (const Standard_Integer Index) const;
DEFINE_STANDARD_RTTI(GeomFill_Line,MMgt_TShared)
protected:
private:
Standard_Integer myNbPoints;
};
#include <GeomFill_Line.lxx>
#endif // _GeomFill_Line_HeaderFile

View File

@@ -1,62 +0,0 @@
-- Created on: 1998-02-02
-- 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 LocFunction from GeomFill
---Purpose:
uses
LocationLaw from GeomFill,
Array1OfVec from TColgp,
Mat from gp
is
Create( Law : LocationLaw from GeomFill)
returns LocFunction from GeomFill;
D0(me : in out;
Param: Real;
First, Last : Real)
---Purpose: compute the section for v = param
returns Boolean;
D1(me : in out;
Param: Real;
First, Last : Real)
---Purpose: compute the first derivative in v direction of the
-- section for v = param
returns Boolean;
D2(me : in out;
Param: Real;
First, Last : Real)
---Purpose: compute the second derivative in v direction of the
-- section for v = param
returns Boolean;
DN(me : in out;
Param : Real;
First, Last : Real;
Order : Integer;
Result : in out Real;
Ier : out Integer);
fields
myLaw : LocationLaw from GeomFill;
V, DV, D2V : Array1OfVec from TColgp;
M, DM, D2M : Mat from gp;
end LocFunction;

View File

@@ -14,8 +14,9 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GeomFill_LocFunction.ixx>
#include <GeomFill_LocationLaw.hxx>
#include <GeomFill_LocFunction.hxx>
#include <gp_Mat.hxx>
#include <gp_Vec.hxx>
#include <TColgp_Array1OfPnt2d.hxx>

View File

@@ -0,0 +1,85 @@
// Created on: 1998-02-02
// 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 _GeomFill_LocFunction_HeaderFile
#define _GeomFill_LocFunction_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <TColgp_Array1OfVec.hxx>
#include <gp_Mat.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Real.hxx>
#include <Standard_Integer.hxx>
class GeomFill_LocationLaw;
class GeomFill_LocFunction
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT GeomFill_LocFunction(const Handle(GeomFill_LocationLaw)& Law);
//! compute the section for v = param
Standard_EXPORT Standard_Boolean D0 (const Standard_Real Param, const Standard_Real First, const Standard_Real Last);
//! compute the first derivative in v direction of the
//! section for v = param
Standard_EXPORT Standard_Boolean D1 (const Standard_Real Param, const Standard_Real First, const Standard_Real Last);
//! compute the second derivative in v direction of the
//! section for v = param
Standard_EXPORT Standard_Boolean D2 (const Standard_Real Param, const Standard_Real First, const Standard_Real Last);
Standard_EXPORT void DN (const Standard_Real Param, const Standard_Real First, const Standard_Real Last, const Standard_Integer Order, Standard_Real& Result, Standard_Integer& Ier);
protected:
private:
Handle(GeomFill_LocationLaw) myLaw;
TColgp_Array1OfVec V;
TColgp_Array1OfVec DV;
TColgp_Array1OfVec D2V;
gp_Mat M;
gp_Mat DM;
gp_Mat D2M;
};
#endif // _GeomFill_LocFunction_HeaderFile

View File

@@ -1,255 +0,0 @@
-- Created on: 1998-04-21
-- 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 LocationDraft from GeomFill
inherits LocationLaw from GeomFill
uses
HCurve from Adaptor3d,
HSurface from Adaptor3d,
Mat from gp,
Vec from gp,
Pnt from gp,
Dir from gp,
Shape from GeomAbs,
Array1OfReal from TColStd,
Array1OfVec2d from TColgp,
Array1OfPnt2d from TColgp,
HArray1OfPnt2d from TColgp,
DraftTrihedron from GeomFill,
Curve from Geom,
Line from Geom,
TrimmedCurve from Geom
raises
NotImplemented, OutOfRange
is
Create (Direction : Dir from gp;
Angle : Real from Standard)
returns LocationDraft from GeomFill;
SetStopSurf(me : mutable; Surf : HSurface from Adaptor3d);
SetAngle(me : mutable; Angle : Real);
Prepare(me:mutable) is private;
SetCurve(me : mutable; C : HCurve from Adaptor3d)
is redefined;
GetCurve(me)
returns HCurve from Adaptor3d
---C++: return const &
is redefined;
SetTrsf(me : mutable; Transfo : Mat from gp)
is redefined;
Copy(me)
returns LocationLaw from GeomFill
is redefined;
D0(me : mutable;
Param: Real;
M : out Mat from gp;
V : out Vec from gp)
---Purpose: compute Location
returns Boolean is redefined;
D0(me : mutable;
Param: Real;
M : out Mat from gp;
V : out Vec from gp;
Poles2d : out Array1OfPnt2d from TColgp)
---Purpose: compute Location and 2d points
returns Boolean is redefined;
D1(me : mutable;
Param: Real;
M : out Mat from gp;
V : out Vec from gp;
DM : out Mat from gp;
DV : out Vec from gp;
Poles2d : out Array1OfPnt2d from TColgp;
DPoles2d : out Array1OfVec2d from TColgp)
---Purpose: compute location 2d points and associated
-- first derivatives.
-- Warning : It used only for C1 or C2 aproximation
returns Boolean
is redefined;
D2(me : mutable;
Param: Real;
M : out Mat from gp;
V : out Vec from gp;
DM : out Mat from gp;
DV : out Vec from gp;
D2M : out Mat from gp;
D2V : out Vec from gp;
Poles2d : out Array1OfPnt2d from TColgp;
DPoles2d : out Array1OfVec2d from TColgp;
D2Poles2d : out Array1OfVec2d from TColgp)
---Purpose: compute location 2d points and associated
-- first and seconde derivatives.
-- Warning : It used only for C2 aproximation
returns Boolean
is redefined;
--
-- ================== General Information On The Function ==================
--
HasFirstRestriction(me)
---Purpose: Say if the first restriction is defined in this class.
-- If it is true the first element of poles array in
-- D0,D1,D2... Correspond to this restriction.
-- Returns Standard_False (default implementation)
returns Boolean
is redefined;
HasLastRestriction(me) -- A FAIRE !!
---Purpose: Say if the last restriction is defined in this class.
-- If it is true the last element of poles array in
-- D0,D1,D2... Correspond to this restriction.
-- Returns Standard_False (default implementation)
returns Boolean
is redefined;
TraceNumber(me)
---Purpose: Give the number of trace (Curves 2d wich are not restriction)
-- Returns 1 (default implementation)
returns Integer
is redefined;
--
-- =================== Management of continuity ===================
--
NbIntervals(me; S : Shape from GeomAbs)
---Purpose: Returns the number of intervals for continuity
-- <S>.
-- May be one if Continuity(me) >= <S>
returns Integer is redefined;
Intervals(me; T : in out Array1OfReal from TColStd;
S : Shape from GeomAbs)
---Purpose: Stores in <T> the parameters bounding the intervals
-- of continuity <S>.
--
-- The array must provide enough room to accomodate
-- for the parameters. i.e. T.Length() > NbIntervals()
raises
OutOfRange from Standard
is redefined;
SetInterval(me: mutable; First, Last: Real from Standard)
---Purpose: Sets the bounds of the parametric interval on
-- the function
-- This determines the derivatives in these values if the
-- function is not Cn.
is redefined;
GetInterval(me; First, Last: out Real from Standard)
---Purpose: Gets the bounds of the parametric interval on
-- the function
is redefined;
GetDomain(me; First, Last: out Real from Standard)
---Purpose: Gets the bounds of the function parametric domain.
-- Warning: This domain it is not modified by the
-- SetValue method
is redefined;
-- =================== To help computation of Tolerance ===============
--
-- Evaluation of error, in 2d space, or on composed function, is
-- difficult. The following methods can help the approximation to
-- make good evaluation and use good tolerances.
--
-- It is not necessary for the following informations to be very
-- precise. A fast evaluation is sufficient.
Resolution(me;
Index : Integer from Standard;
Tol : Real from Standard;
TolU, TolV : out Real from Standard)
---Purpose: Returns the resolutions in the sub-space 2d <Index>
-- This information is usfull to find an good tolerance in
-- 2d approximation.
-- Warning: Used only if Nb2dCurve > 0
is redefined;
GetMaximalNorm(me : mutable)
---Purpose: Get the maximum Norm of the matrix-location part. It
-- is usful to find an good Tolerance to approx M(t).
returns Real
is redefined;
GetAverageLaw(me : mutable;
AM: out Mat from gp;
AV: out Vec from gp)
---Purpose: Get average value of M(t) and V(t) it is usfull to
-- make fast approximation of rational surfaces.
is redefined;
--
-- To find elementary sweep
--
IsTranslation(me; Error : out Real)
---Purpose: Say if the Location Law, is an translation of Location
-- The default implementation is " returns False ".
returns Boolean
is redefined;
IsRotation(me; Error : out Real )
---Purpose: Say if the Location Law, is a rotation of Location
-- The default implementation is " returns False ".
returns Boolean
is redefined;
Rotation(me; Center : out Pnt from gp)
is redefined;
IsIntersec(me)
---Purpose: Say if the generatrice interset the surface
returns Boolean
is static;
Direction(me)
returns Dir from gp;
fields
Trans : Mat from gp;
myLaw : DraftTrihedron from GeomFill;
mySurf : HSurface from Adaptor3d;
myCurve : HCurve from Adaptor3d;
myTrimmed : HCurve from Adaptor3d;
myDir : Dir from gp;
myAngle : Real from Standard;
myNbPts : Integer from Standard;
myPoles2d : HArray1OfPnt2d from TColgp is protected;
Intersec : Boolean from Standard;
WithTrans : Boolean from Standard;
end LocationDraft;

View File

@@ -14,29 +14,34 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GeomFill_LocationDraft.ixx>
#include <Adaptor3d_HCurve.hxx>
#include <Adaptor3d_HSurface.hxx>
#include <Geom_Line.hxx>
#include <Geom_Surface.hxx>
#include <GeomAdaptor_HCurve.hxx>
#include <GeomAdaptor_HSurface.hxx>
#include <Geom_Surface.hxx>
#include <Geom_Line.hxx>
#include <GeomFill_TrihedronLaw.hxx>
#include <GeomFill_DraftTrihedron.hxx>
#include <GeomFill_FunctionDraft.hxx>
#include <GeomFill_LocationDraft.hxx>
#include <GeomFill_LocationLaw.hxx>
#include <GeomFill_Tensor.hxx>
#include <IntCurveSurface_IntersectionPoint.hxx>
#include <IntCurveSurface_Intersection.hxx>
#include <GeomFill_TrihedronLaw.hxx>
#include <gp_Dir.hxx>
#include <gp_Mat.hxx>
#include <gp_Pnt.hxx>
#include <gp_Vec.hxx>
#include <IntCurveSurface_HInter.hxx>
#include <IntCurveSurface_Intersection.hxx>
#include <IntCurveSurface_IntersectionPoint.hxx>
#include <math_FunctionSetWithDerivatives.hxx>
#include <math_Vector.hxx>
#include <math_NewtonFunctionSetRoot.hxx>
#include <math_Matrix.hxx>
#include <math_Gauss.hxx>
#include <math_Matrix.hxx>
#include <math_NewtonFunctionSetRoot.hxx>
#include <math_Vector.hxx>
#include <Standard_NotImplemented.hxx>
#include <Standard_OutOfRange.hxx>
#include <Standard_Type.hxx>
//==================================================================
//Function: GeomFill_LocationDraft

View File

@@ -0,0 +1,194 @@
// Created on: 1998-04-21
// 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 _GeomFill_LocationDraft_HeaderFile
#define _GeomFill_LocationDraft_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <gp_Mat.hxx>
#include <gp_Dir.hxx>
#include <Standard_Real.hxx>
#include <Standard_Integer.hxx>
#include <TColgp_HArray1OfPnt2d.hxx>
#include <Standard_Boolean.hxx>
#include <GeomFill_LocationLaw.hxx>
#include <TColgp_Array1OfPnt2d.hxx>
#include <TColgp_Array1OfVec2d.hxx>
#include <GeomAbs_Shape.hxx>
#include <TColStd_Array1OfReal.hxx>
class GeomFill_DraftTrihedron;
class Adaptor3d_HSurface;
class Adaptor3d_HCurve;
class Standard_NotImplemented;
class Standard_OutOfRange;
class gp_Dir;
class gp_Mat;
class GeomFill_LocationLaw;
class gp_Vec;
class gp_Pnt;
class GeomFill_LocationDraft;
DEFINE_STANDARD_HANDLE(GeomFill_LocationDraft, GeomFill_LocationLaw)
class GeomFill_LocationDraft : public GeomFill_LocationLaw
{
public:
Standard_EXPORT GeomFill_LocationDraft(const gp_Dir& Direction, const Standard_Real Angle);
Standard_EXPORT void SetStopSurf (const Handle(Adaptor3d_HSurface)& Surf);
Standard_EXPORT void SetAngle (const Standard_Real Angle);
Standard_EXPORT virtual void SetCurve (const Handle(Adaptor3d_HCurve)& C) Standard_OVERRIDE;
Standard_EXPORT virtual const Handle(Adaptor3d_HCurve)& GetCurve() const Standard_OVERRIDE;
Standard_EXPORT virtual void SetTrsf (const gp_Mat& Transfo) Standard_OVERRIDE;
Standard_EXPORT virtual Handle(GeomFill_LocationLaw) Copy() const Standard_OVERRIDE;
//! compute Location
Standard_EXPORT virtual Standard_Boolean D0 (const Standard_Real Param, gp_Mat& M, gp_Vec& V) Standard_OVERRIDE;
//! compute Location and 2d points
Standard_EXPORT virtual Standard_Boolean D0 (const Standard_Real Param, gp_Mat& M, gp_Vec& V, TColgp_Array1OfPnt2d& Poles2d) Standard_OVERRIDE;
//! compute location 2d points and associated
//! first derivatives.
//! Warning : It used only for C1 or C2 aproximation
Standard_EXPORT virtual Standard_Boolean D1 (const Standard_Real Param, gp_Mat& M, gp_Vec& V, gp_Mat& DM, gp_Vec& DV, TColgp_Array1OfPnt2d& Poles2d, TColgp_Array1OfVec2d& DPoles2d) Standard_OVERRIDE;
//! compute location 2d points and associated
//! first and seconde derivatives.
//! Warning : It used only for C2 aproximation
Standard_EXPORT virtual Standard_Boolean D2 (const Standard_Real Param, gp_Mat& M, gp_Vec& V, gp_Mat& DM, gp_Vec& DV, gp_Mat& D2M, gp_Vec& D2V, TColgp_Array1OfPnt2d& Poles2d, TColgp_Array1OfVec2d& DPoles2d, TColgp_Array1OfVec2d& D2Poles2d) Standard_OVERRIDE;
//! Say if the first restriction is defined in this class.
//! If it is true the first element of poles array in
//! D0,D1,D2... Correspond to this restriction.
//! Returns Standard_False (default implementation)
Standard_EXPORT virtual Standard_Boolean HasFirstRestriction() const Standard_OVERRIDE;
//! Say if the last restriction is defined in this class.
//! If it is true the last element of poles array in
//! D0,D1,D2... Correspond to this restriction.
//! Returns Standard_False (default implementation)
Standard_EXPORT virtual Standard_Boolean HasLastRestriction() const Standard_OVERRIDE;
//! Give the number of trace (Curves 2d wich are not restriction)
//! Returns 1 (default implementation)
Standard_EXPORT virtual Standard_Integer TraceNumber() const Standard_OVERRIDE;
//! Returns the number of intervals for continuity
//! <S>.
//! May be one if Continuity(me) >= <S>
Standard_EXPORT virtual Standard_Integer NbIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE;
//! Stores in <T> the parameters bounding the intervals
//! of continuity <S>.
//!
//! The array must provide enough room to accomodate
//! for the parameters. i.e. T.Length() > NbIntervals()
Standard_EXPORT virtual void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE;
//! Sets the bounds of the parametric interval on
//! the function
//! This determines the derivatives in these values if the
//! function is not Cn.
Standard_EXPORT virtual void SetInterval (const Standard_Real First, const Standard_Real Last) Standard_OVERRIDE;
//! Gets the bounds of the parametric interval on
//! the function
Standard_EXPORT virtual void GetInterval (Standard_Real& First, Standard_Real& Last) const Standard_OVERRIDE;
//! Gets the bounds of the function parametric domain.
//! Warning: This domain it is not modified by the
//! SetValue method
Standard_EXPORT virtual void GetDomain (Standard_Real& First, Standard_Real& Last) const Standard_OVERRIDE;
//! Returns the resolutions in the sub-space 2d <Index>
//! This information is usfull to find an good tolerance in
//! 2d approximation.
//! Warning: Used only if Nb2dCurve > 0
Standard_EXPORT virtual void Resolution (const Standard_Integer Index, const Standard_Real Tol, Standard_Real& TolU, Standard_Real& TolV) const Standard_OVERRIDE;
//! Get the maximum Norm of the matrix-location part. It
//! is usful to find an good Tolerance to approx M(t).
Standard_EXPORT virtual Standard_Real GetMaximalNorm() Standard_OVERRIDE;
//! Get average value of M(t) and V(t) it is usfull to
//! make fast approximation of rational surfaces.
Standard_EXPORT virtual void GetAverageLaw (gp_Mat& AM, gp_Vec& AV) Standard_OVERRIDE;
//! Say if the Location Law, is an translation of Location
//! The default implementation is " returns False ".
Standard_EXPORT virtual Standard_Boolean IsTranslation (Standard_Real& Error) const Standard_OVERRIDE;
//! Say if the Location Law, is a rotation of Location
//! The default implementation is " returns False ".
Standard_EXPORT virtual Standard_Boolean IsRotation (Standard_Real& Error) const Standard_OVERRIDE;
Standard_EXPORT virtual void Rotation (gp_Pnt& Center) const Standard_OVERRIDE;
//! Say if the generatrice interset the surface
Standard_EXPORT Standard_Boolean IsIntersec() const;
Standard_EXPORT gp_Dir Direction() const;
DEFINE_STANDARD_RTTI(GeomFill_LocationDraft,GeomFill_LocationLaw)
protected:
Handle(TColgp_HArray1OfPnt2d) myPoles2d;
private:
Standard_EXPORT void Prepare();
gp_Mat Trans;
Handle(GeomFill_DraftTrihedron) myLaw;
Handle(Adaptor3d_HSurface) mySurf;
Handle(Adaptor3d_HCurve) myCurve;
Handle(Adaptor3d_HCurve) myTrimmed;
gp_Dir myDir;
Standard_Real myAngle;
Standard_Integer myNbPts;
Standard_Boolean Intersec;
Standard_Boolean WithTrans;
};
#endif // _GeomFill_LocationDraft_HeaderFile

View File

@@ -1,305 +0,0 @@
-- Created on: 1998-07-08
-- 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 LocationGuide from GeomFill
inherits LocationLaw from GeomFill
uses
HCurve from Adaptor3d,
Mat from gp,
Vec from gp,
Pnt from gp,
Shape from GeomAbs,
Array1OfReal from TColStd,
Array1OfVec2d from TColgp,
Array1OfPnt2d from TColgp,
HArray1OfPnt2d from TColgp,
HArray2OfPnt2d from TColgp,
HArray1OfReal from TColStd,
HSurface from Adaptor3d,
Curve from Geom,
Curve from Adaptor3d,
TrihedronWithGuide from GeomFill,
Dir from gp,
Line from Geom,
TrimmedCurve from Geom,
SectionLaw from GeomFill,
PipeError from GeomFill,
Vector from math
raises
NotImplemented, ConstructionError, OutOfRange
is
Create(Triedre : TrihedronWithGuide from GeomFill)
returns LocationGuide from GeomFill;
Set (me : mutable;
Section : SectionLaw from GeomFill;
rotat : Boolean from Standard;
SFirst, SLast : Real;
PrecAngle : Real;
LastAngle : out Real)
is static;
EraseRotation(me : mutable);
SetRotation(me : mutable;
PrecAngle : Real;
LastAngle : out Real)
is private;
SetCurve(me : mutable; C : HCurve from Adaptor3d)
is redefined;
GetCurve(me)
returns HCurve from Adaptor3d
---C++: return const &
is redefined;
SetTrsf(me : mutable; Transfo : Mat from gp)
is redefined;
Copy(me)
returns LocationLaw from GeomFill
is redefined;
D0(me : mutable;
Param: Real;
M : out Mat from gp;
V : out Vec from gp)
---Purpose: compute Location
returns Boolean is redefined;
D0(me : mutable;
Param: Real;
M : out Mat from gp;
V : out Vec from gp;
Poles2d : out Array1OfPnt2d from TColgp)
---Purpose: compute Location and 2d points
returns Boolean is redefined;
D1(me : mutable;
Param: Real;
M : out Mat from gp;
V : out Vec from gp;
DM : out Mat from gp;
DV : out Vec from gp;
Poles2d : out Array1OfPnt2d from TColgp;
DPoles2d : out Array1OfVec2d from TColgp)
---Purpose: compute location 2d points and associated
-- first derivatives.
-- Warning : It used only for C1 or C2 aproximation
returns Boolean
is redefined;
D2(me : mutable;
Param: Real;
M : out Mat from gp;
V : out Vec from gp;
DM : out Mat from gp;
DV : out Vec from gp;
D2M : out Mat from gp;
D2V : out Vec from gp;
Poles2d : out Array1OfPnt2d from TColgp;
DPoles2d : out Array1OfVec2d from TColgp;
D2Poles2d : out Array1OfVec2d from TColgp)
---Purpose: compute location 2d points and associated
-- first and seconde derivatives.
-- Warning : It used only for C2 aproximation
returns Boolean
is redefined;
-- ================== General Information On The Function ==================
--
HasFirstRestriction(me)
---Purpose: Say if the first restriction is defined in this class.
-- If it is true the first element of poles array in
-- D0,D1,D2... Correspond to this restriction.
-- Returns Standard_False (default implementation)
returns Boolean
is redefined;
HasLastRestriction(me) -- A FAIRE !!
---Purpose: Say if the last restriction is defined in this class.
-- If it is true the last element of poles array in
-- D0,D1,D2... Correspond to this restriction.
-- Returns Standard_False (default implementation)
returns Boolean
is redefined;
TraceNumber(me)
---Purpose: Give the number of trace (Curves 2d wich are not restriction)
-- Returns 1 (default implementation)
returns Integer
is redefined;
ErrorStatus(me)
---Purpose:Give a status to the Law
-- Returns PipeOk (default implementation)
returns PipeError from GeomFill
is redefined;
--
-- =================== Management of continuity ===================
--
NbIntervals(me; S : Shape from GeomAbs)
---Purpose: Returns the number of intervals for continuity
-- <S>.
-- May be one if Continuity(me) >= <S>
returns Integer is redefined;
Intervals(me; T : in out Array1OfReal from TColStd;
S : Shape from GeomAbs)
---Purpose: Stores in <T> the parameters bounding the intervals
-- of continuity <S>.
--
-- The array must provide enough room to accomodate
-- for the parameters. i.e. T.Length() > NbIntervals()
raises
OutOfRange from Standard
is redefined;
SetInterval(me: mutable; First, Last: Real from Standard)
---Purpose: Sets the bounds of the parametric interval on
-- the function
-- This determines the derivatives in these values if the
-- function is not Cn.
is redefined;
GetInterval(me; First, Last: out Real from Standard)
---Purpose: Gets the bounds of the parametric interval on
-- the function
is redefined;
GetDomain(me; First, Last: out Real from Standard)
---Purpose: Gets the bounds of the function parametric domain.
-- Warning: This domain it is not modified by the
-- SetValue method
is redefined;
-- =================== To help computation of Tolerance ===============
--
-- Evaluation of error, in 2d space, or on composed function, is
-- difficult. The following methods can help the approximation to
-- make good evaluation and use good tolerances.
--
-- It is not necessary for the following informations to be very
-- precise. A fast evaluation is sufficient.
SetTolerance(me : mutable; Tol3d, Tol2d : Real)
---Purpose: Is usefull, if (me) have to run numerical
-- algorithm to perform D0, D1 or D2
-- The default implementation make nothing.
is redefined;
Resolution(me;
Index : Integer from Standard;
Tol : Real from Standard;
TolU, TolV : out Real from Standard)
---Purpose: Returns the resolutions in the sub-space 2d <Index>
-- This information is usfull to find an good tolerance in
-- 2d approximation.
-- Warning: Used only if Nb2dCurve > 0
is redefined;
GetMaximalNorm(me : mutable)
---Purpose: Get the maximum Norm of the matrix-location part. It
-- is usful to find an good Tolerance to approx M(t).
returns Real
is redefined;
GetAverageLaw(me : mutable;
AM: out Mat from gp;
AV: out Vec from gp)
---Purpose: Get average value of M(t) and V(t) it is usfull to
-- make fast approximation of rational surfaces.
is redefined;
--
-- To find elementary sweep
--
IsTranslation(me; Error : out Real)
---Purpose: Say if the Location Law, is an translation of Location
-- The default implementation is " returns False ".
returns Boolean
is redefined;
IsRotation(me; Error : out Real )
---Purpose: Say if the Location Law, is a rotation of Location
-- The default implementation is " returns False ".
returns Boolean
is redefined;
Rotation(me; Center : out Pnt from gp)
is redefined;
Section(me)
returns Curve from Geom;
Guide(me)
returns HCurve from Adaptor3d;
InitX(me;
Param : Real from Standard)
is private;
SetOrigine(me : mutable;
Param1 : Real;
Param2 : Real)
is static;
ComputeAutomaticLaw(me; ParAndRad : out HArray1OfPnt2d from TColgp)
returns PipeError from GeomFill;
fields
myLaw : TrihedronWithGuide from GeomFill; -- loi de triedre
mySec : SectionLaw from GeomFill; -- loi de section
myCurve : HCurve from Adaptor3d; -- trajectoire
myGuide : HCurve from Adaptor3d; -- guide
myTrimmed : HCurve from Adaptor3d; -- trajectoire trimme
myPoles2d : HArray2OfPnt2d from TColgp is protected;
myNbPts : Integer from Standard;
rotation : Boolean from Standard; -- contact ou non
OrigParam1 : Real from Standard; -- pour ACR
OrigParam2 : Real from Standard;
Uf, Ul : Real from Standard;
myFirstS : Real from Standard;
myLastS : Real from Standard;
ratio : Real from Standard;
WithTrans: Boolean from Standard;
Trans : Mat from gp;
TolRes : Vector from math;
Inf, Sup: Vector from math;
X, R : Vector from math;
myStatus : PipeError from GeomFill;
end LocationGuide;

View File

@@ -14,49 +14,53 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GeomFill_LocationGuide.ixx>
#include <gp.hxx>
#include <gp_Pnt.hxx>
#include <gp_Vec.hxx>
#include <gp_Dir.hxx>
#include <gp_Trsf.hxx>
#include <gp_GTrsf.hxx>
#include <gp_XYZ.hxx>
#include <gp_Ax1.hxx>
#include <gp_Pnt2d.hxx>
#include <math_Vector.hxx>
#include <math_Gauss.hxx>
#include <math_FunctionSetRoot.hxx>
#include <Precision.hxx>
#include <Geom_SurfaceOfRevolution.hxx>
#include <Geom_BSplineCurve.hxx>
#include <Geom_Curve.hxx>
#include <Adaptor3d_SurfaceOfRevolution.hxx>
#include <Adaptor3d_HCurve.hxx>
#include <Adaptor3d_HSurface.hxx>
#include <IntCurveSurface_IntersectionPoint.hxx>
#include <Adaptor3d_Surface.hxx>
#include <GeomAdaptor.hxx>
#include <GeomAdaptor_HSurface.hxx>
#include <GeomAdaptor_HCurve.hxx>
#include <GeomFill_FunctionGuide.ixx>
#include <GeomFill_UniformSection.hxx>
#include <GeomFill_SectionPlacement.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <GeomLib.hxx>
#include <Adaptor3d_SurfaceOfRevolution.hxx>
#include <ElCLib.hxx>
#include <TColStd_HArray1OfInteger.hxx>
#include <TColStd_HArray1OfReal.hxx>
#include <TColgp_HArray1OfPnt.hxx>
#include <Extrema_ExtCS.hxx>
#include <Extrema_POnSurf.hxx>
#include <Geom_BSplineCurve.hxx>
#include <Geom_Curve.hxx>
#include <Geom_Surface.hxx>
#include <Geom_SurfaceOfRevolution.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <GeomAdaptor.hxx>
#include <GeomAdaptor_HCurve.hxx>
#include <GeomAdaptor_HSurface.hxx>
#include <GeomFill_FunctionGuide.hxx>
#include <GeomFill_LocationGuide.hxx>
#include <GeomFill_LocationLaw.hxx>
#include <GeomFill_SectionLaw.hxx>
#include <GeomFill_SectionPlacement.hxx>
#include <GeomFill_TrihedronWithGuide.hxx>
#include <GeomFill_UniformSection.hxx>
#include <GeomLib.hxx>
#include <gp.hxx>
#include <gp_Ax1.hxx>
#include <gp_Dir.hxx>
#include <gp_GTrsf.hxx>
#include <gp_Mat.hxx>
#include <gp_Pnt.hxx>
#include <gp_Pnt2d.hxx>
#include <gp_Trsf.hxx>
#include <gp_Vec.hxx>
#include <gp_XYZ.hxx>
#include <IntCurveSurface_IntersectionPoint.hxx>
#include <math_FunctionSetRoot.hxx>
#include <math_Gauss.hxx>
#include <math_Matrix.hxx>
#include <math_Vector.hxx>
#include <Precision.hxx>
#include <Standard_ConstructionError.hxx>
#include <Standard_NotImplemented.hxx>
#include <Standard_OutOfRange.hxx>
#include <Standard_Type.hxx>
#include <TColgp_HArray1OfPnt.hxx>
#include <TColStd_HArray1OfInteger.hxx>
#include <TColStd_HArray1OfReal.hxx>
#if DRAW
static Standard_Integer Affich = 0;

View File

@@ -0,0 +1,223 @@
// Created on: 1998-07-08
// 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 _GeomFill_LocationGuide_HeaderFile
#define _GeomFill_LocationGuide_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <TColgp_HArray2OfPnt2d.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Real.hxx>
#include <gp_Mat.hxx>
#include <math_Vector.hxx>
#include <GeomFill_PipeError.hxx>
#include <GeomFill_LocationLaw.hxx>
#include <TColgp_Array1OfPnt2d.hxx>
#include <TColgp_Array1OfVec2d.hxx>
#include <GeomAbs_Shape.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <TColgp_HArray1OfPnt2d.hxx>
class GeomFill_TrihedronWithGuide;
class GeomFill_SectionLaw;
class Adaptor3d_HCurve;
class Standard_NotImplemented;
class Standard_ConstructionError;
class Standard_OutOfRange;
class gp_Mat;
class GeomFill_LocationLaw;
class gp_Vec;
class gp_Pnt;
class Geom_Curve;
class GeomFill_LocationGuide;
DEFINE_STANDARD_HANDLE(GeomFill_LocationGuide, GeomFill_LocationLaw)
class GeomFill_LocationGuide : public GeomFill_LocationLaw
{
public:
Standard_EXPORT GeomFill_LocationGuide(const Handle(GeomFill_TrihedronWithGuide)& Triedre);
Standard_EXPORT void Set (const Handle(GeomFill_SectionLaw)& Section, const Standard_Boolean rotat, const Standard_Real SFirst, const Standard_Real SLast, const Standard_Real PrecAngle, Standard_Real& LastAngle);
Standard_EXPORT void EraseRotation();
Standard_EXPORT virtual void SetCurve (const Handle(Adaptor3d_HCurve)& C) Standard_OVERRIDE;
Standard_EXPORT virtual const Handle(Adaptor3d_HCurve)& GetCurve() const Standard_OVERRIDE;
Standard_EXPORT virtual void SetTrsf (const gp_Mat& Transfo) Standard_OVERRIDE;
Standard_EXPORT virtual Handle(GeomFill_LocationLaw) Copy() const Standard_OVERRIDE;
//! compute Location
Standard_EXPORT virtual Standard_Boolean D0 (const Standard_Real Param, gp_Mat& M, gp_Vec& V) Standard_OVERRIDE;
//! compute Location and 2d points
Standard_EXPORT virtual Standard_Boolean D0 (const Standard_Real Param, gp_Mat& M, gp_Vec& V, TColgp_Array1OfPnt2d& Poles2d) Standard_OVERRIDE;
//! compute location 2d points and associated
//! first derivatives.
//! Warning : It used only for C1 or C2 aproximation
Standard_EXPORT virtual Standard_Boolean D1 (const Standard_Real Param, gp_Mat& M, gp_Vec& V, gp_Mat& DM, gp_Vec& DV, TColgp_Array1OfPnt2d& Poles2d, TColgp_Array1OfVec2d& DPoles2d) Standard_OVERRIDE;
//! compute location 2d points and associated
//! first and seconde derivatives.
//! Warning : It used only for C2 aproximation
Standard_EXPORT virtual Standard_Boolean D2 (const Standard_Real Param, gp_Mat& M, gp_Vec& V, gp_Mat& DM, gp_Vec& DV, gp_Mat& D2M, gp_Vec& D2V, TColgp_Array1OfPnt2d& Poles2d, TColgp_Array1OfVec2d& DPoles2d, TColgp_Array1OfVec2d& D2Poles2d) Standard_OVERRIDE;
//! Say if the first restriction is defined in this class.
//! If it is true the first element of poles array in
//! D0,D1,D2... Correspond to this restriction.
//! Returns Standard_False (default implementation)
Standard_EXPORT virtual Standard_Boolean HasFirstRestriction() const Standard_OVERRIDE;
//! Say if the last restriction is defined in this class.
//! If it is true the last element of poles array in
//! D0,D1,D2... Correspond to this restriction.
//! Returns Standard_False (default implementation)
Standard_EXPORT virtual Standard_Boolean HasLastRestriction() const Standard_OVERRIDE;
//! Give the number of trace (Curves 2d wich are not restriction)
//! Returns 1 (default implementation)
Standard_EXPORT virtual Standard_Integer TraceNumber() const Standard_OVERRIDE;
//! Give a status to the Law
//! Returns PipeOk (default implementation)
Standard_EXPORT virtual GeomFill_PipeError ErrorStatus() const Standard_OVERRIDE;
//! Returns the number of intervals for continuity
//! <S>.
//! May be one if Continuity(me) >= <S>
Standard_EXPORT virtual Standard_Integer NbIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE;
//! Stores in <T> the parameters bounding the intervals
//! of continuity <S>.
//!
//! The array must provide enough room to accomodate
//! for the parameters. i.e. T.Length() > NbIntervals()
Standard_EXPORT virtual void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE;
//! Sets the bounds of the parametric interval on
//! the function
//! This determines the derivatives in these values if the
//! function is not Cn.
Standard_EXPORT virtual void SetInterval (const Standard_Real First, const Standard_Real Last) Standard_OVERRIDE;
//! Gets the bounds of the parametric interval on
//! the function
Standard_EXPORT virtual void GetInterval (Standard_Real& First, Standard_Real& Last) const Standard_OVERRIDE;
//! Gets the bounds of the function parametric domain.
//! Warning: This domain it is not modified by the
//! SetValue method
Standard_EXPORT virtual void GetDomain (Standard_Real& First, Standard_Real& Last) const Standard_OVERRIDE;
//! Is usefull, if (me) have to run numerical
//! algorithm to perform D0, D1 or D2
//! The default implementation make nothing.
Standard_EXPORT virtual void SetTolerance (const Standard_Real Tol3d, const Standard_Real Tol2d) Standard_OVERRIDE;
//! Returns the resolutions in the sub-space 2d <Index>
//! This information is usfull to find an good tolerance in
//! 2d approximation.
//! Warning: Used only if Nb2dCurve > 0
Standard_EXPORT virtual void Resolution (const Standard_Integer Index, const Standard_Real Tol, Standard_Real& TolU, Standard_Real& TolV) const Standard_OVERRIDE;
//! Get the maximum Norm of the matrix-location part. It
//! is usful to find an good Tolerance to approx M(t).
Standard_EXPORT virtual Standard_Real GetMaximalNorm() Standard_OVERRIDE;
//! Get average value of M(t) and V(t) it is usfull to
//! make fast approximation of rational surfaces.
Standard_EXPORT virtual void GetAverageLaw (gp_Mat& AM, gp_Vec& AV) Standard_OVERRIDE;
//! Say if the Location Law, is an translation of Location
//! The default implementation is " returns False ".
Standard_EXPORT virtual Standard_Boolean IsTranslation (Standard_Real& Error) const Standard_OVERRIDE;
//! Say if the Location Law, is a rotation of Location
//! The default implementation is " returns False ".
Standard_EXPORT virtual Standard_Boolean IsRotation (Standard_Real& Error) const Standard_OVERRIDE;
Standard_EXPORT virtual void Rotation (gp_Pnt& Center) const Standard_OVERRIDE;
Standard_EXPORT Handle(Geom_Curve) Section() const;
Standard_EXPORT Handle(Adaptor3d_HCurve) Guide() const;
Standard_EXPORT void SetOrigine (const Standard_Real Param1, const Standard_Real Param2);
Standard_EXPORT GeomFill_PipeError ComputeAutomaticLaw (Handle(TColgp_HArray1OfPnt2d)& ParAndRad) const;
DEFINE_STANDARD_RTTI(GeomFill_LocationGuide,GeomFill_LocationLaw)
protected:
Handle(TColgp_HArray2OfPnt2d) myPoles2d;
private:
Standard_EXPORT void SetRotation (const Standard_Real PrecAngle, Standard_Real& LastAngle);
Standard_EXPORT void InitX (const Standard_Real Param) const;
Handle(GeomFill_TrihedronWithGuide) myLaw;
Handle(GeomFill_SectionLaw) mySec;
Handle(Adaptor3d_HCurve) myCurve;
Handle(Adaptor3d_HCurve) myGuide;
Handle(Adaptor3d_HCurve) myTrimmed;
Standard_Integer myNbPts;
Standard_Boolean rotation;
Standard_Real OrigParam1;
Standard_Real OrigParam2;
Standard_Real Uf;
Standard_Real Ul;
Standard_Real myFirstS;
Standard_Real myLastS;
Standard_Real ratio;
Standard_Boolean WithTrans;
gp_Mat Trans;
math_Vector TolRes;
math_Vector Inf;
math_Vector Sup;
math_Vector X;
math_Vector R;
GeomFill_PipeError myStatus;
};
#endif // _GeomFill_LocationGuide_HeaderFile

Some files were not shown because too many files have changed in this diff Show More