From: jfa Date: Fri, 18 Nov 2011 10:05:38 +0000 (+0000) Subject: Mantis issue 0021423: MakeScaleAlongAxes does not work. Temporary patch. X-Git-Tag: V6_4_0rc1~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b10205a4d940e427ed4ce3b074f97eefaf719923;p=modules%2Fgeom.git Mantis issue 0021423: MakeScaleAlongAxes does not work. Temporary patch. --- diff --git a/src/GEOMImpl/BRepBuilderAPI_GTransform_21423.cxx b/src/GEOMImpl/BRepBuilderAPI_GTransform_21423.cxx new file mode 100755 index 000000000..43b5797fb --- /dev/null +++ b/src/GEOMImpl/BRepBuilderAPI_GTransform_21423.cxx @@ -0,0 +1,111 @@ +// File: BRepBuilderAPI_GTransform_21423.cxx +// Created: Mon Dec 30 17:12:14 1996 +// Author: Stagiaire Mary FABIEN +// + +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include + +//======================================================================= +//function : BRepBuilderAPI_GTransform_21423 +//purpose : +//======================================================================= + +BRepBuilderAPI_GTransform_21423::BRepBuilderAPI_GTransform_21423 (const gp_GTrsf& T) : + myGTrsf(T) +{ + myModification = new BRepTools_GTrsfModification(T); +} + + +//======================================================================= +//function : BRepBuilderAPI_GTransform_21423 +//purpose : +//======================================================================= + +BRepBuilderAPI_GTransform_21423::BRepBuilderAPI_GTransform_21423 (const TopoDS_Shape& S, + const gp_GTrsf& T, + const Standard_Boolean Copy) : + myGTrsf(T) +{ + myModification = new BRepTools_GTrsfModification(T); + Perform(S,Copy); +} + + + +//======================================================================= +//function : Perform +//purpose : +//======================================================================= + +void BRepBuilderAPI_GTransform_21423::Perform(const TopoDS_Shape& S, + const Standard_Boolean Copy) +{ + BRepBuilderAPI_NurbsConvert_21423 nc; + nc.Perform(S, Copy); + myHist.Add(S,nc); + TopoDS_Shape Slocal = nc.Shape(); + Handle(BRepTools_GTrsfModification) theModif = + Handle(BRepTools_GTrsfModification)::DownCast(myModification); + theModif->GTrsf() = myGTrsf; + DoModif(Slocal,myModification); +// myHist.Filter (Shape()); +} + + +//======================================================================= +//function : Modified +//purpose : +//======================================================================= + +const TopTools_ListOfShape& BRepBuilderAPI_GTransform_21423::Modified + (const TopoDS_Shape& F) +{ + myGenerated.Clear(); + const TopTools_DataMapOfShapeListOfShape& M = myHist.Modification(); + if (M.IsBound(F)) { + TopTools_ListOfShape Li; + TopTools_ListIteratorOfListOfShape itL(M(F)); + for (;itL.More();itL.Next()) + Li.Assign(BRepBuilderAPI_ModifyShape_21423::Modified(itL.Value())); + } + return myGenerated; +} + + +//======================================================================= +//function : ModifiedShape +//purpose : +//======================================================================= + +const TopoDS_Shape& BRepBuilderAPI_GTransform_21423::ModifiedShape + (const TopoDS_Shape& S) const +{ + const TopTools_DataMapOfShapeListOfShape &aMapModif = myHist.Modification(); + TopoDS_Shape aShape = S; + + if (aMapModif.IsBound(S)) { + const TopTools_ListOfShape &aListModShape = aMapModif(S); + Standard_Integer aNbShapes = aListModShape.Extent(); + + if (aNbShapes > 0) + aShape = aListModShape.First(); + } + + return BRepBuilderAPI_ModifyShape_21423::ModifiedShape(aShape); +} + diff --git a/src/GEOMImpl/BRepBuilderAPI_GTransform_21423.hxx b/src/GEOMImpl/BRepBuilderAPI_GTransform_21423.hxx new file mode 100644 index 000000000..06194aadd --- /dev/null +++ b/src/GEOMImpl/BRepBuilderAPI_GTransform_21423.hxx @@ -0,0 +1,137 @@ +// This file is generated by WOK (CPPExt). +// Please do not edit this file; modify original file instead. +// The copyright and license terms as defined for the original file apply to +// this header file considered to be the "object code" form of the original source. + +#ifndef _BRepBuilderAPI_GTransform_21423_HeaderFile +#define _BRepBuilderAPI_GTransform_21423_HeaderFile + +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_Macro_HeaderFile +#include +#endif + +#ifndef _gp_GTrsf_HeaderFile +#include +#endif +#ifndef _Standard_Boolean_HeaderFile +#include +#endif +#ifndef _BRepBuilderAPI_Collect_HeaderFile +#include +#endif +#ifndef _BRepBuilderAPI_ModifyShape_21423_HeaderFile +#include +#endif +class Standard_NoSuchObject; +class gp_GTrsf; +class TopoDS_Shape; +class TopTools_ListOfShape; + + +//! Geometric transformation on a shape.
+//! The transformation to be applied is defined as a gp_GTrsf
+//! transformation. It may be:
+//! - a transformation equivalent to a gp_Trsf transformation, the
+//! most common case: you should , however, use a BRepAPI_Transform
+//! object to perform this kind of transformation; or
+//! - an affinity, or
+//! - more generally, any type of point transformation which may
+//! be defined by a three row, four column matrix of transformation.
+//! In the last two cases, the underlying geometry of the
+//! following shapes may change:
+//! - a curve which supports an edge of the shape, or
+//! - a surface which supports a face of the shape;
+//! For example, a circle may be transformed into an ellipse when
+//! applying an affinity transformation.
+//! The transformation is applied to:
+//! - all the curves which support edges of the shape, and
+//! - all the surfaces which support faces of the shape.
+//! A GTransform object provides a framework for:
+//! - defining the geometric transformation to be applied,
+//! - implementing the transformation algorithm, and
+//! - consulting the result.
+class BRepBuilderAPI_GTransform_21423 : public BRepBuilderAPI_ModifyShape_21423 { +public: + + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + //! Constructs a framework for applying the geometric
+//! transformation T to a shape. Use the function
+//! Perform to define the shape to transform.
+ Standard_EXPORT BRepBuilderAPI_GTransform_21423(const gp_GTrsf& T); + //! Constructs a framework for applying the geometric
+//! transformation T to a shape, and applies it to the shape S.
+//! - If the transformation T is direct and isometric (i.e. if
+//! the determinant of the vectorial part of T is equal to
+//! 1.), and if Copy equals false (default value), the
+//! resulting shape is the same as the original but with
+//! a new location assigned to it.
+//! - In all other cases, the transformation is applied to
+//! a duplicate of S.
+//! Use the function Shape to access the result.
+//! Note: the constructed framework can be reused to
+//! apply the same geometric transformation to other
+//! shapes: just specify them with the function Perform.
+ Standard_EXPORT BRepBuilderAPI_GTransform_21423(const TopoDS_Shape& S,const gp_GTrsf& T,const Standard_Boolean Copy = Standard_False); + //! Applies the geometric transformation defined at the
+//! time of construction of this framework to the shape S.
+//! - If the transformation T is direct and isometric (i.e. if
+//! the determinant of the vectorial part of T is equal to
+//! 1.), and if Copy equals false (default value), the
+//! resulting shape is the same as the original but with
+//! a new location assigned to it.
+//! - In all other cases, the transformation is applied to a duplicate of S.
+//! Use the function Shape to access the result.
+//! Note: this framework can be reused to apply the same
+//! geometric transformation to other shapes: just specify
+//! them by calling the function Perform again.
+ Standard_EXPORT void Perform(const TopoDS_Shape& S,const Standard_Boolean Copy = Standard_False) ; + //! Returns the list of shapes modified from the shape
+//! .
+ Standard_EXPORT virtual const TopTools_ListOfShape& Modified(const TopoDS_Shape& S) ; + //! Returns the modified shape corresponding to .
+ Standard_EXPORT virtual const TopoDS_Shape& ModifiedShape(const TopoDS_Shape& S) const; + + + + + +protected: + + + + + +private: + + + +gp_GTrsf myGTrsf; +Standard_Boolean myUseModif; +BRepBuilderAPI_Collect myHist; + + +}; + + + + + +// other Inline functions and methods (like "C++: function call" methods) + + +#endif diff --git a/src/GEOMImpl/BRepBuilderAPI_ModifyShape_21423.cxx b/src/GEOMImpl/BRepBuilderAPI_ModifyShape_21423.cxx new file mode 100755 index 000000000..bdd93976f --- /dev/null +++ b/src/GEOMImpl/BRepBuilderAPI_ModifyShape_21423.cxx @@ -0,0 +1,144 @@ +// File: BRepBuilderAPI_ModifyShape_21423.cxx +// Created: Fri Dec 2 10:37:08 1994 +// Author: Jacques GOUSSARD +// + +#include + +#include + +#include +#include + +#include +#include + +//======================================================================= +//function : BRepBuilderAPI_ModifyShape_21423 +//purpose : +//======================================================================= + +BRepBuilderAPI_ModifyShape_21423::BRepBuilderAPI_ModifyShape_21423 () {} + +//======================================================================= +//function : BRepBuilderAPI_ModifyShape_21423 +//purpose : +//======================================================================= + +BRepBuilderAPI_ModifyShape_21423::BRepBuilderAPI_ModifyShape_21423 (const TopoDS_Shape& S): + myModifier(S), myInitialShape(S) +{} + + +//======================================================================= +//function : BRepBuilderAPI_ModifyShape_21423 +//purpose : +//======================================================================= + +BRepBuilderAPI_ModifyShape_21423::BRepBuilderAPI_ModifyShape_21423 + (const Handle(BRepTools_Modification)& M) +{ + myModification = M; +} + + +//======================================================================= +//function : BRepBuilderAPI_ModifyShape_21423 +//purpose : +//======================================================================= + +BRepBuilderAPI_ModifyShape_21423::BRepBuilderAPI_ModifyShape_21423 + (const TopoDS_Shape& S, + const Handle(BRepTools_Modification)& M): myModifier(S),myInitialShape(S) +{ + myModification = M; + DoModif(); +} + + +//======================================================================= +//function : DoModif +//purpose : +//======================================================================= + +void BRepBuilderAPI_ModifyShape_21423::DoModif () +{ + if (myInitialShape.IsNull() || myModification.IsNull()) { + Standard_NullObject::Raise(); + } + myModifier.Perform(myModification); + if (myModifier.IsDone()) { + Done(); + myShape = myModifier.ModifiedShape(myInitialShape); + } + else { + NotDone(); + } +} + + +//======================================================================= +//function : DoModif +//purpose : +//======================================================================= + +void BRepBuilderAPI_ModifyShape_21423::DoModif (const TopoDS_Shape& S) +{ + if (!S.IsEqual(myInitialShape) || !IsDone()) { + myInitialShape = S; + myModifier.Init(S); + DoModif(); + } +} + + +//======================================================================= +//function : DoModif +//purpose : +//======================================================================= + +void BRepBuilderAPI_ModifyShape_21423::DoModif (const Handle(BRepTools_Modification)& M) +{ + myModification = M; + DoModif(); +} + + +//======================================================================= +//function : DoModif +//purpose : +//======================================================================= + +void BRepBuilderAPI_ModifyShape_21423::DoModif (const TopoDS_Shape& S, + const Handle(BRepTools_Modification)& M) +{ + myInitialShape = S; + myModifier.Init(S); + myModification = M; + DoModif(); +} + + +//======================================================================= +//function : ModifiedShape +//purpose : +//======================================================================= + +const TopoDS_Shape& BRepBuilderAPI_ModifyShape_21423::ModifiedShape + (const TopoDS_Shape& S) const +{ + return myModifier.ModifiedShape(S); +} + +//======================================================================= +//function : Modified +//purpose : +//======================================================================= + +const TopTools_ListOfShape& BRepBuilderAPI_ModifyShape_21423::Modified + (const TopoDS_Shape& F) +{ + myGenerated.Clear(); + myGenerated.Append(myModifier.ModifiedShape(F)); + return myGenerated; +} diff --git a/src/GEOMImpl/BRepBuilderAPI_ModifyShape_21423.hxx b/src/GEOMImpl/BRepBuilderAPI_ModifyShape_21423.hxx new file mode 100644 index 000000000..b631347f2 --- /dev/null +++ b/src/GEOMImpl/BRepBuilderAPI_ModifyShape_21423.hxx @@ -0,0 +1,129 @@ +// This file is generated by WOK (CPPExt). +// Please do not edit this file; modify original file instead. +// The copyright and license terms as defined for the original file apply to +// this header file considered to be the "object code" form of the original source. + +#ifndef _BRepBuilderAPI_ModifyShape_21423_HeaderFile +#define _BRepBuilderAPI_ModifyShape_21423_HeaderFile + +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_Macro_HeaderFile +#include +#endif + +#ifndef _BRepTools_Modifier_21423_HeaderFile +#include +#endif +#ifndef _TopoDS_Shape_HeaderFile +#include +#endif +#ifndef _Handle_BRepTools_Modification_HeaderFile +#include +#endif +#ifndef _BRepBuilderAPI_MakeShape_HeaderFile +#include +#endif +class BRepTools_Modification; +class Standard_NullObject; +class Standard_NoSuchObject; +class TopoDS_Shape; +class TopTools_ListOfShape; + + +//! Implements the methods of MakeShape for the
+//! constant topology modifications. The methods are
+//! implemented when the modification uses a Modifier
+//! from BRepTools. Some of them have to be redefined
+//! if the modification is implemented with another
+//! tool (see Transform from BRepBuilderAPI for example).
+//! The BRepBuilderAPI package provides the following
+//! frameworks to perform modifications of this sort:
+//! - BRepBuilderAPI_Copy to produce the copy of a shape,
+//! - BRepBuilderAPI_Transform and
+//! BRepBuilderAPI_GTransform to apply a geometric
+//! transformation to a shape,
+//! - BRepBuilderAPI_NurbsConvert_21423 to convert the
+//! whole geometry of a shape into NURBS geometry,
+//! - BRepOffsetAPI_DraftAngle to build a tapered shape.
+class BRepBuilderAPI_ModifyShape_21423 : public BRepBuilderAPI_MakeShape { +public: + + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + //! Returns the list of shapes modified from the shape
+//! .
+ Standard_EXPORT virtual const TopTools_ListOfShape& Modified(const TopoDS_Shape& S) ; + //! Returns the modified shape corresponding to .
+//! S can correspond to the entire initial shape or to its subshape.
+//! Exceptions
+//! Standard_NoSuchObject if S is not the initial shape or
+//! a subshape of the initial shape to which the
+//! transformation has been applied. Raises NoSuchObject from Standard
+//! if S is not the initial shape or a sub-shape
+//! of the initial shape.
+ Standard_EXPORT virtual const TopoDS_Shape& ModifiedShape(const TopoDS_Shape& S) const; + + + + + +protected: + + //! Empty constructor.
+ Standard_EXPORT BRepBuilderAPI_ModifyShape_21423(); + //! Initializes the modifier with the Shape , and
+//! set the field to .
+ Standard_EXPORT BRepBuilderAPI_ModifyShape_21423(const TopoDS_Shape& S); + //! Set the field with .
+ Standard_EXPORT BRepBuilderAPI_ModifyShape_21423(const Handle(BRepTools_Modification)& M); + //! Initializes the modifier with the Shape , and
+//! set the field to , and set the
+//! field with , the performs the
+//! modification.
+ Standard_EXPORT BRepBuilderAPI_ModifyShape_21423(const TopoDS_Shape& S,const Handle(BRepTools_Modification)& M); + //! Performs the previously given modification on the
+//! shape .
+ Standard_EXPORT void DoModif(const TopoDS_Shape& S) ; + //! Performs the modification on a previously
+//! given shape.
+ Standard_EXPORT void DoModif(const Handle(BRepTools_Modification)& M) ; + //! Performs the modification on the shape .
+ Standard_EXPORT void DoModif(const TopoDS_Shape& S,const Handle(BRepTools_Modification)& M) ; + + +BRepTools_Modifier_21423 myModifier; +TopoDS_Shape myInitialShape; +Handle_BRepTools_Modification myModification; + + +private: + + + Standard_EXPORT void DoModif() ; + + + + +}; + + + + + +// other Inline functions and methods (like "C++: function call" methods) + + +#endif diff --git a/src/GEOMImpl/BRepBuilderAPI_NurbsConvert_21423.cxx b/src/GEOMImpl/BRepBuilderAPI_NurbsConvert_21423.cxx new file mode 100755 index 000000000..a1e6f93a7 --- /dev/null +++ b/src/GEOMImpl/BRepBuilderAPI_NurbsConvert_21423.cxx @@ -0,0 +1,58 @@ +// File: BRepBuilderAPI_NurbsConvert_21423.cxx +// Created: Fri Dec 9 09:14:55 1994 +// Author: Jacques GOUSSARD +// + +#include + +#include + +#include +#include +#include +#include +#include +#include +#include + +#include + +//======================================================================= +//function : BRepBuilderAPI_NurbsConvert_21423 +//purpose : +//======================================================================= + +BRepBuilderAPI_NurbsConvert_21423::BRepBuilderAPI_NurbsConvert_21423 () + +{ + myModification = new BRepTools_NurbsConvertModification_21423(); +} + +//======================================================================= +//function : BRepBuilderAPI_NurbsConvert_21423 +//purpose : +//======================================================================= + +BRepBuilderAPI_NurbsConvert_21423::BRepBuilderAPI_NurbsConvert_21423 (const TopoDS_Shape& S, + const Standard_Boolean Copy) + +{ + myModification = new BRepTools_NurbsConvertModification_21423(); + Perform(S,Copy); +} + +//======================================================================= +//function : Perform +//purpose : +//======================================================================= + +void BRepBuilderAPI_NurbsConvert_21423::Perform(const TopoDS_Shape& S, + const Standard_Boolean Copy) +{ + Handle(BRepTools_NurbsConvertModification_21423) theModif = + Handle(BRepTools_NurbsConvertModification_21423)::DownCast(myModification); + DoModif(S,myModification); +} + + + diff --git a/src/GEOMImpl/BRepBuilderAPI_NurbsConvert_21423.hxx b/src/GEOMImpl/BRepBuilderAPI_NurbsConvert_21423.hxx new file mode 100644 index 000000000..ae19c94b9 --- /dev/null +++ b/src/GEOMImpl/BRepBuilderAPI_NurbsConvert_21423.hxx @@ -0,0 +1,95 @@ +// This file is generated by WOK (CPPExt). +// Please do not edit this file; modify original file instead. +// The copyright and license terms as defined for the original file apply to +// this header file considered to be the "object code" form of the original source. + +#ifndef _BRepBuilderAPI_NurbsConvert_21423_HeaderFile +#define _BRepBuilderAPI_NurbsConvert_21423_HeaderFile + +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_Macro_HeaderFile +#include +#endif + +#ifndef _BRepBuilderAPI_ModifyShape_21423_HeaderFile +#include +#endif +#ifndef _Standard_Boolean_HeaderFile +#include +#endif +class TopoDS_Shape; + + +//! Conversion of the complete geometry of a shape into
+//! NURBS geometry. For example, all curves supporting
+//! edges of the basis shape are converted into BSpline
+//! curves, and all surfaces supporting its faces are
+//! converted into BSpline surfaces.
+class BRepBuilderAPI_NurbsConvert_21423 : public BRepBuilderAPI_ModifyShape_21423 { +public: + + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + //! Constructs a framework for converting the geometry of a
+//! shape into NURBS geometry. Use the function Perform
+//! to define the shape to convert.
+ Standard_EXPORT BRepBuilderAPI_NurbsConvert_21423(); + //! Builds a new shape by converting the geometry of the
+//! shape S into NURBS geometry. Specifically, all curves
+//! supporting edges of S are converted into BSpline
+//! curves, and all surfaces supporting its faces are
+//! converted into BSpline surfaces.
+//! Use the function Shape to access the new shape.
+//! Note: the constructed framework can be reused to
+//! convert other shapes. You specify these with the
+//! function Perform.
+ Standard_EXPORT BRepBuilderAPI_NurbsConvert_21423(const TopoDS_Shape& S,const Standard_Boolean Copy = Standard_False); + //! Builds a new shape by converting the geometry of the
+//! shape S into NURBS geometry.
+//! Specifically, all curves supporting edges of S are
+//! converted into BSpline curves, and all surfaces
+//! supporting its faces are converted into BSpline surfaces.
+//! Use the function Shape to access the new shape.
+//! Note: this framework can be reused to convert other
+//! shapes: you specify them by calling the function Perform again.
+ Standard_EXPORT void Perform(const TopoDS_Shape& S,const Standard_Boolean Copy = Standard_False) ; + + + + + +protected: + + + + + +private: + + + + + +}; + + + + + +// other Inline functions and methods (like "C++: function call" methods) + + +#endif diff --git a/src/GEOMImpl/BRepTools_Modifier_21423.cxx b/src/GEOMImpl/BRepTools_Modifier_21423.cxx new file mode 100644 index 000000000..011fd8ac7 --- /dev/null +++ b/src/GEOMImpl/BRepTools_Modifier_21423.cxx @@ -0,0 +1,539 @@ +// File: BRepTools_Modifier_21423.cxx +// Created: Thu Aug 25 10:48:00 1994 +// Author: Jacques GOUSSARD +// + +// IFV 04.06.99 - PRO18974 - processing of INTERNAL shapes. + +#include + +//#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if 0 +#include +#include +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include + + + +//======================================================================= +//function : BRepTools_Modifier_21423 +//purpose : +//======================================================================= + +BRepTools_Modifier_21423::BRepTools_Modifier_21423 ():myDone(Standard_False) +{} + +//======================================================================= +//function : BRepTools_Modifier_21423 +//purpose : +//======================================================================= + +BRepTools_Modifier_21423::BRepTools_Modifier_21423 (const TopoDS_Shape& S) : + myShape(S),myDone(Standard_False) +{ + myMap.Clear(); + Put(S); +} + +//======================================================================= +//function : BRepTools_Modifier_21423 +//purpose : +//======================================================================= + +BRepTools_Modifier_21423::BRepTools_Modifier_21423 + (const TopoDS_Shape& S, + const Handle(BRepTools_Modification)& M) : myShape(S),myDone(Standard_False) +{ + myMap.Clear(); + Put(S); + Perform(M); +} + + +//======================================================================= +//function : Init +//purpose : +//======================================================================= + +void BRepTools_Modifier_21423::Init(const TopoDS_Shape& S) +{ + myShape = S; + myDone = Standard_False; + myMap.Clear(); + Put(S); +} + + +//======================================================================= +//function : Perform +//purpose : +//======================================================================= + +void BRepTools_Modifier_21423::Perform(const Handle(BRepTools_Modification)& M) +{ + if (myShape.IsNull()) { + Standard_NullObject::Raise(); + } + TopTools_DataMapIteratorOfDataMapOfShapeShape theIter(myMap); + + // Set to Null the value of shapes, in case when another modification is applied to the start shape. + + if (!theIter.Value().IsNull()) { + while (theIter.More()) { + myMap(theIter.Value()).Nullify(); + theIter.Next(); + } + theIter.Reset(); + } + + /* + while (theIter.More()) { + Rebuild(theIter.Key(),M); + theIter.Next(); + } + */ + + Rebuild(myShape, M, 0.); + + if (myShape.ShapeType() == TopAbs_FACE) { + if (myShape.Orientation() == TopAbs_REVERSED) { + myMap(myShape).Reverse(); + } + else{ + myMap(myShape).Orientation(myShape.Orientation()); + } + } + else { + myMap(myShape).Orientation(myShape.Orientation()); + } + + // Update the continuities + + TopTools_IndexedDataMapOfShapeListOfShape theEFMap; + TopExp::MapShapesAndAncestors(myShape,TopAbs_EDGE,TopAbs_FACE,theEFMap); + BRep_Builder B; + +/* + Standard_Boolean RecomputeTriangles = Standard_False; + Standard_Real MaxDeflection = RealFirst(); + Handle(Poly_Triangulation) Tr; + Handle(Poly_Polygon3D) Po; + TopLoc_Location Loc; +*/ + + while (theIter.More()) { + const TopoDS_Shape& S = theIter.Key(); +/* + if (S.ShapeType() == TopAbs_FACE && !S.IsSame(theIter.Value())) { + Tr = BRep_Tool::Triangulation(TopoDS::Face(S),Loc); + if (!Tr.IsNull()) { + RecomputeTriangles = Standard_True; + MaxDeflection = Max(MaxDeflection,Tr->Deflection()); + } + } + else */ if (S.ShapeType() == TopAbs_EDGE && !S.IsSame(theIter.Value())) { + const TopoDS_Edge& edg = TopoDS::Edge(S); +/* + Po = BRep_Tool::Polygon3D(edg,Loc); + if (!Po.IsNull()) { + RecomputeTriangles = Standard_True; + MaxDeflection = Max(MaxDeflection,Po->Deflection()); + } +*/ + TopTools_ListIteratorOfListOfShape it; + it.Initialize(theEFMap.FindFromKey(edg)); + TopoDS_Face F1,F2; + while (it.More() && F2.IsNull()) { + if (F1.IsNull()) { + F1 = TopoDS::Face(it.Value()); + } + else { + F2 = TopoDS::Face(it.Value()); + } + it.Next(); + } + if (!F2.IsNull()) { + const TopoDS_Edge& newedg = TopoDS::Edge(myMap(edg)); + const TopoDS_Face& newf1 = TopoDS::Face(myMap(F1)); + const TopoDS_Face& newf2 = TopoDS::Face(myMap(F2)); + GeomAbs_Shape Newcont = M->Continuity(edg,F1,F2,newedg,newf1,newf2); + if (Newcont > GeomAbs_C0) { + B.Continuity(newedg,newf1,newf2,Newcont); + } + } + } + theIter.Next(); + } +/* + if (RecomputeTriangles) { + BRepMesh_IncrementalMesh(myMap(myShape),MaxDeflection); + } +*/ + + myDone = Standard_True; + +} + +//======================================================================= +//function : Put +//purpose : +//======================================================================= + +void BRepTools_Modifier_21423::Put(const TopoDS_Shape& S) +{ + if (!myMap.IsBound(S)) { + myMap.Bind(S,TopoDS_Shape()); + for(TopoDS_Iterator theIterator(S,Standard_False);theIterator.More();theIterator.Next()) { + + Put(theIterator.Value()); + } + } +} + +//======================================================================= +//function : Rebuild +//purpose : +//======================================================================= + +Standard_Boolean BRepTools_Modifier_21423::Rebuild + (const TopoDS_Shape& S, + const Handle(BRepTools_Modification)& M, + const Standard_Real Tol) +{ + TopoDS_Shape& result = myMap(S); +// if (!result.IsNull()) return ! S.IsEqual(result); + if (!result.IsNull()) return ! S.IsSame(result); + Standard_Boolean rebuild = Standard_False, RevWires = Standard_False; + TopAbs_Orientation ResOr = TopAbs_FORWARD; + BRep_Builder B; + Standard_Real tol = Tol; + Standard_Boolean No3DCurve = Standard_False; // en fait, si on n`a pas de + //modif geometry 3d , it is necessary to test the existence of a curve 3d. + + // new geometry ? + + TopAbs_ShapeEnum ts = S.ShapeType(); + switch (ts) { + case TopAbs_FACE: + { + Standard_Boolean RevFace; + Handle(Geom_Surface) surface; + TopLoc_Location location; + rebuild = M->NewSurface(TopoDS::Face(S),surface,location,tol, + RevWires,RevFace); + tol = Max(Tol,tol); //OCC217 + if (rebuild) { + B.MakeFace(TopoDS::Face(result),surface, + location.Predivided(S.Location()),tol); + result.Location(S.Location()); +// result.Orientation(S.Orientation()); + if (RevFace) { + ResOr = TopAbs_REVERSED; + } + // set specifics flags of a Face + B.NaturalRestriction(TopoDS::Face(result), + BRep_Tool::NaturalRestriction(TopoDS::Face(S))); + } + } + break; + + case TopAbs_EDGE: + { + Handle(Geom_Curve) curve; + TopLoc_Location location; + rebuild = M->NewCurve(TopoDS::Edge(S),curve,location,tol); + tol = Max(Tol,tol); //OCC217 + if (rebuild) { + if (curve.IsNull()) { + B.MakeEdge(TopoDS::Edge(result)); + B.Degenerated(TopoDS::Edge(result), + BRep_Tool::Degenerated(TopoDS::Edge(S))); + B.UpdateEdge(TopoDS::Edge(result),tol); //OCC217 + No3DCurve = Standard_True; + } + else { + B.MakeEdge(TopoDS::Edge(result),curve, + location.Predivided(S.Location()),tol); + No3DCurve = Standard_False; + } + result.Location(S.Location()); +// result.Orientation(S.Orientation()); + + // set specifics flags of an Edge + B.SameParameter(TopoDS::Edge(result), + BRep_Tool::SameParameter(TopoDS::Edge(S))); + B.SameRange(TopoDS::Edge(result), + BRep_Tool::SameRange(TopoDS::Edge(S))); + } + } + break; + + case TopAbs_VERTEX: + { + gp_Pnt vtx; + rebuild = M->NewPoint(TopoDS::Vertex(S),vtx,tol); + tol = Max(Tol, tol); //OCC217 + if (rebuild) { + B.MakeVertex(TopoDS::Vertex(result),vtx,tol); + } + } + break; + + default: + { + } + } + + // rebuild sub-shapes and test new sub-shape ? + + Standard_Boolean newgeom = rebuild; + + TopoDS_Iterator it; + + for (it.Initialize(S, Standard_False); it.More(); it.Next()) { + // always call Rebuild + Standard_Boolean subrebuilt = Rebuild(it.Value(), M, tol); + rebuild = subrebuilt || rebuild ; + } + + // make an empty copy + if (rebuild && !newgeom) { + result = S.EmptyCopied(); + result.Orientation(TopAbs_FORWARD); + } + + // copy the sub-elements + + if (rebuild) { + TopAbs_Orientation orient; + for (it.Initialize(S,Standard_False); it.More(); it.Next()) { + orient = it.Value().Orientation(); + if (RevWires || myMap(it.Value()).Orientation() == TopAbs_REVERSED) { + orient = TopAbs::Reverse(orient); + } + B.Add(result,myMap(it.Value()).Oriented(orient)); + } + + + if (ts == TopAbs_FACE) { + // pcurves + Handle(Geom2d_Curve) curve2d; //,curve2d1; + TopoDS_Face face = TopoDS::Face(S); + TopAbs_Orientation fcor = face.Orientation(); + if(fcor != TopAbs_REVERSED) fcor = TopAbs_FORWARD; + + TopExp_Explorer ex(face.Oriented(fcor),TopAbs_EDGE); + for (;ex.More(); ex.Next()) + { + const TopoDS_Edge& edge = TopoDS::Edge(ex.Current()); + + if (M->NewCurve2d(edge, face,TopoDS::Edge(myMap(ex.Current())), + TopoDS::Face(result),curve2d, tol)) + { + tol = Max(Tol,tol); //OCC217 + // rem dub 16/09/97 : Make constant topology or not make at all. + // Do not make if CopySurface = 1 + // Atention, TRUE sewing edges (RealyClosed) + // stay even if CopySurface is true. + + // check that edge contains two pcurves on this surface: + // either it is true seam on the current face, or belongs to two faces + // built on that same surface (see OCC21772) + // Note: this check could be made separate method in BRepTools + Standard_Boolean isClosed = Standard_False; + if(BRep_Tool::IsClosed(edge,face)) + { + isClosed = ( ! newgeom || BRepTools::IsReallyClosed(edge,face) ); + if ( ! isClosed ) + { + TopLoc_Location aLoc; + TopoDS_Shape resface = (myMap.IsBound(face) ? myMap(face) : face); + if(resface.IsNull()) + resface = face; + Handle(Geom_Surface) aSurf = BRep_Tool::Surface(TopoDS::Face(resface), aLoc); + // check other faces sharing the same surface + TopExp_Explorer aExpF(myShape,TopAbs_FACE); + for( ; aExpF.More() && !isClosed; aExpF.Next()) + { + TopoDS_Face anOther = TopoDS::Face(aExpF.Current()); + if(anOther.IsSame(face)) + continue; + TopoDS_Shape resface2 = (myMap.IsBound(anOther) ? myMap(anOther) : anOther); + if(resface2.IsNull()) + resface2 = anOther; + TopLoc_Location anOtherLoc; + Handle(Geom_Surface) anOtherSurf = + BRep_Tool::Surface(TopoDS::Face(resface2), anOtherLoc); + if ( aSurf == anOtherSurf && aLoc.IsEqual (anOtherLoc) ) + { + TopExp_Explorer aExpE(anOther,TopAbs_EDGE); + for( ; aExpE.More() && !isClosed ; aExpE.Next()) + isClosed = edge.IsSame(aExpE.Current()); + } + } + } + } + if (isClosed) + { + TopoDS_Edge CurE = TopoDS::Edge(myMap(edge)); + TopoDS_Shape aLocalResult = result; + aLocalResult.Orientation(TopAbs_FORWARD); + TopoDS_Face CurF = TopoDS::Face(aLocalResult); + Handle(Geom2d_Curve) curve2d1, currcurv; + Standard_Real f,l; + if ((!RevWires && fcor != edge.Orientation()) || + ( RevWires && fcor == edge.Orientation())) { + CurE.Orientation(TopAbs_FORWARD); + curve2d1 = BRep_Tool::CurveOnSurface(CurE,CurF,f,l); + if (curve2d1.IsNull()) curve2d1 = new Geom2d_Line(gp::OX2d()); + B.UpdateEdge (CurE, curve2d1, curve2d, CurF, tol); + } + else { + CurE.Orientation(TopAbs_REVERSED); + curve2d1 = BRep_Tool::CurveOnSurface(CurE,CurF,f,l); + if (curve2d1.IsNull()) curve2d1 = new Geom2d_Line(gp::OX2d()); + B.UpdateEdge (CurE, curve2d, curve2d1, CurF, tol); + } + currcurv = BRep_Tool::CurveOnSurface(edge,face,f,l); + B.Range(edge,f,l); + } + else { + B.UpdateEdge(TopoDS::Edge(myMap(ex.Current())), + curve2d, + TopoDS::Face(result), tol); + } + + TopLoc_Location theLoc; + Standard_Real theF,theL; + Handle(Geom_Curve) C3D = + BRep_Tool::Curve(TopoDS::Edge(myMap(ex.Current())), + theLoc,theF,theL); + if (C3D.IsNull()) { // Update vertices + Standard_Real param; + TopExp_Explorer ex2(edge,TopAbs_VERTEX); + while (ex2.More()) { + const TopoDS_Vertex& vertex = TopoDS::Vertex(ex2.Current()); + if (!M->NewParameter(vertex, edge, param, tol)) { + //tol = BRep_Tool::Tolerance(vertex); + tol = Max(Tol, BRep_Tool::Tolerance(vertex)); //OCC217 + param = BRep_Tool::Parameter(vertex,edge); + } + + TopAbs_Orientation vtxrelat = vertex.Orientation(); + if (edge.Orientation() == TopAbs_REVERSED) { + // Update considere l'edge FORWARD, et le vertex en relatif + vtxrelat= TopAbs::Reverse(vtxrelat); + } +// if (myMap(edge).Orientation() == TopAbs_REVERSED) { +// vtxrelat= TopAbs::Reverse(vtxrelat); +// } + TopoDS_Vertex aLocalVertex = TopoDS::Vertex(myMap(vertex)); + aLocalVertex.Orientation(vtxrelat); +// B.UpdateVertex(TopoDS::Vertex +// (myMap(vertex).Oriented(vtxrelat)), + B.UpdateVertex(aLocalVertex, + param, + TopoDS::Edge(myMap(edge)), + tol); + ex2.Next(); + } + } + + } + } + + } + +// else if (ts == TopAbs_EDGE) { + else if (ts == TopAbs_EDGE && !No3DCurve) { + // Vertices + Standard_Real param; + const TopoDS_Edge& edge = TopoDS::Edge(S); + TopAbs_Orientation edor = edge.Orientation(); + if(edor != TopAbs_REVERSED) edor = TopAbs_FORWARD; + TopExp_Explorer ex(edge.Oriented(edor), TopAbs_VERTEX); + while (ex.More()) { + const TopoDS_Vertex& vertex = TopoDS::Vertex(ex.Current()); + + if (!M->NewParameter(vertex, edge, param, tol)) { + //tol = BRep_Tool::Tolerance(vertex); + tol = Max(Tol, BRep_Tool::Tolerance(vertex)); //OCC217 + param = BRep_Tool::Parameter(vertex,edge); + } + + + TopAbs_Orientation vtxrelat = vertex.Orientation(); + if (edor == TopAbs_REVERSED) { + // Update considere l'edge FORWARD, et le vertex en relatif + vtxrelat= TopAbs::Reverse(vtxrelat); + } +// if (result.Orientation() == TopAbs_REVERSED) { +// vtxrelat= TopAbs::Reverse(vtxrelat); +// } + TopoDS_Vertex aLocalVertex = TopoDS::Vertex(myMap(vertex)); + aLocalVertex.Orientation(vtxrelat); +// B.UpdateVertex(TopoDS::Vertex +// (myMap(vertex).Oriented(vtxrelat)), + B.UpdateVertex(aLocalVertex, + param, + TopoDS::Edge(result), + tol); + + ex.Next(); + } + + } + + // update flags + + result.Orientable(S.Orientable()); + result.Closed(S.Closed()); + result.Infinite(S.Infinite()); + } + else + result = S; + + // Set flag of the shape. + result.Orientation(ResOr); + + result.Free (S.Free()); + result.Modified (S.Modified()); + result.Checked (S.Checked()); + result.Orientable(S.Orientable()); + result.Closed (S.Closed()); + result.Infinite (S.Infinite()); + result.Convex (S.Convex()); + + return rebuild; +} diff --git a/src/GEOMImpl/BRepTools_Modifier_21423.hxx b/src/GEOMImpl/BRepTools_Modifier_21423.hxx new file mode 100644 index 000000000..b0c81cea1 --- /dev/null +++ b/src/GEOMImpl/BRepTools_Modifier_21423.hxx @@ -0,0 +1,118 @@ +// This file is generated by WOK (CPPExt). +// Please do not edit this file; modify original file instead. +// The copyright and license terms as defined for the original file apply to +// this header file considered to be the "object code" form of the original source. + +#ifndef _BRepTools_Modifier_21423_HeaderFile +#define _BRepTools_Modifier_21423_HeaderFile + +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_Macro_HeaderFile +#include +#endif + +#ifndef _TopTools_DataMapOfShapeShape_HeaderFile +#include +#endif +#ifndef _TopoDS_Shape_HeaderFile +#include +#endif +#ifndef _Standard_Boolean_HeaderFile +#include +#endif +#ifndef _Handle_BRepTools_Modification_HeaderFile +#include +#endif + +#include + +class Standard_NullObject; +class TopoDS_Shape; +class BRepTools_Modification; + +class BRepTools_Modifier_21423 { +public: + + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + //! Creates an empty Modifier.
+ Standard_EXPORT BRepTools_Modifier_21423(); + //! Creates a modifier on the shape .
+ Standard_EXPORT BRepTools_Modifier_21423(const TopoDS_Shape& S); + //! Creates a modifier on the shape , and performs
+//! the modifications described by .
+ Standard_EXPORT BRepTools_Modifier_21423(const TopoDS_Shape& S,const Handle(BRepTools_Modification)& M); + //! Initializes the modifier with the shape .
+ Standard_EXPORT void Init(const TopoDS_Shape& S) ; + //! Performs the modifications described by .
+ Standard_EXPORT void Perform(const Handle(BRepTools_Modification)& M) ; + //! Returns Standard_True if the modification has
+//! been computed successfully.
+//!
+ Standard_Boolean IsDone() const; + //! Returns the modified shape corresponding to .
+ const TopoDS_Shape& ModifiedShape(const TopoDS_Shape& S) const; + + + + + +protected: + + + + + +private: + + + Standard_EXPORT void Put(const TopoDS_Shape& S) ; + + Standard_EXPORT Standard_Boolean Rebuild (const TopoDS_Shape& S, + const Handle(BRepTools_Modification)& M, + const Standard_Real Tolerance); + + +TopTools_DataMapOfShapeShape myMap; +TopoDS_Shape myShape; +Standard_Boolean myDone; + + +}; + +//======================================================================= +//function : ModifiedShape +//purpose : +//======================================================================= +inline const TopoDS_Shape& BRepTools_Modifier_21423::ModifiedShape + (const TopoDS_Shape& S) const +{ + if (!myMap.IsBound(S)) { Standard_NoSuchObject::Raise();} + return myMap(S); +} + +//======================================================================= +//function : IsDone +//purpose : +//======================================================================= +inline Standard_Boolean BRepTools_Modifier_21423::IsDone () const +{ + return myDone; +} + +// other Inline functions and methods (like "C++: function call" methods) + +#endif diff --git a/src/GEOMImpl/BRepTools_NurbsConvertModification_21423.cxx b/src/GEOMImpl/BRepTools_NurbsConvertModification_21423.cxx new file mode 100644 index 000000000..8f0839f83 --- /dev/null +++ b/src/GEOMImpl/BRepTools_NurbsConvertModification_21423.cxx @@ -0,0 +1,662 @@ +// File: BRepTools_NurbsConvertModification_21423.cxx +// Created: Fri Jul 12 10:16:32 1996 +// Author: Stagiaire Mary FABIEN +// + +#include + +#include +#include +#include + +#include + +#include +#include + +#include + +#include + +#ifndef _Standard_Type_HeaderFile +#include +#endif + +IMPLEMENT_STANDARD_TYPE(BRepTools_NurbsConvertModification_21423) +IMPLEMENT_STANDARD_SUPERTYPE_ARRAY() + STANDARD_TYPE(BRepTools_Modification), + STANDARD_TYPE(MMgt_TShared), + STANDARD_TYPE(Standard_Transient), + +IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END() +IMPLEMENT_STANDARD_TYPE_END(BRepTools_NurbsConvertModification_21423) + +IMPLEMENT_DOWNCAST(BRepTools_NurbsConvertModification_21423,Standard_Transient) +IMPLEMENT_STANDARD_RTTI(BRepTools_NurbsConvertModification_21423) + +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +static void GeomLib_ChangeUBounds(Handle(Geom_BSplineSurface)& aSurface, + const Standard_Real newU1, + const Standard_Real newU2) +{ + TColStd_Array1OfReal knots(1,aSurface->NbUKnots()) ; + aSurface->UKnots(knots) ; + BSplCLib::Reparametrize(newU1, + newU2, + knots) ; + aSurface->SetUKnots(knots) ; +} +static void GeomLib_ChangeVBounds(Handle(Geom_BSplineSurface)& aSurface, + const Standard_Real newV1, + const Standard_Real newV2) +{ + TColStd_Array1OfReal knots(1,aSurface->NbVKnots()) ; + aSurface->VKnots(knots) ; + BSplCLib::Reparametrize(newV1, + newV2, + knots) ; + aSurface->SetVKnots(knots) ; +} + +//======================================================================= +//function : BRepTools_NurbsConvertModification_21423 +//purpose : +//======================================================================= + +BRepTools_NurbsConvertModification_21423::BRepTools_NurbsConvertModification_21423() +{ +} + + + +//======================================================================= +//function : NewSurface +//purpose : +//======================================================================= + +Standard_Boolean BRepTools_NurbsConvertModification_21423::NewSurface + (const TopoDS_Face& F, + Handle(Geom_Surface)& S, + TopLoc_Location& L, + Standard_Real& Tol, + Standard_Boolean& RevWires, + Standard_Boolean& RevFace) +{ + Standard_Real U1, U2, curvU1, curvU2, surfU1, surfU2, UTol; + Standard_Real V1, V2, curvV1, curvV2, surfV1, surfV2, VTol; + RevWires = Standard_False; + RevFace = Standard_False; + Handle(Geom_Surface) SS = BRep_Tool::Surface(F,L); + Handle(Standard_Type) TheTypeSS = SS->DynamicType(); + if ((TheTypeSS == STANDARD_TYPE(Geom_BSplineSurface)) || + (TheTypeSS == STANDARD_TYPE(Geom_BezierSurface))) { + return Standard_False; + } + S = SS; + BRepTools::UVBounds(F,curvU1,curvU2,curvV1,curvV2); + Tol = BRep_Tool::Tolerance(F); + Standard_Real TolPar = 0.1*Tol; + Standard_Boolean IsUp = S->IsUPeriodic(), IsVp = S->IsVPeriodic(); + //OCC466(apo)-> + U1 = curvU1; U2 = curvU2; + V1 = curvV1; V2 = curvV2; + SS->Bounds(surfU1,surfU2,surfV1,surfV2); + if(!IsUp){ + U1 = Max(surfU1,curvU1); + U2 = Min(surfU2,curvU2); + } + if(!IsVp){ + V1 = Max(surfV1,curvV1); + V2 = Min(surfV2,curvV2); + } + //<-OCC466(apo) + if(IsUp && IsVp) { + Standard_Real dU = Abs(U2 - U1), dV = Abs(V2 - V1); + Standard_Real Up = S->UPeriod(), Vp = S->VPeriod(); + if(Abs(dU - Up) <= TolPar && U2 <= Up) { + if(Abs(dV - Vp) <= TolPar && V2 <= Vp) { } + else { + SS = new Geom_RectangularTrimmedSurface(S, V1+1e-9, V2-1e-9, Standard_False); + } + } + else { + if(Abs(dV - Vp) <= TolPar && V2 <= Vp) + SS = new Geom_RectangularTrimmedSurface(S, U1+1e-9, U2-1e-9, Standard_True); + else + SS = new Geom_RectangularTrimmedSurface(S, U1+1e-9, U2-1e-9, V1+1e-9, V2-1e-9); + } + } + + if(IsUp && !IsVp) { + Standard_Real dU = Abs(U2 - U1); + Standard_Real Up = S->UPeriod(); + if(Abs(dU - Up) <= TolPar && U2 <= Up) + SS = new Geom_RectangularTrimmedSurface(S, V1+1e-9, V2-1e-9, Standard_False); + else + SS = new Geom_RectangularTrimmedSurface(S, U1+1e-9, U2-1e-9, V1+1e-9, V2-1e-9); + } + + if(!IsUp && IsVp) { + Standard_Real dV = Abs(V2 - V1); + Standard_Real Vp = S->VPeriod(); + if(Abs(dV - Vp) <= TolPar && V2 <= Vp) + SS = new Geom_RectangularTrimmedSurface(S, U1+1e-9, U2-1e-9, Standard_True); + else + SS = new Geom_RectangularTrimmedSurface(S, U1+1e-9, U2-1e-9, V1+1e-9, V2-1e-9); + } + + if(!IsUp && !IsVp) { + SS = new Geom_RectangularTrimmedSurface(S, U1+1e-9, U2-1e-9, V1+1e-9, V2-1e-9); + } + + SS->Bounds(surfU1,surfU2,surfV1,surfV2) ; + + S = GeomConvert::SurfaceToBSplineSurface(SS); + Handle(Geom_BSplineSurface) BS = Handle(Geom_BSplineSurface)::DownCast(S) ; + BS->Resolution(Tol, UTol, VTol) ; + + // + // on recadre les bornes de S sinon les anciennes PCurves sont aux fraises + // + + if (Abs(curvU1-surfU1) > UTol && !BS->IsUPeriodic()) { + GeomLib_ChangeUBounds(BS, U1,U2) ; + } + if (Abs(curvV1-surfV1) > VTol && !BS->IsVPeriodic()) { + GeomLib_ChangeVBounds(BS, V1, V2) ; + } + + ////modified by jgv, 17.11.11 for SALOME only, bug 21423//// + BRepAdaptor_Surface BAsurf(F); + if (BAsurf.GetType() == GeomAbs_Sphere) + { //from OCC217 + Standard_Real dTol = 1e-9/Sqrt(UTol*UTol+VTol*VTol)*2.0; + Tol *= Max(dTol,1.0); + } + //////////////////////////////////////////////////////////// + + return Standard_True; +} + +static Standard_Boolean IsConvert(const TopoDS_Edge& E) +{ + Standard_Boolean isConvert = Standard_False; + Handle(BRep_TEdge)& TE = *((Handle(BRep_TEdge)*)&E.TShape()); + // iterate on pcurves + BRep_ListIteratorOfListOfCurveRepresentation itcr(TE->Curves()); + for ( ; itcr.More() && !isConvert; itcr.Next() ) { + Handle(BRep_GCurve) GC = Handle(BRep_GCurve)::DownCast(itcr.Value()); + if ( GC.IsNull() || ! GC->IsCurveOnSurface() ) continue; + Handle(Geom_Surface) aSurface = GC->Surface(); + Handle(Geom2d_Curve) aCurve2d = GC->PCurve(); + isConvert =((!aSurface->IsKind(STANDARD_TYPE(Geom_BSplineSurface)) && + !aSurface->IsKind(STANDARD_TYPE(Geom_BezierSurface))) || + (!aCurve2d->IsKind(STANDARD_TYPE(Geom2d_BSplineCurve)) && + !aCurve2d->IsKind(STANDARD_TYPE(Geom2d_BezierCurve)))); + + } + return isConvert; + +} + +//======================================================================= +//function : NewCurve +//purpose : +//======================================================================= + +Standard_Boolean BRepTools_NurbsConvertModification_21423::NewCurve +(const TopoDS_Edge& E, + Handle(Geom_Curve)& C, + TopLoc_Location& L, + Standard_Real& Tol) +{ + + Tol = BRep_Tool::Tolerance(E); + if(BRep_Tool::Degenerated(E)) { + C.Nullify(); + L.Identity(); + return Standard_True; + } + Standard_Real f, l; + + Handle(Geom_Curve) Caux = BRep_Tool::Curve(E, L, f, l); + + if ( Caux.IsNull()) { + L.Identity(); + return Standard_False; + } + Handle(Standard_Type) TheType = Caux->DynamicType(); + if ((TheType == STANDARD_TYPE(Geom_BSplineCurve)) || + (TheType == STANDARD_TYPE(Geom_BezierCurve))) { + if(IsConvert(E)) { + C = Handle(Geom_Curve)::DownCast(Caux->Copy()); + return Standard_True; + } + return Standard_False; + } + + C = Caux; + + Standard_Real TolPar = Tol *.1; + + if(C->IsPeriodic()) { + Standard_Real p = C->Period(); + Standard_Real d = Abs(l - f); + if(Abs(d - p) <= TolPar && l <= p) {} + else + C = new Geom_TrimmedCurve(C, f, l); + } + else + C = new Geom_TrimmedCurve(C, f, l); + +//modif WOK++ portage hp (fbi du 14/03/97) +// gp_Trsf trsf(L); +// gp_Trsf trsf = L.Transformation(); + +// C = GeomConvert::CurveToBSplineCurve(C,Convert_QuasiAngular); + + C = GeomConvert::CurveToBSplineCurve(C); + + Standard_Real fnew = C->FirstParameter(), lnew = C->LastParameter(), UTol; + + Handle(Geom_BSplineCurve) BC = Handle(Geom_BSplineCurve)::DownCast(C) ; + + if(!BC->IsPeriodic()) { + BC->Resolution(Tol, UTol) ; + if(Abs(f - fnew) > UTol || Abs(l - lnew) > UTol) { + TColStd_Array1OfReal knots(1,BC->NbKnots()) ; + BC->Knots(knots) ; + BSplCLib::Reparametrize(f, l, knots) ; + BC->SetKnots(knots) ; + } + } + + if(!myMap.Contains(Caux)) { + myMap.Add(Caux,C); + } + return Standard_True ; +} + +//======================================================================= +//function : NewPoint +//purpose : +//======================================================================= + +Standard_Boolean BRepTools_NurbsConvertModification_21423::NewPoint +//(const TopoDS_Vertex& V, +(const TopoDS_Vertex& , +// gp_Pnt& P, + gp_Pnt& , +// Standard_Real& Tol) + Standard_Real& ) +{ + return Standard_False; +} + + +//======================================================================= +//function : NewCurve2d +//purpose : +//======================================================================= + +Standard_Boolean BRepTools_NurbsConvertModification_21423::NewCurve2d +(const TopoDS_Edge& E, + const TopoDS_Face& F, + const TopoDS_Edge& newE, + const TopoDS_Face& newF, + Handle(Geom2d_Curve)& Curve2d, + Standard_Real& Tol) +{ + ////modified by jgv, 17.11.11 for SALOME only, bug 21423//// + Tol = BRep_Tool::Tolerance(E); + BRepAdaptor_Surface BAsurf(F); + if (BAsurf.GetType() == GeomAbs_Sphere) + Tol = Max(Max(BRep_Tool::Tolerance(E),BRep_Tool::Tolerance(F)), + Max(BRep_Tool::Tolerance(newE),BRep_Tool::Tolerance(newF)) + ); //from OCC217 + //////////////////////////////////////////////////////////// + + Standard_Real f2d,l2d; + Handle(Geom2d_Curve) C2d = BRep_Tool::CurveOnSurface(E,F,f2d,l2d); + Standard_Real f3d,l3d; + TopLoc_Location Loc; + Handle(Geom_Curve) C3d = BRep_Tool::Curve(E, Loc, f3d,l3d); + Standard_Boolean isConvert2d = ((!C3d.IsNull() && !C3d->IsKind(STANDARD_TYPE(Geom_BSplineCurve)) && + !C3d->IsKind(STANDARD_TYPE(Geom_BezierCurve))) || + IsConvert(E)); + + if(BRep_Tool::Degenerated(E)) { + //Curve2d = C2d; + if(!C2d->IsKind(STANDARD_TYPE(Geom2d_TrimmedCurve))) + { + Handle(Geom2d_TrimmedCurve) aTrimC = new Geom2d_TrimmedCurve(C2d,f2d,l2d); + C2d = aTrimC; + } + Curve2d = Geom2dConvert::CurveToBSplineCurve(C2d); + return Standard_True; + } + if(!BRepTools::IsReallyClosed(E,F)) { + Handle(Standard_Type) TheTypeC2d = C2d->DynamicType(); + + if(TheTypeC2d == STANDARD_TYPE(Geom2d_TrimmedCurve)) { + Handle(Geom2d_TrimmedCurve) TC = Handle(Geom2d_TrimmedCurve)::DownCast(C2d); + C2d = TC->BasisCurve(); + } + + Standard_Real fc = C2d->FirstParameter(), lc = C2d->LastParameter(); + + if(!C2d->IsPeriodic()) { + if(fc - f2d > Precision::PConfusion()) f2d = fc; + if(l2d - lc > Precision::PConfusion()) l2d = lc; + } + + C2d = new Geom2d_TrimmedCurve(C2d, f2d, l2d); + + Geom2dAdaptor_Curve G2dAC(C2d, f2d, l2d); + Handle(Geom2dAdaptor_HCurve) G2dAHC = new Geom2dAdaptor_HCurve(G2dAC); + + TopLoc_Location Loc; + Handle(Geom_Curve) C3d = BRep_Tool::Curve(E, Loc, f3d,l3d); + if(!newE.IsNull()) { + C3d = BRep_Tool::Curve(newE, f3d, l3d); + } + else { + C3d = BRep_Tool::Curve(E,f3d,l3d); + } + GeomAdaptor_Curve G3dAC(C3d, f3d, l3d); + Handle(GeomAdaptor_HCurve) G3dAHC = new GeomAdaptor_HCurve(G3dAC); + + Standard_Real Uinf, Usup, Vinf, Vsup, u = 0, v = 0; + Handle(Geom_Surface) S = BRep_Tool::Surface(F); + Handle(Standard_Type) myT = S->DynamicType(); + if(myT != STANDARD_TYPE(Geom_Plane)) { + if(newF.IsNull()) { + Handle(Standard_Type) st = C2d->DynamicType(); + if ((st == STANDARD_TYPE(Geom2d_BSplineCurve)) || + (st == STANDARD_TYPE(Geom2d_BezierCurve))) { + if(isConvert2d) { + Curve2d = Handle(Geom2d_Curve)::DownCast(C2d->Copy()); + return Standard_True; + } + return Standard_False; + } + } + else { + S = BRep_Tool::Surface(newF); + + } + S->Bounds(Uinf, Usup, Vinf, Vsup); + Uinf -= 1e-9; Usup += 1e-9; Vinf -= 1e-9; Vsup += 1e-9; + u = (Usup - Uinf)*0.1; + v = (Vsup - Vinf)*0.1; + if(S->IsUPeriodic()) { + Standard_Real uperiod = S->UPeriod(); + if(uperiod < (Usup+2*u-Uinf)) { + if(uperiod <= (Usup-Uinf)) { + u = 0; + } + else { + u = (uperiod-(Usup-Uinf))*0.5; + } + } + } + if(S->IsVPeriodic()) { + Standard_Real vperiod = S->VPeriod(); + if(vperiod < (Vsup+2*v-Vinf)) { + if(vperiod <= (Vsup-Vinf)) { + v = 0; + } + else { + v = (vperiod-(Vsup-Vinf))*0.5; + } + } + } + } + else { + S = BRep_Tool::Surface(F);// Si S est un plan, pas de changement de parametrisation + GeomAdaptor_Surface GAS(S); + Handle(GeomAdaptor_HSurface) GAHS = new GeomAdaptor_HSurface(GAS); + ProjLib_ComputeApprox ProjOnCurve(G3dAHC,GAHS,Tol); + if(ProjOnCurve.BSpline().IsNull()) { + Curve2d = Geom2dConvert::CurveToBSplineCurve(ProjOnCurve.Bezier()); + return Standard_True; + } + Curve2d = ProjOnCurve.BSpline(); + return Standard_True; + } + GeomAdaptor_Surface GAS(S,Uinf-u,Usup+u,Vinf-v,Vsup+v); + + Handle(GeomAdaptor_HSurface) GAHS = new GeomAdaptor_HSurface(GAS); + + ProjLib_ComputeApproxOnPolarSurface ProjOnCurve(G2dAHC,G3dAHC,GAHS,Tol); + + if(ProjOnCurve.IsDone()) { + Curve2d = ProjOnCurve.BSpline(); + + return Standard_True; + } + else { + Curve2d = Geom2dConvert::CurveToBSplineCurve(C2d); + return Standard_True; + } + } + else { + TopTools_ListIteratorOfListOfShape itled; + TColStd_ListIteratorOfListOfTransient itlcu; + + for (itled.Initialize(myled), itlcu.Initialize(mylcu); + itled.More(); // itlcu.More() + itled.Next(),itlcu.Next()) { + if (itled.Value().IsSame(E)) { + // deja traitee + break; + } + } + if (!itled.More()) { // on stocke l`edge et la curve2d + Handle(Geom2d_Curve) C2dBis; + Standard_Real f3d,l3d,f2dBis,l2dBis; + C2d = new Geom2d_TrimmedCurve(C2d, f2d, l2d); + Geom2dAdaptor_Curve G2dAC(C2d, f2d, l2d); + Handle(Geom2dAdaptor_HCurve) G2dAHC = new Geom2dAdaptor_HCurve(G2dAC); + TopoDS_Edge ERevers = E; + ERevers.Reverse(); +// TopoDS_Edge ERevers = TopoDS::Edge(E.Reversed()); + C2dBis = BRep_Tool::CurveOnSurface(ERevers,F,f2dBis,l2dBis); + Handle(Standard_Type) TheTypeC2dBis = C2dBis->DynamicType(); + C2dBis = new Geom2d_TrimmedCurve(C2dBis,f2dBis, l2dBis); + Geom2dAdaptor_Curve G2dACBis(C2dBis, f2dBis, l2dBis); + Handle(Geom2dAdaptor_HCurve) G2dAHCBis = new Geom2dAdaptor_HCurve(G2dACBis); + + TopLoc_Location Loc; + Handle(Geom_Curve) C3d = BRep_Tool::Curve(E, f3d,l3d); + if(C3d.IsNull()) { + if(isConvert2d) { + Curve2d = Handle(Geom2d_Curve)::DownCast(C2d->Copy()); + return Standard_True; + } + + return Standard_False; + } + if(!newE.IsNull()) { + C3d = BRep_Tool::Curve(newE, f3d,l3d); + } + GeomAdaptor_Curve G3dAC(C3d, f3d, l3d); + Handle(GeomAdaptor_HCurve) G3dAHC = new GeomAdaptor_HCurve(G3dAC); + + Handle(Geom_Surface) S = BRep_Tool::Surface(F); + Handle(Standard_Type) myT = S->DynamicType(); + if(newF.IsNull()) { + mylcu.Append(C2dBis); + Handle(Standard_Type) st = C2d->DynamicType(); + if ((st == STANDARD_TYPE(Geom2d_BSplineCurve)) || + (st == STANDARD_TYPE(Geom2d_BezierCurve))) { + if(isConvert2d) { + Curve2d = Handle(Geom2d_Curve)::DownCast(C2d->Copy()); + return Standard_True; + } + return Standard_False; + } + } + else { + S = BRep_Tool::Surface(newF);// S est une BSplineSurface : pas besoin de la trimmed + } + Standard_Real Uinf, Usup, Vinf, Vsup, u = 0, v = 0; + S->Bounds(Uinf, Usup, Vinf, Vsup); + Uinf -= 1e-9; Usup += 1e-9; Vinf -= 1e-9; Vsup += 1e-9; + u = (Usup - Uinf)*0.1; + v = (Vsup - Vinf)*0.1; + if(S->IsUPeriodic()) { + Standard_Real uperiod = S->UPeriod(); + if(uperiod < (Usup+2*u-Uinf)) + if(uperiod <= (Usup-Uinf)) + u = 0; + else + u = (uperiod-(Usup-Uinf))*0.5; + } + if(S->IsVPeriodic()) { + Standard_Real vperiod = S->VPeriod(); + if(vperiod < (Vsup+2*v-Vinf)) + if(vperiod <= (Vsup-Vinf)) + v = 0; + else + v = (vperiod-(Vsup-Vinf))*0.5; + } + GeomAdaptor_Surface GAS(S, Uinf-u,Usup+u,Vinf-v,Vsup+v); + Handle(GeomAdaptor_HSurface) GAHS = new GeomAdaptor_HSurface(GAS); + myled.Append(E); + + ProjLib_ComputeApproxOnPolarSurface + ProjOnCurve(G2dAHC,G2dAHCBis,G3dAHC,GAHS,Tol); + + if(ProjOnCurve.IsDone()) { + Curve2d = ProjOnCurve.BSpline(); + mylcu.Append(ProjOnCurve.Curve2d()); + return Standard_True; + } + else { + Curve2d = Geom2dConvert::CurveToBSplineCurve(C2d); + mylcu.Append(C2dBis); + return Standard_True; + } + } + else { // on est au 2ieme tour + C2d = Handle(Geom2d_Curve)::DownCast(itlcu.Value()); + Handle(Standard_Type) st = C2d->DynamicType(); + if (!(st == STANDARD_TYPE(Geom2d_BSplineCurve)) && + !(st == STANDARD_TYPE(Geom2d_BezierCurve))) { + return Standard_False; + } + Curve2d = Geom2dConvert::CurveToBSplineCurve(C2d); + return Standard_True; + } + } + Curve2d = C2d; + return Standard_True; +} + +//======================================================================= +//function : NewParameter +//purpose : +//======================================================================= + +Standard_Boolean BRepTools_NurbsConvertModification_21423::NewParameter + (const TopoDS_Vertex& V, + const TopoDS_Edge& E, + Standard_Real& P, + Standard_Real& Tol) +{ + if(BRep_Tool::Degenerated(E)) + return Standard_False; + Standard_Real f, l, param = BRep_Tool::Parameter(V,E); + TopLoc_Location L; + + Handle(Geom_Curve) gc = BRep_Tool::Curve(E, L, f, l); + if(!myMap.Contains(gc)) + return Standard_False; + + Handle(Geom_BSplineCurve) gcc = + Handle(Geom_BSplineCurve)::DownCast(myMap.FindFromKey(gc)); + + gcc = Handle(Geom_BSplineCurve)::DownCast(gcc->Transformed(L.Transformation())); + + GeomAdaptor_Curve ac(gcc); + gp_Pnt pnt = BRep_Tool::Pnt(V); + + Extrema_LocateExtPC proj(pnt, ac, param, f, l, Tol); + if(proj.IsDone()) { + Standard_Real Dist2Min = proj.SquareDistance(); + if (Dist2Min < Tol*Tol) { +// Standard_Real U_final_point,V_final_point; + P = proj.Point().Parameter(); + return Standard_True; + } + } + return Standard_False; +} + +//======================================================================= +//function : Continuity +//purpose : +//======================================================================= + +GeomAbs_Shape BRepTools_NurbsConvertModification_21423::Continuity + (const TopoDS_Edge& E, + const TopoDS_Face& F1, + const TopoDS_Face& F2, + const TopoDS_Edge&, + const TopoDS_Face&, + const TopoDS_Face&) +{ + return BRep_Tool::Continuity(E,F1,F2); +} + + diff --git a/src/GEOMImpl/BRepTools_NurbsConvertModification_21423.hxx b/src/GEOMImpl/BRepTools_NurbsConvertModification_21423.hxx new file mode 100644 index 000000000..602f27dbb --- /dev/null +++ b/src/GEOMImpl/BRepTools_NurbsConvertModification_21423.hxx @@ -0,0 +1,141 @@ +// This file is generated by WOK (CPPExt). +// Please do not edit this file; modify original file instead. +// The copyright and license terms as defined for the original file apply to +// this header file considered to be the "object code" form of the original source. + +#ifndef _BRepTools_NurbsConvertModification_21423_HeaderFile +#define _BRepTools_NurbsConvertModification_21423_HeaderFile + +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_DefineHandle_HeaderFile +#include +#endif +#ifndef _Handle_BRepTools_NurbsConvertModification_21423_HeaderFile +#include +#endif + +#ifndef _TopTools_ListOfShape_HeaderFile +#include +#endif +#ifndef _TColStd_ListOfTransient_HeaderFile +#include +#endif +#ifndef _TColStd_IndexedDataMapOfTransientTransient_HeaderFile +#include +#endif +#ifndef _BRepTools_Modification_HeaderFile +#include +#endif +#ifndef _Standard_Boolean_HeaderFile +#include +#endif +#ifndef _Handle_Geom_Surface_HeaderFile +#include +#endif +#ifndef _Standard_Real_HeaderFile +#include +#endif +#ifndef _Handle_Geom_Curve_HeaderFile +#include +#endif +#ifndef _Handle_Geom2d_Curve_HeaderFile +#include +#endif +#ifndef _GeomAbs_Shape_HeaderFile +#include +#endif +class TopoDS_Face; +class Geom_Surface; +class TopLoc_Location; +class TopoDS_Edge; +class Geom_Curve; +class TopoDS_Vertex; +class gp_Pnt; +class Geom2d_Curve; + + +//! Defines a modification of the geometry by a Trsf
+//! from gp. All methods return True and transform the
+//! geometry.
+class BRepTools_NurbsConvertModification_21423 : public BRepTools_Modification { + +public: + + + Standard_EXPORT BRepTools_NurbsConvertModification_21423(); + //! Returns Standard_True if the face has been
+//! modified. In this case, is the new geometric
+//! support of the face, the new location,
+//! the new tolerance. has to be set to
+//! Standard_True when the modification reverses the
+//! normal of the surface.(the wires have to be
+//! reversed). has to be set to
+//! Standard_True if the orientation of the modified
+//! face changes in the shells which contain it. --
+//! Here, will return Standard_True if the
+//! -- gp_Trsf is negative.
+ Standard_EXPORT Standard_Boolean NewSurface(const TopoDS_Face& F,Handle(Geom_Surface)& S,TopLoc_Location& L,Standard_Real& Tol,Standard_Boolean& RevWires,Standard_Boolean& RevFace) ; + //! Returns Standard_True if the edge has been
+//! modified. In this case, is the new geometric
+//! support of the edge, the new location,
+//! the new tolerance. Otherwise, returns
+//! Standard_False, and , , are not
+//! significant.
+ Standard_EXPORT Standard_Boolean NewCurve(const TopoDS_Edge& E,Handle(Geom_Curve)& C,TopLoc_Location& L,Standard_Real& Tol) ; + //! Returns Standard_True if the vertex has been
+//! modified. In this case,

is the new geometric
+//! support of the vertex, the new tolerance.
+//! Otherwise, returns Standard_False, and

,
+//! are not significant.
+ Standard_EXPORT Standard_Boolean NewPoint(const TopoDS_Vertex& V,gp_Pnt& P,Standard_Real& Tol) ; + //! Returns Standard_True if the edge has a new
+//! curve on surface on the face .In this case,
+//! is the new geometric support of the edge, the
+//! new location, the new tolerance.
+//! Otherwise, returns Standard_False, and , ,
+//! are not significant.
+ Standard_EXPORT Standard_Boolean NewCurve2d(const TopoDS_Edge& E,const TopoDS_Face& F,const TopoDS_Edge& NewE,const TopoDS_Face& NewF,Handle(Geom2d_Curve)& C,Standard_Real& Tol) ; + //! Returns Standard_True if the Vertex has a new
+//! parameter on the edge . In this case,

is
+//! the parameter, the new tolerance.
+//! Otherwise, returns Standard_False, and

,
+//! are not significant.
+ Standard_EXPORT Standard_Boolean NewParameter(const TopoDS_Vertex& V,const TopoDS_Edge& E,Standard_Real& P,Standard_Real& Tol) ; + //! Returns the continuity of between
+//! and .
+//!
+//! is the new edge created from .
+//! (resp. ) is the new face created from
+//! (resp. ).
+ Standard_EXPORT GeomAbs_Shape Continuity(const TopoDS_Edge& E,const TopoDS_Face& F1,const TopoDS_Face& F2,const TopoDS_Edge& NewE,const TopoDS_Face& NewF1,const TopoDS_Face& NewF2) ; + + + + + DEFINE_STANDARD_RTTI(BRepTools_NurbsConvertModification_21423) + +protected: + + + + +private: + + +TopTools_ListOfShape myled; +TColStd_ListOfTransient mylcu; +TColStd_IndexedDataMapOfTransientTransient myMap; + + +}; + + + + + +// other Inline functions and methods (like "C++: function call" methods) + + +#endif diff --git a/src/GEOMImpl/GEOMImpl_ScaleDriver.cxx b/src/GEOMImpl/GEOMImpl_ScaleDriver.cxx index 4fb9b1c67..10250b771 100644 --- a/src/GEOMImpl/GEOMImpl_ScaleDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_ScaleDriver.cxx @@ -18,7 +18,6 @@ // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// #include @@ -31,7 +30,7 @@ #include #include -#include +#include #include #include #include @@ -165,7 +164,7 @@ Standard_Integer GEOMImpl_ScaleDriver::Execute(TFunction_Logbook& log) const } } - BRepBuilderAPI_GTransform aBRepGTrsf (aShapeBase, aGTrsf, Standard_False); + BRepBuilderAPI_GTransform_21423 aBRepGTrsf (aShapeBase, aGTrsf, Standard_False); if (!aBRepGTrsf.IsDone()) Standard_ConstructionError::Raise("Scaling not done"); aShape = aBRepGTrsf.Shape(); @@ -236,5 +235,5 @@ const Handle(GEOMImpl_ScaleDriver) Handle(GEOMImpl_ScaleDriver)::DownCast(const } } - return _anOtherObject ; + return _anOtherObject; } diff --git a/src/GEOMImpl/Handle_BRepTools_NurbsConvertModification_21423.hxx b/src/GEOMImpl/Handle_BRepTools_NurbsConvertModification_21423.hxx new file mode 100644 index 000000000..7ae0fed9a --- /dev/null +++ b/src/GEOMImpl/Handle_BRepTools_NurbsConvertModification_21423.hxx @@ -0,0 +1,27 @@ +// This file is generated by WOK (CPPExt). +// Please do not edit this file; modify original file instead. +// The copyright and license terms as defined for the original file apply to +// this header file considered to be the "object code" form of the original source. + +#ifndef _Handle_BRepTools_NurbsConvertModification_21423_HeaderFile +#define _Handle_BRepTools_NurbsConvertModification_21423_HeaderFile + +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_DefineHandle_HeaderFile +#include +#endif + +#ifndef _Handle_BRepTools_Modification_HeaderFile +#include +#endif + +class Standard_Transient; +class Handle(Standard_Type); +class Handle(BRepTools_Modification); +class BRepTools_NurbsConvertModification_21423; + +DEFINE_STANDARD_HANDLE(BRepTools_NurbsConvertModification_21423,BRepTools_Modification) + +#endif diff --git a/src/GEOMImpl/Makefile.am b/src/GEOMImpl/Makefile.am index c4bc7cec7..cfe3b0f1c 100644 --- a/src/GEOMImpl/Makefile.am +++ b/src/GEOMImpl/Makefile.am @@ -104,6 +104,12 @@ salomeinclude_HEADERS = \ GEOMImpl_MirrorDriver.hxx \ GEOMImpl_ProjectionDriver.hxx \ GEOMImpl_OffsetDriver.hxx \ + BRepBuilderAPI_GTransform_21423.hxx \ + BRepBuilderAPI_ModifyShape_21423.hxx \ + BRepBuilderAPI_NurbsConvert_21423.hxx \ + BRepTools_Modifier_21423.hxx \ + BRepTools_NurbsConvertModification_21423.hxx \ + Handle_BRepTools_NurbsConvertModification_21423.hxx \ GEOMImpl_ScaleDriver.hxx \ GEOMImpl_PositionDriver.hxx \ GEOMImpl_BoxDriver.hxx \ @@ -174,6 +180,11 @@ dist_libGEOMimpl_la_SOURCES = \ GEOMImpl_MirrorDriver.cxx \ GEOMImpl_ProjectionDriver.cxx \ GEOMImpl_OffsetDriver.cxx \ + BRepBuilderAPI_GTransform_21423.cxx \ + BRepBuilderAPI_ModifyShape_21423.cxx \ + BRepBuilderAPI_NurbsConvert_21423.cxx \ + BRepTools_Modifier_21423.cxx \ + BRepTools_NurbsConvertModification_21423.cxx \ GEOMImpl_ScaleDriver.cxx \ GEOMImpl_PositionDriver.cxx \ GEOMImpl_BoxDriver.cxx \