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

Positioning through aligment #68

Closed
lyndametref opened this issue Feb 5, 2021 · 6 comments
Closed

Positioning through aligment #68

lyndametref opened this issue Feb 5, 2021 · 6 comments

Comments

@lyndametref
Copy link

Hello,

Back in the time when I made CAD in school with standard CAD programs, i learn to position element one relatively to another, for example by having 2 surfaces aligned one against the other, or having a screw coaxial to a hole.

This is something I don't understand how to do with ZenCAD. I tried to translate the russian documentation with an online translation tool (do you want a pull request with it?), but could not find anything on this subject... Is it possible?

@oleg-medovikov
Copy link

@lyndametref
Copy link
Author

Hi Oleg,
Thanks for your answer. However I don't see where you are using relative alignment of parts in your example. From my understanding you are positioning all the part with an absolute displacement relative to the general coordinate system. Could you develop how or on which line you are aligning one part relatively to another please?

@oleg-medovikov
Copy link

oleg-medovikov commented Feb 11, 2021

From line 178 I create the "arduino" unit and add different parts to it. after I move the whole unit
on line 200.
The center of coordinates of each part is anchored to the coordinates of the unit.

And in the case of the delta robot, I manually calculated the coordinates of the individual parts of the robot. solved the direct control problem for each node.

https://youtu.be/OyvPBDsYQo0

@lyndametref
Copy link
Author

Hi Oleg,
That was not exactly what I meant. If I understand correctly, you are grouping several part to move them relatively to the base coordinate system. What I would like to do is align 2 planes one relative to the other. For example, the lid of a box should be placed flush on the top of the 4 sides. Can I express this in zencad?

@mirmik
Copy link
Owner

mirmik commented Feb 15, 2021

There is no such functionality in zencad.

In the form of scripts, it is quite difficult to present operations that require interaction with some parts of the model. You need to point that faces. I don`t know good variant how to build such an API.

At the current stage I would not like to make unnecessary commands, because the experiments with the system form are not over yet. Right now I'm rewriting zencad to pythonocc-core backend, which will make it much more customizable. Then the introduction of such functionality will become more convenient, there will be scope for experimenting with the API.

@lyndametref
Copy link
Author

lyndametref commented Feb 15, 2021

Hi mirmik,
I understand the difficulty, I am not sure how to go with it neither. Maybe a way to get the coordinate of all the points of an object to use them in a translate operation?
I have seen that CadQuery is using the concept of Workplane to achieve that, however, I don't see how it would fit in the zen API...
Anyway thanks for the clarification. I am looking forward to experiment with the new rewrite!

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

3 participants