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

List of wires is not closed : solution proposal #985

Closed
bragostin opened this issue Feb 7, 2022 · 2 comments
Closed

List of wires is not closed : solution proposal #985

bragostin opened this issue Feb 7, 2022 · 2 comments

Comments

@bragostin
Copy link
Contributor

Related (maybe) to #890
I have a list of connected edges edge_wire forming a closed loop that I use to feed the interpPlate() function:

surface_points = [[0,0,0]]
fin = cq.Workplane('XY').interpPlate(edge_wire, surface_points)

In the current implementation of the assembleEdges() method in shapes.py:

    for e in listOfEdges:
        wire_builder.Add(e.wrapped)

yields the following result, where it looks like the wire is not closed properly:
Gyroid_NOK
Changing it to

    occ_edges_list = TopTools_ListOfShape()
    for e in listOfEdges:
        occ_edges_list.Append(e.wrapped)
    wire_builder.Add(occ_edges_list)

yields
Gyroid_OK
which is the expected result.
The new implementation might take advantage of the following property :
(https://dev.opencascade.org/doc/refman/html/class_b_rep_builder_a_p_i___make_wire.html#ae9dd6e34dfd1bc0df8dc3b9c01bb97c2)

void BRepBuilderAPI_MakeWire::Add	(const TopTools_ListOfShape & L)	

Adds the edges of <L> to the current wire. The edges are not to be consecutive. 
But they are to be all connected geometrically or topologically. 
If some of them are not connected the Status give DisconnectedWire 
but the "Maker" is Done() and you can get the partial result.
(ie connected to the first edgeof the list <L>)

Would you consider a PR for this?

@adam-urbanczyk
Copy link
Member

Yes, definitely!

@bragostin
Copy link
Contributor Author

Solved with PR #986

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants