1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-07-10 12:25:50 +03:00

0024618: Embedding vertex in BOP depends on the order of arguments

Changes: class BOPDS_DS
   - method:
void BOPDS_DS::AloneVertices(const Standard_Integer theI,
                             BOPCol_ListOfInteger& theLI)const
The condition for DS-index of a vertex has been corrected

class BOPTools_AlgoTools3D
   - static function:
Standard_Boolean HasGeometry(const TopoDS_Shape& aS)
The returnig value  has been corrected for shapes of vertex type

Modified entities:
packages:
BOPDS
BOPTools

Test cases for issue CR24618
This commit is contained in:
pkv 2014-02-20 16:53:03 +04:00 committed by abv
parent 015bb6553d
commit 9df27a0ff6
6 changed files with 343 additions and 186 deletions

View File

@ -272,7 +272,8 @@ Standard_Integer BOPDS_DS::Append(const TopoDS_Shape& theS)
//function : ShapeInfo
//purpose :
//=======================================================================
const BOPDS_ShapeInfo& BOPDS_DS::ShapeInfo(const Standard_Integer theI)const
const BOPDS_ShapeInfo& BOPDS_DS::ShapeInfo
(const Standard_Integer theI)const
{
return myLines(theI);
}
@ -318,8 +319,8 @@ Standard_Integer BOPDS_DS::Index(const TopoDS_Shape& theS)const
//=======================================================================
void BOPDS_DS::Init()
{
Standard_Integer i1, i2, j, aI, aNb, aNbS, aNbE, aNbSx, nV, nW, nE, aNbF;
Standard_Integer n1, n2, n3;
Standard_Integer i1, i2, j, aI, aNb, aNbS, aNbE, aNbSx;
Standard_Integer n1, n2, n3, nV, nW, nE, aNbF;
Standard_Real aTol;
TopAbs_ShapeEnum aTS;
TopoDS_Iterator aItS;
@ -618,7 +619,8 @@ void BOPDS_DS::Init()
//function : InitShape
//purpose :
//=======================================================================
void BOPDS_DS::InitShape(const Standard_Integer aI,
void BOPDS_DS::InitShape
(const Standard_Integer aI,
const TopoDS_Shape& aS,
Handle(NCollection_BaseAllocator)& theAllocator,
BOPCol_DataMapOfShapeInteger& aMSI)
@ -718,7 +720,8 @@ Standard_Boolean BOPDS_DS::HasInterfShapeSubShapes
//function : HasInterfSubShapes
//purpose :
//=======================================================================
Standard_Boolean BOPDS_DS::HasInterfSubShapes(const Standard_Integer theI1,
Standard_Boolean BOPDS_DS::HasInterfSubShapes
(const Standard_Integer theI1,
const Standard_Integer theI2)const
{
Standard_Boolean bRet;
@ -768,7 +771,8 @@ Standard_Boolean BOPDS_DS::HasPaveBlocks(const Standard_Integer theI)const
//function : PaveBlocks
//purpose :
//=======================================================================
const BOPDS_ListOfPaveBlock& BOPDS_DS::PaveBlocks(const Standard_Integer theI)const
const BOPDS_ListOfPaveBlock& BOPDS_DS::PaveBlocks
(const Standard_Integer theI)const
{
static BOPDS_ListOfPaveBlock sLPB;
Standard_Integer aRef;
@ -784,7 +788,8 @@ const BOPDS_ListOfPaveBlock& BOPDS_DS::PaveBlocks(const Standard_Integer theI)co
//function : ChangePaveBlocks
//purpose :
//=======================================================================
BOPDS_ListOfPaveBlock& BOPDS_DS::ChangePaveBlocks(const Standard_Integer theI)
BOPDS_ListOfPaveBlock& BOPDS_DS::ChangePaveBlocks
(const Standard_Integer theI)
{
Standard_Boolean bHasReference;
Standard_Integer aRef;
@ -1387,7 +1392,8 @@ void BOPDS_DS::AloneVertices(const Standard_Integer theI,
const BOPDS_FaceInfo& aFI=FaceInfo(theI);
//
for (i=0; i<2; ++i) {
const BOPDS_IndexedMapOfPaveBlock& aMPB=(!i) ? aFI.PaveBlocksIn() : aFI.PaveBlocksSc();
const BOPDS_IndexedMapOfPaveBlock& aMPB=
(!i) ? aFI.PaveBlocksIn() : aFI.PaveBlocksSc();
aItMPB.Initialize(aMPB);
for (; aItMPB.More(); aItMPB.Next()) {
const Handle(BOPDS_PaveBlock)& aPB=aItMPB.Value();
@ -1398,11 +1404,12 @@ void BOPDS_DS::AloneVertices(const Standard_Integer theI,
}
//
for (i=0; i<2; ++i) {
const BOPCol_MapOfInteger& aMIV=(!i) ? aFI.VerticesIn() : aFI.VerticesSc();
const BOPCol_MapOfInteger& aMIV=
(!i) ? aFI.VerticesIn() : aFI.VerticesSc();
aItMI.Initialize(aMIV);
for (; aItMI.More(); aItMI.Next()) {
nV=aItMI.Value();
if (nV>0) {
if (nV>=0) {
if (aMI.Add(nV)) {
theLI.Append(nV);
}
@ -1415,7 +1422,8 @@ void BOPDS_DS::AloneVertices(const Standard_Integer theI,
//function : VerticesOnIn
//purpose :
//=======================================================================
void BOPDS_DS::VerticesOnIn(const Standard_Integer nF1,
void BOPDS_DS::VerticesOnIn
(const Standard_Integer nF1,
const Standard_Integer nF2,
BOPCol_MapOfInteger& aMI,
BOPDS_MapOfPaveBlock& aMPB)const
@ -1548,7 +1556,8 @@ void BOPDS_DS::AddShapeSD(const Standard_Integer theIndex,
//function : HasShapeSD
//purpose :
//=======================================================================
Standard_Boolean BOPDS_DS::HasShapeSD(const Standard_Integer theIndex,
Standard_Boolean BOPDS_DS::HasShapeSD
(const Standard_Integer theIndex,
Standard_Integer& theIndexSD)const
{
Standard_Boolean bRet;
@ -1595,7 +1604,8 @@ void BOPDS_DS::Dump()const
// function: CheckCoincidence
// purpose:
//=======================================================================
Standard_Boolean BOPDS_DS::CheckCoincidence(const Handle(BOPDS_PaveBlock)& aPB1,
Standard_Boolean BOPDS_DS::CheckCoincidence
(const Handle(BOPDS_PaveBlock)& aPB1,
const Handle(BOPDS_PaveBlock)& aPB2)
{
Standard_Boolean bRet;
@ -1635,7 +1645,6 @@ Standard_Boolean BOPDS_DS::CheckCoincidence(const Handle(BOPDS_PaveBlock)& aPB1,
}
return bRet;
}
//=======================================================================
// function: SortPaveBlocks
// purpose:
@ -1670,12 +1679,12 @@ void BOPDS_DS::SortPaveBlocks(const Handle(BOPDS_CommonBlock)& aCB)
//
aCB->AddPaveBlocks(aLPBN);
}
//=======================================================================
// function: IsToSort
// purpose:
//=======================================================================
Standard_Boolean BOPDS_DS::IsToSort(const Handle(BOPDS_CommonBlock)& aCB,
Standard_Boolean BOPDS_DS::IsToSort
(const Handle(BOPDS_CommonBlock)& aCB,
Standard_Integer& theI)
{
Standard_Boolean bRet;
@ -1712,12 +1721,12 @@ Standard_Boolean BOPDS_DS::IsToSort(const Handle(BOPDS_CommonBlock)& aCB,
return bRet;
}
//=======================================================================
// function: IsSubShape
// purpose:
//=======================================================================
Standard_Boolean BOPDS_DS::IsSubShape(const Standard_Integer theI1,
Standard_Boolean BOPDS_DS::IsSubShape
(const Standard_Integer theI1,
const Standard_Integer theI2)
{
Standard_Boolean bRet;
@ -1862,8 +1871,6 @@ void ResetShapes(const TopoDS_Shape& aS)
ResetShape(aSx);
}
}
#include <Geom_Curve.hxx>
//=======================================================================
//function : ComputeParameter
//purpose :

View File

@ -83,13 +83,12 @@ static
//function : DoSplitSEAMOnFace
//purpose :
//=======================================================================
void BOPTools_AlgoTools3D::DoSplitSEAMOnFace (const TopoDS_Edge& aSplit,
void BOPTools_AlgoTools3D::DoSplitSEAMOnFace (const TopoDS_Edge& aSplit,
const TopoDS_Face& aF)
{
Standard_Boolean bIsUPeriodic, bIsVPeriodic, bIsLeft = Standard_False;
Standard_Real aTol, a, b, anUPeriod, anVPeriod, aT, anU, dU/*=1.e-7*/, anU1,
anV, dV/*=1.e-7*/, anV1;
Standard_Real aScPr;
Standard_Boolean bIsUPeriodic, bIsVPeriodic, bIsLeft;
Standard_Real aTol, a, b, anUPeriod, anVPeriod, aT, anU, dU, anU1;
Standard_Real aScPr, anV, dV, anV1;
gp_Pnt2d aP2D;
gp_Vec2d aVec2D;
Handle(Geom2d_Curve) aTmpC1, aTmpC2;
@ -99,6 +98,7 @@ static
BRep_Builder BB;
TopoDS_Edge aSp;
//
bIsLeft = Standard_False;
aSp=aSplit;
aSp.Orientation(TopAbs_FORWARD);
aTol=BRep_Tool::Tolerance(aSp);
@ -188,10 +188,12 @@ static
aScPr = (anU1==anU) ? aDir2D1*aDOX : aDir2D1*aDOY;
//
aTmpC1=Handle(Geom2d_Curve)::DownCast(C2D1->Copy());
Handle(Geom2d_TrimmedCurve) aC1 = new Geom2d_TrimmedCurve(aTmpC1, a, b);
Handle(Geom2d_TrimmedCurve) aC1 =
new Geom2d_TrimmedCurve(aTmpC1, a, b);
//
aTmpC2=Handle(Geom2d_Curve)::DownCast(C2D1->Copy());
Handle(Geom2d_TrimmedCurve) aC2 = new Geom2d_TrimmedCurve(aTmpC2, a, b);
Handle(Geom2d_TrimmedCurve) aC2 =
new Geom2d_TrimmedCurve(aTmpC2, a, b);
gp_Vec2d aTrV(anU1-anU, anV1-anV);
aC2->Translate(aTrV);
//
@ -212,12 +214,11 @@ static
}
}
}
//=======================================================================
//function : GetNormalToFaceOnEdge
//purpose :
//=======================================================================
void BOPTools_AlgoTools3D::GetNormalToFaceOnEdge (const TopoDS_Edge& aE,
void BOPTools_AlgoTools3D::GetNormalToFaceOnEdge (const TopoDS_Edge& aE,
const TopoDS_Face& aF,
gp_Dir& aDNF)
{
@ -232,12 +233,11 @@ static
aDNF.Reverse();
}
}
//=======================================================================
//function : GetNormalToFaceOnEdge
//purpose :
//=======================================================================
void BOPTools_AlgoTools3D::GetNormalToFaceOnEdge (const TopoDS_Edge& aE,
void BOPTools_AlgoTools3D::GetNormalToFaceOnEdge (const TopoDS_Edge& aE,
const TopoDS_Face& aF1,
const Standard_Real aT,
gp_Dir& aDNF1)
@ -262,15 +262,15 @@ static
aDNF1=aDD1U^aDD1V;
}
//=======================================================================
//function : SenseFlag
//purpose :
//=======================================================================
Standard_Integer BOPTools_AlgoTools3D::SenseFlag (const gp_Dir& aDNF1,
Standard_Integer BOPTools_AlgoTools3D::SenseFlag (const gp_Dir& aDNF1,
const gp_Dir& aDNF2)
{
Standard_Boolean bIsDirsCoinside;
//
bIsDirsCoinside=IntTools_Tools::IsDirsCoinside(aDNF1, aDNF2);
if (!bIsDirsCoinside) {
return 0;
@ -287,12 +287,12 @@ static
}
return -1;
}
//=======================================================================
//function : GetNormalToSurface
//purpose :
//=======================================================================
Standard_Boolean BOPTools_AlgoTools3D::GetNormalToSurface (const Handle(Geom_Surface)& aS,
Standard_Boolean BOPTools_AlgoTools3D::GetNormalToSurface
(const Handle(Geom_Surface)& aS,
const Standard_Real U,
const Standard_Real V,
gp_Dir& aDNS)
@ -315,13 +315,12 @@ static
aDNS=aDD1U^aDD1V;
return bFlag;
}
//=======================================================================
//function : GetApproxNormalToFaceOnEdge
//purpose :
//=======================================================================
void BOPTools_AlgoTools3D::GetApproxNormalToFaceOnEdge(const TopoDS_Edge& aE,
void BOPTools_AlgoTools3D::GetApproxNormalToFaceOnEdge
(const TopoDS_Edge& aE,
const TopoDS_Face& aF,
const Standard_Real aT,
gp_Pnt& aPNear,
@ -329,7 +328,8 @@ static
Standard_Real aDt2D)
{
Standard_Real aFirst, aLast;
Handle(Geom2d_Curve) aC2D= BRep_Tool::CurveOnSurface (aE, aF, aFirst, aLast);
Handle(Geom2d_Curve) aC2D=
BRep_Tool::CurveOnSurface (aE, aF, aFirst, aLast);
if (aC2D.IsNull()) {
return;
@ -338,19 +338,19 @@ static
PointNearEdge (aE, aF, aT, aDt2D, aPx2DNear, aPNear);
Handle(Geom_Surface) aS=BRep_Tool::Surface(aF);
BOPTools_AlgoTools3D::GetNormalToSurface (aS, aPx2DNear.X(), aPx2DNear.Y(), aDNF);
BOPTools_AlgoTools3D::GetNormalToSurface
(aS, aPx2DNear.X(), aPx2DNear.Y(), aDNF);
if (aF.Orientation()==TopAbs_REVERSED){
aDNF.Reverse();
}
}
//=======================================================================
//function : GetApproxNormalToFaceOnEdge
//purpose :
//=======================================================================
void BOPTools_AlgoTools3D::GetApproxNormalToFaceOnEdge (const TopoDS_Edge& aE,
void BOPTools_AlgoTools3D::GetApproxNormalToFaceOnEdge
(const TopoDS_Edge& aE,
const TopoDS_Face& aF,
const Standard_Real aT,
gp_Pnt& aPNear,
@ -358,29 +358,31 @@ static
Handle(BOPInt_Context)& theContext)
{
Standard_Real aFirst, aLast;
Handle(Geom2d_Curve) aC2D= BRep_Tool::CurveOnSurface (aE, aF, aFirst, aLast);
Handle(Geom2d_Curve) aC2D=
BRep_Tool::CurveOnSurface (aE, aF, aFirst, aLast);
if (aC2D.IsNull()) {
return;
}
//gp_Pnt aPNear;
gp_Pnt2d aPx2DNear;
BOPTools_AlgoTools3D::PointNearEdge (aE, aF, aT, aPx2DNear, aPNear, theContext);
BOPTools_AlgoTools3D::PointNearEdge
(aE, aF, aT, aPx2DNear, aPNear, theContext);
Handle(Geom_Surface) aS=BRep_Tool::Surface(aF);
BOPTools_AlgoTools3D::GetNormalToSurface (aS, aPx2DNear.X(), aPx2DNear.Y(), aDNF);
BOPTools_AlgoTools3D::GetNormalToSurface
(aS, aPx2DNear.X(), aPx2DNear.Y(), aDNF);
if (aF.Orientation()==TopAbs_REVERSED){
aDNF.Reverse();
}
}
//=======================================================================
//function : PointNearEdge
//purpose :
//=======================================================================
void BOPTools_AlgoTools3D::PointNearEdge (const TopoDS_Edge& aE,
void BOPTools_AlgoTools3D::PointNearEdge (const TopoDS_Edge& aE,
const TopoDS_Face& aF,
const Standard_Real aT,
const Standard_Real aDt2D,
@ -448,21 +450,23 @@ static
aPx2DNear = aPx2D.Translated( transVec );
}
else {
aPx2DNear.SetCoord (aPx2D.X()+aDt2D*aDP.X(), aPx2D.Y()+aDt2D*aDP.Y());
aPx2DNear.SetCoord
(aPx2D.X()+aDt2D*aDP.X(), aPx2D.Y()+aDt2D*aDP.Y());
}
}
else {
aPx2DNear.SetCoord (aPx2D.X()+aDt2D*aDP.X(), aPx2D.Y()+aDt2D*aDP.Y());
aPx2DNear.SetCoord
(aPx2D.X()+aDt2D*aDP.X(), aPx2D.Y()+aDt2D*aDP.Y());
}
//
aS->D0(aPx2DNear.X(), aPx2DNear.Y(), aPxNear);
}
//=======================================================================
//function : PointNearEdge
//purpose :
//=======================================================================
void BOPTools_AlgoTools3D::PointNearEdge (const TopoDS_Edge& aE,
void BOPTools_AlgoTools3D::PointNearEdge
(const TopoDS_Edge& aE,
const TopoDS_Face& aF,
const Standard_Real aT,
gp_Pnt2d& aPx2DNear,
@ -489,7 +493,8 @@ void BOPTools_AlgoTools3D::PointNearEdge (const TopoDS_Edge& aE,
dT2D=dTx;
}
//
BOPTools_AlgoTools3D::PointNearEdge (aE, aF, aT, dT2D, aPx2DNear, aPxNear);
BOPTools_AlgoTools3D::PointNearEdge
(aE, aF, aT, dT2D, aPx2DNear, aPxNear);
if (!theContext->IsPointInOnFace(aF, aPx2DNear)) {
Standard_Integer iErr;
Standard_Real aU1, aU2, aV1, aV2, dV, dU, dTresh;
@ -507,7 +512,8 @@ void BOPTools_AlgoTools3D::PointNearEdge (const TopoDS_Edge& aE,
}
//
if (dU < dTresh || dV < dTresh) {
iErr = BOPTools_AlgoTools3D::PointInFace(aF, aP, aP2d, theContext);
iErr = BOPTools_AlgoTools3D::PointInFace
(aF, aP, aP2d, theContext);
if (!iErr) {
aPxNear = aP;
aPx2DNear = aP2d;
@ -515,12 +521,12 @@ void BOPTools_AlgoTools3D::PointNearEdge (const TopoDS_Edge& aE,
}
}
}
//=======================================================================
// function: PointNearEdge
// purpose:
//=======================================================================
void BOPTools_AlgoTools3D::PointNearEdge (const TopoDS_Edge& aE,
void BOPTools_AlgoTools3D::PointNearEdge
(const TopoDS_Edge& aE,
const TopoDS_Face& aF,
gp_Pnt2d& aPInFace2D,
gp_Pnt& aPInFace,
@ -538,24 +544,24 @@ void BOPTools_AlgoTools3D::PointNearEdge (const TopoDS_Edge& aE,
aFF.Orientation(TopAbs_FORWARD);
BOPTools_AlgoTools3D::OrientEdgeOnFace (aE, aFF, aERight);
BOPTools_AlgoTools3D::PointNearEdge (aERight, aFF, aT, aPInFace2D, aPInFace, theContext);
BOPTools_AlgoTools3D::PointNearEdge
(aERight, aFF, aT, aPInFace2D, aPInFace, theContext);
}
//=======================================================================
//function : MinStepIn2d
//purpose :
//=======================================================================
Standard_Real BOPTools_AlgoTools3D::MinStepIn2d()
Standard_Real BOPTools_AlgoTools3D::MinStepIn2d()
{
Standard_Real dt=1.e-5;
return dt;
}
//=======================================================================
//function : IsEmptyShape
//purpose :
//=======================================================================
Standard_Boolean BOPTools_AlgoTools3D::IsEmptyShape(const TopoDS_Shape& aS)
Standard_Boolean BOPTools_AlgoTools3D::IsEmptyShape
(const TopoDS_Shape& aS)
{
Standard_Boolean bHasGeometry=Standard_False;
//
@ -565,7 +571,6 @@ void BOPTools_AlgoTools3D::PointNearEdge (const TopoDS_Edge& aE,
return !bHasGeometry;
}
//=======================================================================
//function : Add
//purpose :
@ -606,39 +611,18 @@ void Add(const TopoDS_Shape& aS,
}
}
}
//=======================================================================
//function : HasGeometry
//purpose :
//=======================================================================
Standard_Boolean HasGeometry(const TopoDS_Shape& aS)
Standard_Boolean HasGeometry(const TopoDS_Shape& aS)
{
Standard_Boolean bHasGeometry=Standard_True;
TopAbs_ShapeEnum aType= aS.ShapeType();
if (aType == TopAbs_VERTEX) {
Handle(BRep_TVertex) TV = Handle(BRep_TVertex)::DownCast(aS.TShape());
BRep_ListIteratorOfListOfPointRepresentation itrp(TV->Points());
while (itrp.More()) {
const Handle(BRep_PointRepresentation)& PR = itrp.Value();
if (PR->IsPointOnCurve()) {
return bHasGeometry;
}
else if (PR->IsPointOnCurveOnSurface()) {
return bHasGeometry;
}
else if (PR->IsPointOnSurface()) {
return bHasGeometry;
}
itrp.Next();
}
}
//
else if (aType == TopAbs_EDGE) {
Handle(BRep_TEdge) TE = Handle(BRep_TEdge)::DownCast(aS.TShape());
@ -683,13 +667,11 @@ void Add(const TopoDS_Shape& aS,
return !bHasGeometry;
}
//=======================================================================
//function : OrientEdgeOnFace
//purpose :
//=======================================================================
void BOPTools_AlgoTools3D::OrientEdgeOnFace (const TopoDS_Edge& aE,
void BOPTools_AlgoTools3D::OrientEdgeOnFace (const TopoDS_Edge& aE,
const TopoDS_Face& aF,
TopoDS_Edge& aERight)
{
@ -728,12 +710,12 @@ void Add(const TopoDS_Shape& aS,
aERight=aE;
aERight.Orientation(aE.Orientation());
}
//=======================================================================
//function : PointInFace
//purpose :
//=======================================================================
Standard_Integer BOPTools_AlgoTools3D::PointInFace(const TopoDS_Face& aF,
Standard_Integer BOPTools_AlgoTools3D::PointInFace
(const TopoDS_Face& aF,
gp_Pnt& theP,
gp_Pnt2d& theP2D,
Handle(BOPInt_Context)& theContext)
@ -783,7 +765,7 @@ void Add(const TopoDS_Shape& aS,
//
aNbDomains=aHatcher.NbDomains(aIx);
if (aNbDomains > 0) {
const HatchGen_Domain& aDomain=aHatcher.Domain (aIx, 1) ;
const HatchGen_Domain& aDomain=aHatcher.Domain (aIx, 1);
bHasFirstPoint=aDomain.HasFirstPoint();
if (!bHasFirstPoint) {
iErr=3;

View File

@ -0,0 +1,42 @@
puts "========="
puts "OCC24618"
puts "========="
puts ""
###########################################################
# Embedding vertex in BOP depends on the order of arguments
###########################################################
# Create a cylindrical face
cylinder c1 20
trimv c1 c1 0 50
mkface c1 c1
# Create a vertex
vertex v1 0 20 25
# Build partition
bclearobjects
bcleartools
#---------------#
baddobjects c1 v1
#---------------#
bfillds
bbuild r
# Explode the result compound
explode r
# Check number of shapes
renamevar r_1 result
set nb_v_good 1
set nb_e_good 0
set nb_w_good 0
set nb_f_good 0
set nb_sh_good 0
set nb_sol_good 0
set nb_compsol_good 0
set nb_compound_good 0
set nb_shape_good 1
set 2dviewer 1

View File

@ -0,0 +1,42 @@
puts "========="
puts "OCC24618"
puts "========="
puts ""
###########################################################
# Embedding vertex in BOP depends on the order of arguments
###########################################################
# Create a cylindrical face
cylinder c1 20
trimv c1 c1 0 50
mkface c1 c1
# Create a vertex
vertex v1 0 20 25
# Build partition
bclearobjects
bcleartools
#---------------#
baddobjects c1 v1
#---------------#
bfillds
bbuild r
# Explode the result compound
explode r
# Check number of shapes
renamevar r_2 result
set nb_v_good 3
set nb_e_good 3
set nb_w_good 1
set nb_f_good 1
set nb_sh_good 0
set nb_sol_good 0
set nb_compsol_good 0
set nb_compound_good 0
set nb_shape_good 8
set 2dviewer 1

View File

@ -0,0 +1,42 @@
puts "========="
puts "OCC24618"
puts "========="
puts ""
###########################################################
# Embedding vertex in BOP depends on the order of arguments
###########################################################
# Create a cylindrical face
cylinder c1 20
trimv c1 c1 0 50
mkface c1 c1
# Create a vertex
vertex v1 0 20 25
# Build partition
bclearobjects
bcleartools
#---------------#
baddobjects v1 c1
#---------------#
bfillds
bbuild r
# Explode the result compound
explode r
# Check number of shapes
renamevar r_1 result
set nb_v_good 1
set nb_e_good 0
set nb_w_good 0
set nb_f_good 0
set nb_sh_good 0
set nb_sol_good 0
set nb_compsol_good 0
set nb_compound_good 0
set nb_shape_good 1
set 2dviewer 1

View File

@ -0,0 +1,42 @@
puts "========="
puts "OCC24618"
puts "========="
puts ""
###########################################################
# Embedding vertex in BOP depends on the order of arguments
###########################################################
# Create a cylindrical face
cylinder c1 20
trimv c1 c1 0 50
mkface c1 c1
# Create a vertex
vertex v1 0 20 25
# Build partition
bclearobjects
bcleartools
#---------------#
baddobjects v1 c1
#---------------#
bfillds
bbuild r
# Explode the result compound
explode r
# Check number of shapes
renamevar r_2 result
set nb_v_good 3
set nb_e_good 3
set nb_w_good 1
set nb_f_good 1
set nb_sh_good 0
set nb_sol_good 0
set nb_compsol_good 0
set nb_compound_good 0
set nb_shape_good 8
set 2dviewer 1