Archived issue #0023640
Documentation for local sewing with BRepBuilderAPI_Sewing is missing
Description
In http://www.opencascade.org/org/forum/thread_24171/?forum=3 it was asked how local sewing can be performed in OpenCascade.
The answer was:
First you should Load() a context shape
and after use Add() for sub-shapes which should be locally sewed.
The forum supervisor wrote:
Unfortunately this feature still is not documented.
Therefore I suggest you to register the corresponding issue in Mantis Bug Tracker.
It would be helpful if a use case for local sewing is explained and how it can be used to get better performance than with global sewing.
Documentation about local sewing should be added to the Modeling Algorithms User's Guide as well as to the Doxygen Code documentation.
The answer was:
First you should Load() a context shape
and after use Add() for sub-shapes which should be locally sewed.
The forum supervisor wrote:
Unfortunately this feature still is not documented.
Therefore I suggest you to register the corresponding issue in Mantis Bug Tracker.
It would be helpful if a use case for local sewing is explained and how it can be used to get better performance than with global sewing.
Documentation about local sewing should be added to the Modeling Algorithms User's Guide as well as to the Doxygen Code documentation.
Steps to reproduce
Not applicable.
Public activity
14 archived notes
Participants are labeled by their role within this record.
I found some information about Local Sewing on http://www.opencascade.org/occt/overview/compocc7/sewing/sewing10/
It might be useful to for the proposed documentation enhancement:
"In case when a shape still has some unsewed faces or edges after sewing, it is possible to use local sewing with a greater tolerance.
Local sewing is especially good for open shells.
Local sewing allows to sew a hole in one part of the shape and to keep a required hole smaller than the specified working tolerance for local sewing. Local sewing is much faster than sewing on the whole shape.
All pre-existing connections of the whole shape are kept after local sewing."
There are also some other pieces of information about sewing on the website, but some of it is not up-to-date, like mentioning BRepAlgo_Sewing on http://www.opencascade.org/occt/overview/compocc7/sewing/sewing2/
It might be useful to for the proposed documentation enhancement:
"In case when a shape still has some unsewed faces or edges after sewing, it is possible to use local sewing with a greater tolerance.
Local sewing is especially good for open shells.
Local sewing allows to sew a hole in one part of the shape and to keep a required hole smaller than the specified working tolerance for local sewing. Local sewing is much faster than sewing on the whole shape.
All pre-existing connections of the whole shape are kept after local sewing."
There are also some other pieces of information about sewing on the website, but some of it is not up-to-date, like mentioning BRepAlgo_Sewing on http://www.opencascade.org/occt/overview/compocc7/sewing/sewing2/
Dear Author, actually, there is a section about sewing in the Technical Overview http://dev.opencascade.org/doc/overview/html/technical_overview.html#OCCT_TOVW_SECTION_4_9
As you can see, it is exactly based on the site contents.
Do you suggest somehow enhancing this?
As you can see, it is exactly based on the site contents.
Do you suggest somehow enhancing this?
I rather meant to describe local sewing also in the Modeling User's guide and API reference documentation. I mean, how to actually apply local sewing using the Load- and Add-method. Not much text would be needed but at least to mention this possibility and the benefits.
For me, it wasn't clear in case of local sewing:
Load(): Can the context shape also be a compound containing a shell and additional faces to be sewed or does it have to be a shell containing all faces?
Add(): Should I add here the faces to be sewed or specify certain edges of faces which should be sewed?
Additionally, some parts seem not up-to-date in the Technical overview, at least BRepAlgo_Sewing is mentionend, but it doesn't exist anymore.
For me, it wasn't clear in case of local sewing:
Load(): Can the context shape also be a compound containing a shell and additional faces to be sewed or does it have to be a shell containing all faces?
Add(): Should I add here the faces to be sewed or specify certain edges of faces which should be sewed?
Additionally, some parts seem not up-to-date in the Technical overview, at least BRepAlgo_Sewing is mentionend, but it doesn't exist anymore.
OK. The section about sewing will be soon moved to the Modeling User's guide.
Dear Galina, could you do the following:
1) Review the description of Sewing to check if there is no outdated information.
2) Add a code example illustrating the usage of Local Sewing with proper comments. (And expand the section further if necessary).
Dear Galina, could you do the following:
1) Review the description of Sewing to check if there is no outdated information.
2) Add a code example illustrating the usage of Local Sewing with proper comments. (And expand the section further if necessary).
Here is an example code for local sewing which I received in the frame of a support query and which could be used in the documentation:
"In order to use local sewing it is necessary to create a compound from two full sewed shapes then load full compound using method BRepBuilderAPI_Sewing::Load().
After that it is necessary to add local sub-shapes which should be sewed using method BRepBuilderAPI_Sewing::Add(). The result of sewing can be got using method BRepBuilderAPI_Sewing::SewedShape().
For example:
//initial sewed shapes
TopoDS_Shape aS1, aS2;
TopoDS_Shape aComp;
BRep_Builder aB;
aB.MakeCompound(aComp);
aB.Add(aComp, aS1);
aB.Add(aComp, aS2);
................................
aSewing.Load(aComp);
//sub shapes which should be locally sewed
aSewing.Add(aF1);
aSewing.Add(aF2);
//performing sewing
aSewing.Perform();
//result shape
TopoDS_Shape aRes = aSewing.SewedShape();
"In order to use local sewing it is necessary to create a compound from two full sewed shapes then load full compound using method BRepBuilderAPI_Sewing::Load().
After that it is necessary to add local sub-shapes which should be sewed using method BRepBuilderAPI_Sewing::Add(). The result of sewing can be got using method BRepBuilderAPI_Sewing::SewedShape().
For example:
//initial sewed shapes
TopoDS_Shape aS1, aS2;
TopoDS_Shape aComp;
BRep_Builder aB;
aB.MakeCompound(aComp);
aB.Add(aComp, aS1);
aB.Add(aComp, aS2);
................................
aSewing.Load(aComp);
//sub shapes which should be locally sewed
aSewing.Add(aF1);
aSewing.Add(aF2);
//performing sewing
aSewing.Perform();
//result shape
TopoDS_Shape aRes = aSewing.SewedShape();
Branch [archived branch] has been created by Participant.
[revision removed]
Detailed log of new commits:
Author: ysn
Date: Mon Dec 8 16:21:48 2014 +0300
Fix for bug 23640. What's more important: merging the rest of Technical Overview content into User's Guides.
However, Technical Overview itself is left intact and will be replaced by a shortened document only at the next stage.
[revision removed]
Detailed log of new commits:
Author: ysn
Date: Mon Dec 8 16:21:48 2014 +0300
Fix for bug 23640. What's more important: merging the rest of Technical Overview content into User's Guides.
However, Technical Overview itself is left intact and will be replaced by a shortened document only at the next stage.
I've made a fix for bug 23640 in the corresponding branch, adding the requested example.
What's more important: merging the rest of Technical Overview content into User's Guides.
However, Technical Overview itself is left intact and will be replaced by a shortened document only at the next stage.
What's more important: merging the rest of Technical Overview content into User's Guides.
However, Technical Overview itself is left intact and will be replaced by a shortened document only at the next stage.
Dear Michail, please, have a look at the proposed changes.
Branch [archived branch] has been updated by Participant.
[revision removed]
Detailed log of new commits:
Author: msv
Date: Mon Dec 8 23:32:25 2014 +0300
-Correct UG sections concerning Sewing.
-Correct comments in the code referring to old location of sewing algorithm.
[revision removed]
Detailed log of new commits:
Author: msv
Date: Mon Dec 8 23:32:25 2014 +0300
-Correct UG sections concerning Sewing.
-Correct comments in the code referring to old location of sewing algorithm.
I have corrected the Sewing section of UG.
I have looked at other UGs only briefly.
I have looked at other UGs only briefly.
OK. Thank you for the input.
Reviewed, please integrate.
Actually many fragments merged from the site are quite outdated and require revision, but this can be made later
Actually many fragments merged from the site are quite outdated and require revision, but this can be made later
Is the Target Version of this Mantis entry correct?
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Related records