C++ CadCam program development with CodeBlocks instead of QT

More
31 May 2021 06:40 #210774 by Joco
A little bit of logical thinking and code detective work and I have found where to change the colours for the occ viewport widget. So now have something with better contrast.

Please Log in or Create an account to join the conversation.

More
04 Jun 2021 09:35 #211134 by Joco
I have the cavalier contours lib compiling correctly and processing a test contour on a shape. Working through how to best integrate that into the over all data model and then render it.

Still moving forward if a little slowly. Happy to post a zip file or expose the code base off a github account if anyone is keen to follow or play with it themselves.

Cheers - James.
The following user(s) said Thank You: Grotius

Please Log in or Create an account to join the conversation.

More
05 Jun 2021 14:36 - 05 Jun 2021 14:36 #211215 by Grotius
Hi James,

Nice to read about your progress.

I have done some extra research for opencascade.

1. An sich it is usefull to use the occt "wire" primitive. This is as a dxf lwpolyline we talked
about earlyer. A occt wire is easy to create. A wire may contain lines, arc's etc.
2. If you click a primitive on the screen, i can now show what item is selected by iterating over the selection list.
3. When doing a contour offset, you can add the contour offset as a occt "child" member. When deleting the primary path for example, the child's are deleted in the occt preview. This is quite handy.

If you need one of above examples, let me know.

One tiny problem i have to solve is when for example a line is clicked, i want to edit the line points to another value.
This is for live preview mode how a line should look like. The line endpoint is following the machine tcp point.
This sound's simple. But i think i have to ask this at the occt website help section how to do this.
Last edit: 05 Jun 2021 14:36 by Grotius.
The following user(s) said Thank You: Joco

Please Log in or Create an account to join the conversation.

More
05 Jun 2021 21:28 #211250 by Joco
Ive also been pondering and think i need to refactor a lot of what I have done to be using occ types. It was faster to define my own primitives/classes for a lot of things as I learned. It also got my head back into c++ a lot faster.

On the wire primitive, just to check you mean
dev.opencascade.org/doc/refman/html/class_topo_d_s___wire.html

And using the relevant api from
dev.opencascade.org/doc/refman/html/package_brepbuilderapi.html

Cheers - J.

Please Log in or Create an account to join the conversation.

More
06 Jun 2021 08:25 #211281 by Grotius
Hi James,

Yes, A wire is handy for clicking (selecting) contours by one mouseclick.
Attached my current opencascade class where you can find the occt object selecting function and how to create a wire.
It also show's how to create child members.

If you know how to edit a existing line point in occt, please let me know.
Attachments:
The following user(s) said Thank You: Joco

Please Log in or Create an account to join the conversation.

More
07 Jun 2021 07:57 #211406 by Joco

If you know how to edit a existing line point in occt, please let me know.


Not yet. If I come across a method I will sing out. At the moment still coming to grips with the patterns to be used with the occ framework.

Please Log in or Create an account to join the conversation.

More
09 Jul 2021 20:47 #214136 by Grotius
Hi Joco,

How is coding going?

Today i worked a bit on the Qt_dxfrw example.






 

Please Log in or Create an account to join the conversation.

More
09 Jul 2021 22:19 #214141 by Joco
Morning Grotius.   Slow to non-existent at the moment. I'm trying to make progress on the physical side of the cnc plasma build. Plus my wife got me an SLA printer (Anycubic Photon Mono) for my birthday.  So that has been causing a distraction as well.

Spreading myself a little thin I guess. Nice to see you continue to make progress when you can.  :-)

Cheers  - James.
 

Please Log in or Create an account to join the conversation.

More
12 Jul 2021 02:09 #214349 by Grotius
Hi Joco,

Happy birthday ! Greetings to your family members !
I saw a picture of your garage and plasma last week. It's good to work with your hand's. Then the body stay's in shape.

Today and yesterday i have rewritten the contour algoritme. It's quite a robust code now, and written portable.
When the dxf is loaded all contours are calculated as cw as program kick-off.

Next to do is the cavaliercontours. (offsets)
Just tested a few offsets with the cavaliercontours. I had to integrate the bulge's codes again.
It input's arc's and lines already.
The github source is updated.

Attachments:
The following user(s) said Thank You: tommylight, robins

Please Log in or Create an account to join the conversation.

More
13 Jul 2021 14:56 - 13 Jul 2021 15:00 #214593 by Grotius
Hi,

Today i started coding the hard part. The lead-in and lead-out stuff.

To my surprise it is working out of the box.
The lead-in algoritme is itterating trough the contours to find a nice fit. And it really works!

I had to come up with an idea how to approach the lead-in. Then i had an idea to do a extra offset. (extra lead in distance offset)
Now it stores the contour offset points and parallel it stores the contour offset points+lead in distance.
Sometimes this will result in unequal data sizes. But i have a simple solution for this.

Now we also have the option to change the lead-in position to another corner very easy. We can do this clicking the contour
and press a "arrow up" key for example.

The github source is updated.
Any request's are welcome !!

Overcut, lead-in shapes etc. Can alway's be added when the program is functional for release.
Last edit: 13 Jul 2021 15:00 by Grotius.
The following user(s) said Thank You: phillc54, tommylight, Joco

Please Log in or Create an account to join the conversation.

Moderators: Skullworks
Time to create page: 0.185 seconds
Powered by Kunena Forum