Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Step export with non-manifold lose any attributes from XCAF #153

Open
dpasukhi opened this issue Nov 12, 2024 · 0 comments
Open

Step export with non-manifold lose any attributes from XCAF #153

dpasukhi opened this issue Nov 12, 2024 · 0 comments
Assignees
Labels
1. Data Exchange Import/Export or iterating of the CAD data 2. Bug Something isn't working 2. Regression 5. Internal

Comments

@dpasukhi
Copy link
Member

Category

Data Exchange

Severity

Major

Description

Loosing all XCAF attributes when export the XCAF document into STP on non-manifold mode.

Duplicate of mantis issue: https://tracker.dev.opencascade.org/view.php?id=33815
Regression after https://tracker.dev.opencascade.org/view.php?id=31617
Problem commit: c28d4a8

Summary Description
0031617: Export STEP in nonmanifold mode corrupts the shape When writing the BREP shape in STEP format, then reading the STEP file, resulting shape is invalid and differs much from the original one
The problem code:
Standard_Boolean isNMMode = Interface_Static::IVal("write.step.nonmanifold") != 0;
if (isNMMode)
{
ShapeUpgrade_RemoveLocations aRemLoc;
aRemLoc.SetRemoveLevel(TopAbs_COMPOUND);
aRemLoc.Remove(aShape);
aShape = aRemLoc.GetResult();
}
The problem is modifing the input shape with deep copy and as a result we lose any connection with original shape.
So, it means after processing all binders binds the modified shapes, not original. We will not find and attributes by search by shape.

Expected Behavior

For example, when exporting XCAF document with single simple shape (as root) and put the name on it the name will be saved in the final STP document.
(when enable the non-manifold mode, on another case everything already working fine)

Actual Behavior

For example, when exporting XCAF document with single simple shape (as root) and put the name on it the name will be lost and auto name of the entity will be used instead.
(when enable the non-manifold mode, on another case everything already working fine)

Sample Code or DRAW Tcl Script

pload ALL
ReadFile D /home/dpasukhi/OCCT/shape.brep
param write.step.nonmanifold 1
# param write.step.nonmanifold 0
SetName D 0:1:1:1 MADAA
WriteStep D /home/dpasukhi/OCCT/shape.stp

Operating System

Linux

Compiler

GCC

Compiler Version

No response

Bitness

64-bit

OCCT Version

latest

Precise OCCT Version or Branch

No response

Environment

No response

Additional Files

shape.zip

@dpasukhi dpasukhi added 2. Bug Something isn't working 1. Data Exchange Import/Export or iterating of the CAD data labels Nov 12, 2024
@dpasukhi dpasukhi self-assigned this Nov 12, 2024
@dpasukhi dpasukhi moved this from Todo to Done in Maintenance Dec 2, 2024
@dpasukhi dpasukhi closed this as completed by moving to Done in Maintenance Dec 2, 2024
@github-project-automation github-project-automation bot moved this from Done to In Progress in Maintenance Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. Data Exchange Import/Export or iterating of the CAD data 2. Bug Something isn't working 2. Regression 5. Internal
Projects
Status: In Progress
Development

No branches or pull requests

2 participants