-
Notifications
You must be signed in to change notification settings - Fork 147
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
Nurbs editing Milestone 2 #92
Conversation
add "brep .. curve remove .." cmd
add "brep .. surface remove .." cmd
add "brep .. curve split .." cmd
add "brep .. surface split .." cmd. change some code styles
create NURBS surface by two curve tensor product
add 'brep .. surface revolution ..' to create a NURBS surface by rotating a curve around an axis by an angle..
add 'brep .. curve copy ..' cmd
fix while curve id==0
add 'brep .. surface copy ..' cmd
Caculate knot vector while interpolating bicubic surface
implement global surface interpolation with C2 continuity
Now ''curve/surface remove'' cmds have some potential threats to brep's editing operations. |
Hi Gregory, You comment to You create a new solid and remove the old one often. Is this really necessary? In addition, you remove the solid by calling libged's directory* pDir = db_lookup(gib->gb->gedp->dbip, objectName, LOOKUP_NOISE);
if (pDir != RT_DIR_NULL) {
if (db_delete(wdbp->dbip, pDir) == 0)
db_dirdelete(wdbp->dbip, pDir);
} |
I'll check and fix these issues as soon as possible. |
I checked your conversation with Sean, and the reason isn't apparent from that either. My point is that you don't change the solid by removing and recreating the brep primitive. You use the same OpenNURBS handle in both objects. I was surprised that this is possible, and I don't recommend to rely on it. |
Do you mean that I I wrote these commands modeled after |
I see. What happens, if you simply omit the "Delete the old object" and "Make the new one" parts? |
I tried omitting them. Memory changes in brep.cpp can be monitored while the code is running, but are not reflected in the archer interface and further output. So I think the |
I don't think so. How does it look like (without the kill), if you zap the display and redraw the brep? |
I think, I know what's going on: On the one hand, you have the database in version 5 format, saved in the .g file, which is an array of bytes. On the other hand, you have an object representation of the primitives, e.g. with rt_brep_internal. I.e. serialization vs. objects. With your brep_~ functions, you are changing the objects, but not the serialization. I.e., you need them to write back to the database. This is currently done by removing and recreating them there. However, removing (kill) them should not be necessary. The creation should overwrite an object with the same name. |
Yeah you are right! It works well after removing 'kill'. |
no more delete old object. Functions are unaffected. Passed tests by brep_curve_edit.sh and brep_surface_edit.sh on zulip.
remove some other 'kill'
wdb_export_external() in src/librt/wdb.c contains the code to update the objects: "If name already exists, that object will be updated." |
Now I'm using wdb_export() in brep.cpp, which calls wdb_export_external() finally. And everything works fine now. |
I'll accept this PR, despite
|
Thanks! I'll revise them and submit it next PR. |
Milestone 2: Perform advanced operations on brep geometries using command line, as well as some simple ones.
Curve operations:
Surface operations: