-
Notifications
You must be signed in to change notification settings - Fork 35
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
enhancement: operations on sketches #43
Comments
This is definitely a thing to consider, I had had it on a TODO list a long time ago, not sure why it's not anymore. |
Thanks for considering it. Although I did not mention it explicitly, having users define sketches in an easy manner would definitely help. In making arbitrary sketches I have a difficulty in getting the points in the face in the right order. I've written a script which sorts these points for each face before creating the hex blocks. If you are interested I could post this. |
Yes, please do. |
Hi, I see you're working on incorporating user defined sketches. I am happy to see that development, since I think it would really enhance the usability. I promised to provide some code on this and on the 3d block array. However, I've been more busy than anticipated and it took me more time. Now, I've got a working principle with three main classes:
Some thoughts on extensions:
|
Actually I've just implemented almost all of what you're saying but will need a bit more time to polish everything so that it's ready for publishing. I created a MappedSketch where the user throws in points and connects them using indexes only. I revamped cylinders and added automatic laplacian smoothing. I'd be happy to see how automatic point sorting is made. The 'Stacks' are coming next, meaning shapes with multiple elements in the 3rd direction, regardless of what sketch they were created from. So multi-hex block would be an ExtrudedStack where multiple ExtrudedShapes would be stacked one on top of another. Stay tuned, I'm planning to commit this soon! Then we can compare my ideas with yours and add whatever is missing or off. |
I am looking forward to this new feature. To address some of the comments you have: I'd be happy to see how automatic point sorting is made. The 'Stacks' are coming next, meaning shapes with multiple elements in the 3rd direction, regardless of what sketch they were created from. |
I have added a 'grid' property to Sketches. So now instead of a flat-list 'faces' property, grid is two-dimensional. For a 'Grid' sketch it is a simple x-y indexing and for cylindrical sketches it's a kind of polar radius-angle index. A Stack, will add a new dimension, that is Shape level, effectively incorporating your proposal seamlessly. I'll look into your code and let you know. |
I checked your code. Almost everything your proposal does should be easily doable within the current The paradigm is as before, create a custom sketch and transform it to obtain multiple levels of blocks - a I added a 'Grid' sketch just for demonstration, it is a totally primitive thing and will be updated soon. You can now remove a block using To add a block or anything to the mesh, it's as easy as always, locate an operation (predecessor to a block), find its nearest face (operation.get_closest_face), then do with it whatever you like. Add it to mesh and you're done. Is there anything else you're missing? |
Hi,
Currently, the operations work only on a single face (or two faces in the loft case). It would be easier to create a blocking structure when these operations work on a sketch, just like in a CAD program. I know it is already possible to do so by using the translation/rotation functions for instance in the elbow shape. However, for an end-user it would be intuitive if the operation classes could by used for this. I understand that this will introduce some work, since a single operation is now converted to a single block.
Would you be willing to take a look at this idea?
The text was updated successfully, but these errors were encountered: