1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-07 18:30:55 +03:00
occt/src/BRepBuilderAPI/BRepBuilderAPI_Copy.cxx
azv 33c8a72788 0031479: Modeling Algorithms - exception on geometry transformation of triangulation-only shapes (without geometry surface)
* Avoid crash in BRepBuilderAPI_GTransform algorithm. The crash in BRepBuilder_Transform has been solved by 0032716.
* Move copying modifier to BRepTools package.
* Implement copying of triangulation in BRepTools_NurbsConvertModification.
* Implement transformation of a triangulation in BRepTools_GTrsfModification.
* Update test case bugs/mesh/bug22778 to clean the triangulation after conversion to NURBS (reproduce the same behavior as before).
2022-07-08 19:30:13 +03:00

56 lines
2.0 KiB
C++

// Created on: 1994-12-12
// 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_Copy.hxx>
#include <BRepTools_CopyModification.hxx>
//=======================================================================
//function : BRepBuilderAPI_Copy
//purpose :
//=======================================================================
BRepBuilderAPI_Copy::BRepBuilderAPI_Copy ()
{
myModification = new BRepTools_CopyModification(Standard_True, Standard_False);
}
//=======================================================================
//function : BRepBuilderAPI_Copy
//purpose :
//=======================================================================
BRepBuilderAPI_Copy::BRepBuilderAPI_Copy(const TopoDS_Shape& S, const Standard_Boolean copyGeom, const Standard_Boolean copyMesh)
{
myModification = new BRepTools_CopyModification(copyGeom, copyMesh);
DoModif(S);
}
//=======================================================================
//function : Perform
//purpose :
//=======================================================================
void BRepBuilderAPI_Copy::Perform(const TopoDS_Shape& S, const Standard_Boolean copyGeom, const Standard_Boolean copyMesh)
{
myModification = new BRepTools_CopyModification(copyGeom, copyMesh);
NotDone(); // on force la copie si on vient deja d`en faire une
DoModif(S);
}