mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-06 18:26:22 +03:00
License statement text corrected; compiler warnings caused by Bison 2.41 disabled for MSVC; a few other compiler warnings on 54-bit Windows eliminated by appropriate type cast Wrong license statements corrected in several files. Copyright and license statements added in XSD and GLSL files. Copyright year updated in some files. Obsolete documentation files removed from DrawResources.
152 lines
4.3 KiB
C++
152 lines
4.3 KiB
C++
// Created on: 1994-12-02
|
|
// Created by: Jacques GOUSSARD
|
|
// Copyright (c) 1994-1999 Matra Datavision
|
|
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
|
//
|
|
// This file is part of Open CASCADE Technology software library.
|
|
//
|
|
// This library is free software; you can redistribute it and/or modify it under
|
|
// the terms of the GNU Lesser General Public License version 2.1 as published
|
|
// by the Free Software Foundation, with special exception defined in the file
|
|
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
|
// distribution for complete text of the license and disclaimer of any warranty.
|
|
//
|
|
// Alternatively, this file may be used under the terms of Open CASCADE
|
|
// commercial license or contractual agreement.
|
|
|
|
#include <BRepBuilderAPI_ModifyShape.ixx>
|
|
|
|
|
|
#include <Standard_NullObject.hxx>
|
|
|
|
//=======================================================================
|
|
//function : BRepBuilderAPI_ModifyShape
|
|
//purpose :
|
|
//=======================================================================
|
|
|
|
BRepBuilderAPI_ModifyShape::BRepBuilderAPI_ModifyShape () {}
|
|
|
|
|
|
//=======================================================================
|
|
//function : BRepBuilderAPI_ModifyShape
|
|
//purpose :
|
|
//=======================================================================
|
|
|
|
BRepBuilderAPI_ModifyShape::BRepBuilderAPI_ModifyShape (const TopoDS_Shape& S):
|
|
myModifier(S), myInitialShape(S)
|
|
{}
|
|
|
|
|
|
//=======================================================================
|
|
//function : BRepBuilderAPI_ModifyShape
|
|
//purpose :
|
|
//=======================================================================
|
|
|
|
BRepBuilderAPI_ModifyShape::BRepBuilderAPI_ModifyShape
|
|
(const Handle(BRepTools_Modification)& M)
|
|
{
|
|
myModification = M;
|
|
}
|
|
|
|
|
|
//=======================================================================
|
|
//function : BRepBuilderAPI_ModifyShape
|
|
//purpose :
|
|
//=======================================================================
|
|
|
|
BRepBuilderAPI_ModifyShape::BRepBuilderAPI_ModifyShape
|
|
(const TopoDS_Shape& S,
|
|
const Handle(BRepTools_Modification)& M): myModifier(S),myInitialShape(S)
|
|
{
|
|
myModification = M;
|
|
DoModif();
|
|
}
|
|
|
|
|
|
//=======================================================================
|
|
//function : DoModif
|
|
//purpose :
|
|
//=======================================================================
|
|
|
|
void BRepBuilderAPI_ModifyShape::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::DoModif (const TopoDS_Shape& S)
|
|
{
|
|
if (!S.IsEqual(myInitialShape) || !IsDone()) {
|
|
myInitialShape = S;
|
|
myModifier.Init(S);
|
|
DoModif();
|
|
}
|
|
}
|
|
|
|
|
|
//=======================================================================
|
|
//function : DoModif
|
|
//purpose :
|
|
//=======================================================================
|
|
|
|
void BRepBuilderAPI_ModifyShape::DoModif (const Handle(BRepTools_Modification)& M)
|
|
{
|
|
myModification = M;
|
|
DoModif();
|
|
}
|
|
|
|
|
|
//=======================================================================
|
|
//function : DoModif
|
|
//purpose :
|
|
//=======================================================================
|
|
|
|
void BRepBuilderAPI_ModifyShape::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::ModifiedShape
|
|
(const TopoDS_Shape& S) const
|
|
{
|
|
return myModifier.ModifiedShape(S);
|
|
}
|
|
|
|
//=======================================================================
|
|
//function : Modified
|
|
//purpose :
|
|
//=======================================================================
|
|
|
|
const TopTools_ListOfShape& BRepBuilderAPI_ModifyShape::Modified
|
|
(const TopoDS_Shape& F)
|
|
{
|
|
myGenerated.Clear();
|
|
myGenerated.Append(myModifier.ModifiedShape(F));
|
|
return myGenerated;
|
|
}
|