Tue, 05/19/2009 - 05:40
Hi All,
I am using BRepOffsetAPI_ThruSections to create loft or ruled surface. But I find it can't work well on wires which contains several edges. Such as this sample,
wire1
________________
| wire2 |
| _____ |
| | \ |
| | \ |
| |_____| |
|______________|
wire1 is a rectangle wire which contains 4 edges. wire2 contains 5 edges, one edge is a chamfer edge.
But using BRepOffsetAPI_ThruSections, I can't get correct ruled surface no matter how I change the start points of the wire to match the loop order. In fact, I suffer this problem for a long time, but I can't find any improvement in 6.2, 6.3 version. I really hope OCC team to improve this basic modelling API, it's really important for modeling loft and ruled surface.
Regards.
-Cauchy Ding
Tue, 05/19/2009 - 05:46
wire1
___________________
|******************|
|******wire2*******|
|*****____*********|
|*****|***\********|
|*****|****\*******|
|*****|****|*******|
|*****|____|*******|
|******************|
|__________________|
To format the shape, I have to use "*" instead of the space.
Mon, 07/20/2009 - 21:27
I'm experiencing the exact same problem.
I'm seeing a lot of segfaults when calling BrepOffsetAPI_ThruSections, when lofting wires which have different numbers of edges.
Not cool to see such a fundemental feature not being able to deal with such input!
-jelle
Mon, 07/20/2009 - 21:55
Cauchy,
There might be a pretty simple fix for this; it seems that BrepOffsetAPI_ThruSections::CreateRuled does *not* except 2 wires with different number of edges.
This is not checked in the BrepOffsetAPI_ThruSections, when calling BRepFill_Generator:
void BRepOffsetAPI_ThruSections::CreateRuled()
{
Standard_Integer nbSects = myWires.Length();
BRepFill_Generator aGene;
// for (Standard_Integer i=1; i<=nbSects; i++) {
Standard_Integer i;
for (i=1; i<=nbSects; i++) {
aGene.AddWire(TopoDS::Wire(myWires(i)));
}
aGene.Perform();
TopoDS_Shell shell = aGene.Shell();
I'm sorry, I'm not a C++ dev, but what do you think?
Could that be it?
-jelle
Mon, 07/20/2009 - 22:08
Ai, I'm sorry, the above is incorrect; BrepFill_CompatibleWires is called in the .Build method
Mon, 07/20/2009 - 23:05
I'm a little bit futher: BrepFill_CompatibleWires is to blame.
An interesting thread here: http://www.opencascade.org/org/forum/thread_12012/
Seems the issue surfaced before.
-jelle
Wed, 08/19/2009 - 11:00
Same problem here - it seems that this is really hard to solve. Are there any workarounds for this?
Wed, 08/19/2009 - 11:13
You could use BrepFill().Face(edg1,edg2) or .Shell(wire1,wire2)
That way the input curves are not altered ( usually, you *need* this though ;')
-jelle
Thu, 01/27/2011 - 13:32
Is this still an issue? Or is it at least solved in the commercial version?
Thu, 01/27/2011 - 14:21
At the moment you can consider it as a limitation of the algorithm -
each wire selected must have the same number of edges and vertices.
Probably you may use the sweeping algorithm of MakePipeShell, ?
Regards