1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-06-30 12:14:08 +03:00
abk 6670aadd5d 0026261: Create a tool to remove tails from any wire
A tool to remove tails from the wires of a shape was created.
The tool is based on mechanism 'ShapeFix',
is located in types 'ShapeFix_Wire' and 'ShapeAnalysis_Wire',
is enabled through method 'ShapeFix_Wire::FixTailMode' and
is initialized by methods 'ShapeFix_Wire::SetMaxTailAngle' and 'ShapeFix_Wire::SetMaxTailWidth' and
is called through method 'ShapeFix_Wire::FixTails'.
The status of any performing of the last method is accessible through method 'ShapeFix_Wire::StatusFixTails'.
The tail angle is checked only at the tail start.

Mechanism 'ShapeFix' was modified:
- the tool is disabled by default;
- algorithm 'Fix notched edges' is disabled then the tool is enabled;
- the tool and the last algorithm work in turns then the tool works on the request.

'Draw' command 'fixshape' was extended by options '-maxtaila' and '-maxtailw' to test the tool.

'Draw' tests to test the tool were created.

Algorithm 'fixshape' was changed in type 'ShapeProcess_OperLibrary' to
- use new parameters named 'FixTailMode', 'MaxTailAngle' (in degrees) and 'MaxTailWidth' from the algorithm context;
- apply the tool after the shape will be fully fixed if the tool was enabled.

Place holders for the new parameters were created in the resource file of mechsnism 'STEPControl_Reader'.

Test cases for issue CR26261
2015-08-23 23:23:18 +03:00

18 lines
426 B
Plaintext

vertex v1 -1 0 0
vertex v2 9 0 0
vertex v3 1 1 0
vertex v4 1 1 5
polyvertex w1 v1 v3 v2 v1
mkplane s1 w1
polyvertex w2 v1 v2 v4 v1
mkplane s2 w2
polyvertex w3 v2 v3 v4 v2
mkplane s3 w3
polyvertex w4 v1 v4 v3 v1
mkplane s4 w4
sewing s s1 s2 s3 s4
fixshape r s -maxtaila 10 -maxtailw 0.7
checknbshapes r -vertex 5 -edge 7 -wire 4 -face 4 -shell 1 -solid 0 -compsolid 0 -compound 0
checklength r 69.237606465667483