Commit 8b69061f authored by Dennis Gläser's avatar Dennis Gläser
Browse files

[netbuilder] generated shapes are no fragments

According to the OCC docu, generated shapes are only those that do not
have the same dimension as the shapes participating in a boolean
operation. Thus, inserting them as fragments here leads to errors in the brep
writer and is not what we want. In OCC7.5 this fails while OCC7.3 did
not have issues with this for some reason.
parent 22d6ece9
Pipeline #2419 passed with stage
......@@ -255,18 +255,12 @@ protected:
// map all fragments to this new index
const bool isDeleted = intersection.IsDeleted(entityShape);
const auto& generated = intersection.Generated(entityShape);
const auto& modified = intersection.Modified(entityShape);
if (!isDeleted && generated.IsEmpty() && modified.IsEmpty())
if (!isDeleted && modified.IsEmpty())
{
newIndexMap.Bind(entityShape, entityIdx);
newList.Append(entityShape);
}
for (const auto& fragment : generated)
{
if (!newIndexMap.IsBound(fragment)) newIndexMap.Bind(fragment, entityIdx);
if (!newList.Contains(fragment)) newList.Append(fragment);
}
for (const auto& fragment : modified)
{
if (!newIndexMap.IsBound(fragment)) newIndexMap.Bind(fragment, entityIdx);
......@@ -348,20 +342,14 @@ protected:
// map all fragments to this new index
const bool isDeleted = fragmentAlgo.IsDeleted(shape);
const auto& generated = fragmentAlgo.Generated(shape);
const auto& modified = fragmentAlgo.Modified(shape);
auto& newList = newFragmentLists[subDomainIdx];
auto& newMap = newFragmentMaps[subDomainIdx];
if (!isDeleted && generated.IsEmpty() && modified.IsEmpty())
if (!isDeleted && modified.IsEmpty())
{
newMap.Bind(shape, entityIdx);
newList.Append(shape);
}
for (const auto& fragment : generated)
{
if (!newMap.IsBound(fragment)) newMap.Bind(fragment, entityIdx);
if (!newList.Contains(fragment)) newList.Append(fragment);
}
for (const auto& fragment : modified)
{
if (!newMap.IsBound(fragment)) newMap.Bind(fragment, entityIdx);
......@@ -385,15 +373,11 @@ protected:
// store the fragments of this sub-domain
const bool isDeleted = fragmentAlgo.IsDeleted(domainShape);
const auto& generated = fragmentAlgo.Generated(domainShape);
const auto& modified = fragmentAlgo.Modified(domainShape);
auto& sdFragmentList = subDomainFragmentLists_[subDomainIdx];
if (!isDeleted && generated.IsEmpty() && modified.IsEmpty())
if (!isDeleted && modified.IsEmpty())
sdFragmentList.Append(domainShape);
for (const auto& fragment : generated)
if (!sdFragmentList.Contains(fragment))
sdFragmentList.Append(fragment);
for (const auto& fragment : modified)
if (!sdFragmentList.Contains(fragment))
sdFragmentList.Append(fragment);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment