You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the current behavior?
Today the shell3d.get_geo_lines is very complex. Here are some suggestions to refactor it.
before doing any refactor, it is recommended to create some tests for .geo files, so you are sure to have the same functionality at the and.
The first part of the code can be separated into one method. It searches to save all shell points on a list, as well as its face edges, in a way there is no repeated edges not matter the direction.
Then there is this part of the code, that can be simplified by updating the get_geo_lines method for each edge (circle, bspline, linesegment, arc, etc...) such that the get_geo_line_methods receives as arguments the points list, line_account and point_acount. Inside each edge class, there would be a get_geo_lines_tags to define what tags are appropriate for each edge. as the example shown below
Other improvements: simplify loops, eliminate unused enumerate...
branch: dev
commit:
python version: 3.9
The text was updated successfully, but these errors were encountered:
I'm submitting a ...
What is the current behavior?
Today the shell3d.get_geo_lines is very complex. Here are some suggestions to refactor it.
before doing any refactor, it is recommended to create some tests for .geo files, so you are sure to have the same functionality at the and.
The first part of the code can be separated into one method. It searches to save all shell points on a list, as well as its face edges, in a way there is no repeated edges not matter the direction.
![image](https://private-user-images.githubusercontent.com/77811165/285220664-91a28ba4-61f6-4972-bda9-0ef8cc914603.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwMjEwNzIsIm5iZiI6MTczOTAyMDc3MiwicGF0aCI6Ii83NzgxMTE2NS8yODUyMjA2NjQtOTFhMjhiYTQtNjFmNi00OTcyLWJkYTktMGVmOGNjOTE0NjAzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA4VDEzMTkzMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWI1NGE3MWQxOTRkMTUzYzA4N2I4MzE2MGFmYjBlYTM1ZTY4OTJhNmQzZjE2NWY5YWZiZDRlMDRkMTY2ODA5NTEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.mZMD9p_hhzv0GU3jdH_20s0kQsTo_KMD3f9mtovGAIg)
Then there is this part of the code, that can be simplified by updating the get_geo_lines method for each edge (circle, bspline, linesegment, arc, etc...) such that the get_geo_line_methods receives as arguments the
points
list,line_account
andpoint_acount
. Inside each edge class, there would be aget_geo_lines_tags
to define what tags are appropriate for each edge. as the example shown belowOther improvements: simplify loops, eliminate unused enumerate...
The text was updated successfully, but these errors were encountered: