// Created on: 1991-07-02
// Created by: Remi LEQUETTE
// Copyright (c) 1991-1999 Matra Datavision
-// Copyright (c) 1999-2012 OPEN CASCADE SAS
+// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
-// The content of this file is subject to the Open CASCADE Technology Public
-// License Version 6.5 (the "License"). You may not use the content of this file
-// except in compliance with the License. Please obtain a copy of the License
-// at http://www.opencascade.org and read it completely before using this file.
+// This file is part of Open CASCADE Technology software library.
//
-// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
-// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+// 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.
//
-// The Original Code and all software distributed under the License is
-// distributed on an "AS IS" basis, without warranty of any kind, and the
-// Initial Developer hereby disclaims all such warranties, including without
-// limitation, any warranties of merchantability, fitness for a particular
-// purpose or non-infringement. Please see the License for the specific terms
-// and conditions governing the rights and limitations under the License.
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
-#include <BRep_Builder.ixx>
-
-#include <BRep_TEdge.hxx>
+#include <BRep_Builder.hxx>
#include <BRep_Curve3D.hxx>
-#include <BRep_GCurve.hxx>
-#include <BRep_CurveOnClosedSurface.hxx>
#include <BRep_CurveOn2Surfaces.hxx>
+#include <BRep_CurveOnClosedSurface.hxx>
+#include <BRep_GCurve.hxx>
#include <BRep_ListIteratorOfListOfCurveRepresentation.hxx>
-
+#include <BRep_ListIteratorOfListOfPointRepresentation.hxx>
#include <BRep_PointOnCurve.hxx>
#include <BRep_PointOnCurveOnSurface.hxx>
#include <BRep_PointOnSurface.hxx>
-#include <BRep_ListIteratorOfListOfPointRepresentation.hxx>
-
-#include <TopoDS.hxx>
-#include <TopoDS_Iterator.hxx>
-
-#include <Precision.hxx>
-
#include <BRep_Polygon3D.hxx>
-#include <BRep_PolygonOnSurface.hxx>
#include <BRep_PolygonOnClosedSurface.hxx>
-#include <BRep_PolygonOnTriangulation.hxx>
#include <BRep_PolygonOnClosedTriangulation.hxx>
-
+#include <BRep_PolygonOnSurface.hxx>
+#include <BRep_PolygonOnTriangulation.hxx>
+#include <BRep_TEdge.hxx>
+#include <Geom2d_Curve.hxx>
+#include <Geom_Curve.hxx>
+#include <Geom_Surface.hxx>
+#include <gp_Pnt.hxx>
+#include <gp_Pnt2d.hxx>
+#include <Poly_Polygon2D.hxx>
+#include <Poly_Polygon3D.hxx>
+#include <Poly_PolygonOnTriangulation.hxx>
+#include <Poly_Triangulation.hxx>
+#include <Precision.hxx>
+#include <Standard_DomainError.hxx>
#include <Standard_NullObject.hxx>
+#include <TopLoc_Location.hxx>
+#include <TopoDS.hxx>
+#include <TopoDS_Edge.hxx>
+#include <TopoDS_Face.hxx>
+#include <TopoDS_Iterator.hxx>
+#include <TopoDS_LockedShape.hxx>
+#include <TopoDS_Vertex.hxx>
//=======================================================================
//function : Auxiliary methods
//purpose :
//=======================================================================
-
//=======================================================================
//function : UpdateCurves
//purpose : Insert a 3d curve <C> with location <L>
// in a list of curve representations <lcr>
//=======================================================================
-
static void UpdateCurves(BRep_ListOfCurveRepresentation& lcr,
const Handle(Geom_Curve)& C,
const TopLoc_Location& L)
BRep_ListIteratorOfListOfCurveRepresentation itcr(lcr);
Handle(BRep_CurveRepresentation) cr;
Handle(BRep_GCurve) GC;
- Standard_Real f = 0.,l = 0.;
- Standard_Boolean rangeFound = Standard_False;
-
+ Standard_Real f = -Precision::Infinite(), l = Precision::Infinite();
// search the range of the 3d curve
// and remove any existing representation
// see lbo & flo, to determine whether range is defined
// compare first and last parameters with default values.
GC->Range(f, l);
- //lvt 15/6/99: On enleve la comparaison de reels infinis.
- Standard_Boolean undefined = (Precision::IsPositiveInfinite(l) ||
- Precision::IsNegativeInfinite(f));
-
- if (!undefined) {
- rangeFound = Standard_True;
- }
}
if (GC->IsCurveOnSurface(S,L)) {
// remove existing curve on surface
}
}
- if (! C.IsNull()) {
- Handle(BRep_CurveOnSurface) COS = new BRep_CurveOnSurface(C,S,L);
- // test if there is already a range
- if (rangeFound) {
- COS->SetRange(f,l);
+ if (!C.IsNull()) {
+ Handle(BRep_CurveOnSurface) COS = new BRep_CurveOnSurface(C, S, L);
+ Standard_Real aFCur = 0.0, aLCur = 0.0;
+ COS->Range(aFCur, aLCur);
+ if (!Precision::IsInfinite(f))
+ {
+ aFCur = f;
}
+
+ if (!Precision::IsInfinite(l))
+ {
+ aLCur = l;
+ }
+
+ COS->SetRange(aFCur, aLCur);
lcr.Append(COS);
}
}
BRep_ListIteratorOfListOfCurveRepresentation itcr(lcr);
Handle(BRep_CurveRepresentation) cr;
Handle(BRep_GCurve) GC;
- Standard_Real f = 0.,l = 0.;
- Standard_Boolean rangeFound = Standard_False;
+ Standard_Real f = -Precision::Infinite(), l = Precision::Infinite();
// search the range of the 3d curve
// and remove any existing representation
// see lbo & flo, to determine whether range is defined
// compare first and last parameters with default values.
GC->Range(f, l);
- //lvt 15/6/99: On enleve la comparaison de reels infinis.
- Standard_Boolean undefined = (Precision::IsPositiveInfinite(l) ||
- Precision::IsNegativeInfinite(f));
-
- if (!undefined) {
- rangeFound = Standard_True;
- }
}
if (GC->IsCurveOnSurface(S,L)) {
// remove existing curve on surface
if (! C.IsNull()) {
Handle(BRep_CurveOnSurface) COS = new BRep_CurveOnSurface(C,S,L);
- // test if there is already a range
- if (rangeFound) {
- COS->SetRange(f,l);
+ Standard_Real aFCur = 0.0, aLCur = 0.0;
+ COS->Range(aFCur, aLCur);
+ if (!Precision::IsInfinite(f))
+ {
+ aFCur = f;
+ }
+
+ if (!Precision::IsInfinite(l))
+ {
+ aLCur = l;
}
- COS->SetUVPoints(Pf,Pl);
+
+ COS->SetRange(aFCur, aLCur);
+ COS->SetUVPoints(Pf, Pl);
lcr.Append(COS);
}
}
BRep_ListIteratorOfListOfCurveRepresentation itcr(lcr);
Handle(BRep_CurveRepresentation) cr;
Handle(BRep_GCurve) GC;
- Standard_Real f = 0.,l = 0.;
+ Standard_Real f = -Precision::Infinite(), l = Precision::Infinite();
while (itcr.More()) {
GC = Handle(BRep_GCurve)::DownCast(itcr.Value());
if ( !GC.IsNull() ) {
- GC->Range(f,l);
+ if (GC->IsCurve3D()) {
+ GC->Range(f,l);
+ }
Standard_Boolean iscos = GC->IsCurveOnSurface(S,L);
if (iscos) break;
}
}
if ( !C1.IsNull() && !C2.IsNull() ) {
- Handle(BRep_CurveOnClosedSurface) COS =
- new BRep_CurveOnClosedSurface(C1,C2,S,L,GeomAbs_C0);
- // test if there is already a range
- if (!GC.IsNull()) {
- COS->SetRange(f,l);
+ Handle(BRep_CurveOnClosedSurface) COS = new
+ BRep_CurveOnClosedSurface(C1,C2,S,L,GeomAbs_C0);
+ Standard_Real aFCur = 0.0, aLCur = 0.0;
+ COS->Range(aFCur, aLCur);
+ if (!Precision::IsInfinite(f))
+ {
+ aFCur = f;
+ }
+
+ if (!Precision::IsInfinite(l))
+ {
+ aLCur = l;
}
+
+ COS->SetRange(aFCur, aLCur);
lcr.Append(COS);
}
}
BRep_ListIteratorOfListOfCurveRepresentation itcr(lcr);
Handle(BRep_CurveRepresentation) cr;
Handle(BRep_GCurve) GC;
- Standard_Real f = 0.,l = 0.;
+ Standard_Real f = -Precision::Infinite(), l = Precision::Infinite();
while (itcr.More()) {
GC = Handle(BRep_GCurve)::DownCast(itcr.Value());
if ( !GC.IsNull() ) {
- GC->Range(f,l);
+ if (GC->IsCurve3D()) {
+ GC->Range(f,l);
+ }
Standard_Boolean iscos = GC->IsCurveOnSurface(S,L);
if (iscos) break;
}
}
if ( !C1.IsNull() && !C2.IsNull() ) {
- Handle(BRep_CurveOnClosedSurface) COS =
- new BRep_CurveOnClosedSurface(C1,C2,S,L,GeomAbs_C0);
- // test if there is already a range
- if (!GC.IsNull()) {
- COS->SetRange(f,l);
+ Handle(BRep_CurveOnClosedSurface) COS = new
+ BRep_CurveOnClosedSurface(C1,C2,S,L,GeomAbs_C0);
+ Standard_Real aFCur = 0.0, aLCur = 0.0;
+ COS->Range(aFCur, aLCur);
+ if (!Precision::IsInfinite(f))
+ {
+ aFCur = f;
+ }
+
+ if (!Precision::IsInfinite(l))
+ {
+ aLCur = l;
}
- COS->SetUVPoints2(Pf,Pl);
+
+ COS->SetRange(aFCur, aLCur);
+ COS->SetUVPoints2(Pf, Pl);
lcr.Append(COS);
}
}
const Standard_Real Tol) const
{
Handle(BRep_TFace) TF = new BRep_TFace();
+ if(!F.IsNull() && F.Locked())
+ {
+ throw TopoDS_LockedShape("BRep_Builder::MakeFace");
+ }
TF->Surface(S);
TF->Tolerance(Tol);
MakeShape(F,TF);
const Handle(Poly_Triangulation)& T) const
{
Handle(BRep_TFace) TF = new BRep_TFace();
+ if(!F.IsNull() && F.Locked())
+ {
+ throw TopoDS_LockedShape("BRep_Builder::MakeFace");
+ }
TF->Triangulation(T);
MakeShape(F, TF);
}
const Standard_Real Tol) const
{
Handle(BRep_TFace) TF = new BRep_TFace();
+ if(!F.IsNull() && F.Locked())
+ {
+ throw TopoDS_LockedShape("BRep_Builder::MakeFace");
+ }
TF->Surface(S);
TF->Tolerance(Tol);
TF->Location(L);
const Standard_Real Tol) const
{
const Handle(BRep_TFace)& TF = *((Handle(BRep_TFace)*) &F.TShape());
+ if(TF->Locked())
+ {
+ throw TopoDS_LockedShape("BRep_Builder::UpdateFace");
+ }
TF->Surface(S);
TF->Tolerance(Tol);
TF->Location(L.Predivided(F.Location()));
void BRep_Builder::UpdateFace(const TopoDS_Face& F,
const Handle(Poly_Triangulation)& T) const
{
- (*((Handle(BRep_TFace)*) &F.TShape()))->Triangulation(T);
+ const Handle(BRep_TFace)& TF = *((Handle(BRep_TFace)*) &F.TShape());
+ if(TF->Locked())
+ {
+ throw TopoDS_LockedShape("BRep_Builder::UpdateFace");
+ }
+ TF->Triangulation(T);
F.TShape()->Modified(Standard_True);
}
void BRep_Builder::UpdateFace(const TopoDS_Face& F,
const Standard_Real Tol) const
{
- (*((Handle(BRep_TFace)*) &F.TShape()))->Tolerance(Tol);
+ const Handle(BRep_TFace)& TF = *((Handle(BRep_TFace)*) &F.TShape());
+ if(TF->Locked())
+ {
+ throw TopoDS_LockedShape("BRep_Builder::UpdateFace");
+ }
+ TF->Tolerance(Tol);
F.TShape()->Modified(Standard_True);
}
void BRep_Builder::NaturalRestriction(const TopoDS_Face& F,
const Standard_Boolean N) const
{
- (*((Handle(BRep_TFace)*) &F.TShape()))->NaturalRestriction(N);
+ const Handle(BRep_TFace)& TF = (*((Handle(BRep_TFace)*) &F.TShape()));
+ if(TF->Locked())
+ {
+ throw TopoDS_LockedShape("BRep_Builder::NaturalRestriction");
+ }
+ TF->NaturalRestriction(N);
F.TShape()->Modified(Standard_True);
}
void BRep_Builder::MakeEdge(TopoDS_Edge& E) const
{
Handle(BRep_TEdge) TE = new BRep_TEdge();
- TE->Closed(Standard_False);
+ if(!E.IsNull() && E.Locked())
+ {
+ throw TopoDS_LockedShape("BRep_Builder::MakeEdge");
+ }
MakeShape(E,TE);
}
const Standard_Real Tol) const
{
const Handle(BRep_TEdge)& TE = *((Handle(BRep_TEdge)*) &E.TShape());
+ if(TE->Locked())
+ {
+ throw TopoDS_LockedShape("BRep_Builder::UpdateEdge");
+ }
const TopLoc_Location l = L.Predivided(E.Location());
UpdateCurves(TE->ChangeCurves(),C,l);
- if (!C.IsNull()) TE->Closed(C->IsClosed());
TE->UpdateTolerance(Tol);
TE->Modified(Standard_True);
const Standard_Real Tol) const
{
const Handle(BRep_TEdge)& TE = *((Handle(BRep_TEdge)*) &E.TShape());
+ if(TE->Locked())
+ {
+ throw TopoDS_LockedShape("BRep_Builder::UpdateEdge");
+ }
const TopLoc_Location l = L.Predivided(E.Location());
UpdateCurves(TE->ChangeCurves(),C,S,l);
const gp_Pnt2d& Pl) const
{
const Handle(BRep_TEdge)& TE = *((Handle(BRep_TEdge)*) &E.TShape());
+ if(TE->Locked())
+ {
+ throw TopoDS_LockedShape("BRep_Builder::UpdateEdge");
+ }
const TopLoc_Location l = L.Predivided(E.Location());
UpdateCurves(TE->ChangeCurves(),C,S,l,Pf,Pl);
const Standard_Real Tol) const
{
const Handle(BRep_TEdge)& TE = *((Handle(BRep_TEdge)*) &E.TShape());
+ if(TE->Locked())
+ {
+ throw TopoDS_LockedShape("BRep_Builder::UpdateEdge");
+ }
const TopLoc_Location l = L.Predivided(E.Location());
UpdateCurves(TE->ChangeCurves(),C1,C2,S,l);
- if (!C1.IsNull() && !C2.IsNull())
- TE->Closed(C1->IsClosed() && C2->IsClosed());
TE->UpdateTolerance(Tol);
TE->Modified(Standard_True);
const gp_Pnt2d& Pl) const
{
const Handle(BRep_TEdge)& TE = *((Handle(BRep_TEdge)*) &E.TShape());
+ if(TE->Locked())
+ {
+ throw TopoDS_LockedShape("BRep_Builder::UpdateEdge");
+ }
const TopLoc_Location l = L.Predivided(E.Location());
UpdateCurves(TE->ChangeCurves(),C1,C2,S,l,Pf,Pl);
- if (!C1.IsNull() && !C2.IsNull())
- TE->Closed(C1->IsClosed() && C2->IsClosed());
-
+
TE->UpdateTolerance(Tol);
TE->Modified(Standard_True);
}
const TopLoc_Location& L) const
{
const Handle(BRep_TEdge)& TE = *((Handle(BRep_TEdge)*) &E.TShape());
-
+ if(TE->Locked())
+ {
+ throw TopoDS_LockedShape("BRep_Builder::UpdateEdge");
+ }
BRep_ListOfCurveRepresentation& lcr = TE->ChangeCurves();
BRep_ListIteratorOfListOfCurveRepresentation itcr(lcr);
const TopLoc_Location& L) const
{
const Handle(BRep_TEdge)& TE = *((Handle(BRep_TEdge)*) &E.TShape());
+ if(TE->Locked())
+ {
+ throw TopoDS_LockedShape("BRep_Builder::UpdateEdge");
+ }
const TopLoc_Location l = L.Predivided(E.Location());
Standard_Boolean isModified = Standard_False;
while (itcr.More())
{
if (itcr.Value()->IsPolygonOnTriangulation(T,l))
- {
+ {
// cr is used to keep a reference on the curve representation
// this avoid deleting it as its content may be referenced by T
cr = itcr.Value();
lcr.Remove(itcr);
isModified = Standard_True;
break;
- }
+ }
itcr.Next();
}
const TopLoc_Location& L) const
{
const Handle(BRep_TEdge)& TE = *((Handle(BRep_TEdge)*) &E.TShape());
+ if(TE->Locked())
+ {
+ throw TopoDS_LockedShape("BRep_Builder::UpdateEdge");
+ }
const TopLoc_Location l = L.Predivided(E.Location());
Standard_Boolean isModified = Standard_False;
const TopLoc_Location& L) const
{
const Handle(BRep_TEdge)& TE = *((Handle(BRep_TEdge)*) &E.TShape());
+ if(TE->Locked())
+ {
+ throw TopoDS_LockedShape("BRep_Builder::UpdateEdge");
+ }
TopLoc_Location l = L.Predivided(E.Location());
BRep_ListOfCurveRepresentation& lcr = TE->ChangeCurves();
const TopLoc_Location& L) const
{
const Handle(BRep_TEdge)& TE = *((Handle(BRep_TEdge)*) &E.TShape());
+ if(TE->Locked())
+ {
+ throw TopoDS_LockedShape("BRep_Builder::UpdateEdge");
+ }
TopLoc_Location l = L.Predivided(E.Location());
BRep_ListOfCurveRepresentation& lcr = TE->ChangeCurves();
const Standard_Real Tol) const
{
const Handle(BRep_TEdge)& TE = *((Handle(BRep_TEdge)*) &E.TShape());
+ if(TE->Locked())
+ {
+ throw TopoDS_LockedShape("BRep_Builder::UpdateEdge");
+ }
TE->UpdateTolerance(Tol);
TE->Modified(Standard_True);
}
const GeomAbs_Shape C)const
{
const Handle(BRep_TEdge)& TE = *((Handle(BRep_TEdge)*) &E.TShape());
-
+ if(TE->Locked())
+ {
+ throw TopoDS_LockedShape("BRep_Builder::Continuity");
+ }
const TopLoc_Location l1 = L1.Predivided(E.Location());
const TopLoc_Location l2 = L2.Predivided(E.Location());
const Standard_Boolean S) const
{
const Handle(BRep_TEdge)& TE = *((Handle(BRep_TEdge)*) &E.TShape());
+ if(TE->Locked())
+ {
+ throw TopoDS_LockedShape("BRep_Builder::SameParameter");
+ }
TE->SameParameter(S);
TE->Modified(Standard_True);
}
const Standard_Boolean S) const
{
const Handle(BRep_TEdge)& TE = *((Handle(BRep_TEdge)*) &E.TShape());
+ if(TE->Locked())
+ {
+ throw TopoDS_LockedShape("BRep_Builder::SameRange");
+ }
TE->SameRange(S);
TE->Modified(Standard_True);
}
const Standard_Boolean D) const
{
const Handle(BRep_TEdge)& TE = *((Handle(BRep_TEdge)*) &E.TShape());
+ if(TE->Locked())
+ {
+ throw TopoDS_LockedShape("BRep_Builder::Degenerated");
+ }
TE->Degenerated(D);
if (D) {
// set a null 3d curve
{
// set the range to all the representations if Only3d=FALSE
const Handle(BRep_TEdge)& TE = *((Handle(BRep_TEdge)*) &E.TShape());
-
+ if(TE->Locked())
+ {
+ throw TopoDS_LockedShape("BRep_Builder::Range");
+ }
BRep_ListOfCurveRepresentation& lcr = TE->ChangeCurves();
BRep_ListIteratorOfListOfCurveRepresentation itcr(lcr);
Handle(BRep_GCurve) GC;
while (itcr.More()) {
GC = Handle(BRep_GCurve)::DownCast(itcr.Value());
- if (!GC.IsNull()) {
- if (!Only3d || GC->IsCurve3D())
- GC->SetRange(First,Last);
- if (GC->IsCurve3D()) {
- // Set the closedness flag to the correct value.
- Handle(Geom_Curve) C = GC->Curve3D();
-
- //fixing a bug PRO18577 to avoid infinite values of First and Last
- if ( !C.IsNull() &&
- !Precision::IsNegativeInfinite(First) &&
- !Precision::IsPositiveInfinite(Last) ) {
- Standard_Boolean closed =
- C->Value(First).IsEqual(C->Value(Last),BRep_Tool::Tolerance(E));
- TE->Closed(closed);
- }
- }
- }
+ if (!GC.IsNull() && (!Only3d || GC->IsCurve3D()))
+ GC->SetRange(First,Last);
itcr.Next();
}
const Standard_Real Last) const
{
const Handle(BRep_TEdge)& TE = *((Handle(BRep_TEdge)*) &E.TShape());
+ if(TE->Locked())
+ {
+ throw TopoDS_LockedShape("BRep_Builder::Range");
+ }
const TopLoc_Location l = L.Predivided(E.Location());
BRep_ListOfCurveRepresentation& lcr = TE->ChangeCurves();
while (itcr.More()) {
GC = Handle(BRep_GCurve)::DownCast(itcr.Value());
- if (!GC.IsNull()) {
- if (GC->IsCurveOnSurface(S,l)) {
- GC->SetRange(First,Last);
-
- // Set the closedness flag to the correct value.
- Handle(Geom2d_Curve) PC = GC->PCurve();
- gp_Pnt2d P1 = PC->Value(First);
- gp_Pnt2d P2 = PC->Value(Last);
- gp_Pnt PP1 = S->Value(P1.X(),P1.Y());
- gp_Pnt PP2 = S->Value(P2.X(),P2.Y());
- Standard_Boolean closed = PP1.IsEqual(PP2,BRep_Tool::Tolerance(E));
- TE->Closed(closed);
- break;
- }
+ if (!GC.IsNull() && GC->IsCurveOnSurface(S,l))
+ {
+ GC->SetRange(First,Last);
+ break;
}
itcr.Next();
}
if (!itcr.More())
- Standard_DomainError::Raise("BRep_Builder::Range, no pcurve");
+ throw Standard_DomainError("BRep_Builder::Range, no pcurve");
TE->Modified(Standard_True);
}
const TopoDS_Edge& Eout) const
{
const Handle(BRep_TEdge)& TE = *((Handle(BRep_TEdge)*) &Ein.TShape());
-
const Standard_Real tol = TE->Tolerance();
-
- BRep_ListOfCurveRepresentation& lcr = TE->ChangeCurves();
+
+ const BRep_ListOfCurveRepresentation& lcr = TE->Curves();
BRep_ListIteratorOfListOfCurveRepresentation itcr(lcr);
while (itcr.More()) {
const Standard_Real Tol) const
{
const Handle(BRep_TVertex)& TV = *((Handle(BRep_TVertex)*) &V.TShape());
-
+ if(TV->Locked())
+ {
+ throw TopoDS_LockedShape("BRep_Builder::UpdateVertex");
+ }
TV->Pnt(P.Transformed(V.Location().Inverted().Transformation()));
TV->UpdateTolerance(Tol);
TV->Modified(Standard_True);
{
if (Precision::IsPositiveInfinite(Par) ||
Precision::IsNegativeInfinite(Par))
- Standard_DomainError::Raise("BRep_Builder::Infinite parameter");
+ throw Standard_DomainError("BRep_Builder::Infinite parameter");
const Handle(BRep_TVertex)& TV = *((Handle(BRep_TVertex)*) &V.TShape());
const Handle(BRep_TEdge)& TE = *((Handle(BRep_TEdge)*) &E.TShape());
+ if(TV->Locked() || TE->Locked())
+ {
+ throw TopoDS_LockedShape("BRep_Builder::UpdateVertex");
+ }
+
TopLoc_Location L = E.Location().Predivided(V.Location());
// Search the vertex in the edge
{
if (Precision::IsPositiveInfinite(Par) ||
Precision::IsNegativeInfinite(Par))
- Standard_DomainError::Raise("BRep_Builder::Infinite parameter");
+ throw Standard_DomainError("BRep_Builder::Infinite parameter");
// Find the curve representation
TopLoc_Location l = L.Predivided(V.Location());
const Handle(BRep_TVertex)& TV = *((Handle(BRep_TVertex)*) &V.TShape());
const Handle(BRep_TEdge)& TE = *((Handle(BRep_TEdge)*) &E.TShape());
+ if(TV->Locked() || TE->Locked())
+ {
+ throw TopoDS_LockedShape("BRep_Builder::UpdateVertex");
+ }
// Search the vertex in the edge
TopAbs_Orientation ori = TopAbs_INTERNAL;
}
if (!itcr.More())
- Standard_DomainError::Raise("BRep_Builder:: no pcurve");
+ throw Standard_DomainError("BRep_Builder:: no pcurve");
TV->UpdateTolerance(Tol);
TE->Modified(Standard_True);
{
const Handle(BRep_TVertex)& TV = *((Handle(BRep_TVertex)*) &Ve.TShape());
+ if(TV->Locked())
+ {
+ throw TopoDS_LockedShape("BRep_Builder::UpdateVertex");
+ }
+
TopLoc_Location L;
const Handle(Geom_Surface)& S = BRep_Tool::Surface(F,L);
L = L.Predivided(Ve.Location());
const Standard_Real Tol) const
{
const Handle(BRep_TVertex)& TV = *((Handle(BRep_TVertex)*) &V.TShape());
+
+ if(TV->Locked())
+ {
+ throw TopoDS_LockedShape("BRep_Builder::UpdateVertex");
+ }
+
TV->UpdateTolerance(Tol);
TV->Modified(Standard_True);
}