DiscussionsIssue archiveOCCT:Modeling Algorithms

Archived issue #0033334

Modeling Algorithms - Generating 2D front view from STEP file: Handle_HLRBRep_Data::NbEdges() == 0

CommunityOCCT:Modeling Algorithmsnew15 public notes

Search issues

Description

Generating 2D front view from STEP file: Handle_HLRBRep_Data::NbEdges() == 0

BUG: no edges are returned for the front view
=> see error message of the cmdline tool

The contained Visual Studio 17 solution exemplifies in an STEP to DXF command line tool
how we use OpenCascade to read STEP files and generate the six 2D views (front, back, right, left, top, bottom)

C:\Test\STEP-to-DXF-CmdLineTool\x64\Release>STEP-to-DXF.exe Attachment 1 (STP)
STEP-to-DXF Converter v1.0 Beta
Copyright Zuken E3 GmbH 2022. All rights reserved.

W-INFO: Input: "Attachment 1 (STP)"

W-INFO: Front:
E-FATAL: in function "TransferTo2d()": Handle_HLRBRep_Data::NbEdges() == 0

Steps to reproduce

=== attachments ===
+ Attachment 6 (ZIP)
   NOTE: contains ReadMe.txt
+ STEP file

=== reproduction ===
+ build cmdline tools using VS 2017
+ run / debug the cmdline tool with the attached STEP file

Public activity

15 archived notes

Participants are labeled by their role within this record.

01Author
Attachment 6 (ZIP) (10,277 bytes)
Attachment 1 (STP) (1,624,232 bytes)   
02Commenter 1
Dear Commenter 2

The current problem leads to crush or just incorrect result?
03Author
Dear Commenter 3,
for this STEP file we cannot generate the front view.
So no crash but we don't get any result.
- Peter B.
04Author
Dear Commenter 3
we updated to OpenCascade v7.7.0 and still see this issue.
I wonder whether you managed to reproduce this bug with our attached cmdline tool?
[signature removed]
Peter B.
05Commenter 1
Dear Commenter 2
You create your ticket when 7.7.0 was released more then 4 month ago.
We be able to impliment this only in 7.7.1 but your ticket have low priority.
Using general DRAW commands we can't reproduce your problem yet. We can't test the problem on your application w/o draw commands.
If you would like recieve direcly support, please contact the customer service https://www.opencascade.com/technology-support or use "contact to use" with client-service support
06Author
Dear Commenter 3
yes, I know that 7.7.0 was already released when I submitted this ticket.
Receiving a bugfix in 7.7.1 would be really great!
I wonder whether you can build & run our cmdline tool.
This should help to reproduce this bug:

C:\Test\STEP-to-DXF-CmdLineTool\x64\Release>STEP-to-DXF.exe Attachment 1 (STP)
STEP-to-DXF Converter v1.0 Beta
Copyright Zuken E3 GmbH 2022. All rights reserved.

W-INFO: Input: "Attachment 1 (STP)"

W-INFO: Front:
E-FATAL: in function "TransferTo2d()": Handle_HLRBRep_Data::NbEdges() == 0

[signature removed]
Peter B.
07Commenter 1
Dear Commenter 2,
7.7.1 have been released on this week.
If you can reproduce your problem using DRAW commands, It ups the priority of your ticket.
At the moment, our Modeling Team have a lot of tasks. We don't able to research community's solutions.
Using DRAW commands you can make HLR and rotate view. You can find examples in "occt\tests\hlr"
It is TCL language with OCCT plugins. https://dev.opencascade.org/doc/overview/html/occt_user_guides__test_harness.html
08Commenter 1
Now it looks good
pload ALL
readfile a D:/work/occt/occt/data/Attachment 1 (STP)
delete
view 1 +X+Y 465 20 800 800
vinit View1
vdisplay a
vback
vcomputehlr a result -algoType algo
build3d result
fit
Attachment 4 (PNG) (11,572 bytes)   
09Commenter 1
There information about parameters of vcomputehlr command
vcomputehlr     : vcomputehlr shapeInput hlrResult [-algoType {algo|polyAlgo}=polyAlgo]
                :     [eyeX eyeY eyeZ dirX dirY dirZ upX upY upZ]
                :     [-showTangentEdges {on|off}=off] [-nbIsolines N=0] [-showHiddenEdges {on|off}=off]
                : Arguments:
                :   shapeInput - name of the initial shape
                :   hlrResult  - result HLR object from initial shape
                :   eye, dir are eye position and look direction
                :   up is the look up direction vector
                :  -algoType HLR algorithm to use
                :  -showTangentEdges include tangent edges
                :  -nbIsolines include isolines
                :  -showHiddenEdges include hidden edges
                : Use vtop to see projected HLR shape.

Attachment 3 (BREP) (84,432 bytes)
10Author
one more STEP file "G_KT01_XX_01110V.stp" to reproduce this bug
from a customer that uses our product with OpenCascade 7.7.0
OK: with OC 7.3.0 it still worked
BUG: with OC 7.6.0 and OC 7.7.0 we can reproduce this bug
Attachment 2 (ZIP) (1,080,802 bytes)
11Author
Dear Commenter 3
we still use OC 7.7.0.
For using OC 7.7.1 we would have to patch OC 7.7.0 and build the binaries ourselves, correct?

I wonder whether you could give it a try with the two STEP files attached to this bug and our latest STEP-to-DXF.exe cmdline tool (attached).

C:\OpenCascade\STEP-to-DXF-CmdLineTool\x64\Debug>STEP-to-DXF.exe G_KT01_XX_01110V.stp
STEP-to-DXF Converter v1.1.0 Beta
Copyright Zuken E3 GmbH 2022-2023. All rights reserved.

W-INFO: Input: 2.76 sec - "G_KT01_XX_01110V.stp"

W-INFO: Front:
E-FATAL: in function "TransferTo2d()": Handle_HLRBRep_Data::NbEdges() == 0

Total Duration: 2.91 sec

[signature removed]
Peter B.
Attachment 5 (ZIP) (10,518 bytes)
12Author
Dear Commenter 3
I just tested OC 7.7.2 maintenance release
this bug is still reproducible with OC 7.7.2
13Author
=== TMS ===
Designer-41592
14Author
still reproducible with OCC 7.8.0
15Author
=== JIRA ===
E3-4770

still reproducible with:
+ OpenCascade 7.8.1
+ OpenCascade 7.9.0