- Posts: 508
- Thank you received: 94
simple linux cam
- Reinhard
- Offline
- Platinum Member
-
Less
More
4 years 6 months ago #239044
by Reinhard
Replied by Reinhard on topic simple linux cam
Hi,
You don't have to understand how it works, It's important that it works, so you can go on with coding
without thinking how things work.
Hm, my math understanding is very limited - but I'm quite sure, if I can identify that a solution is bad for my usecase, then there must be a better solution out there. I only have to find it.
I don't work for money, so my coding don't need to be ready at certain time. I code for my fun - so I can spent time necessary to create good code. Well, what I consider good code
Another example is my FalconView project. I was nearly done implementing all desired features, when I thought: might be a good idea to have each page converted into a plugin and so open a door for those that like to extend application. It cost me many many weeks of trial and error and a lot of headbanging. But finally I got it. Now you can decide at runtime, what pages you like to use.
... and it's only a small step to add a new page
i used Csharp examples in the past wich i converted to C++.
Thanks a lot for the pointer to csharphelper! That's a wonderful source for people like me. Math for beginners and with background info
You don't have to understand how it works, It's important that it works, so you can go on with coding
without thinking how things work.
Hm, my math understanding is very limited - but I'm quite sure, if I can identify that a solution is bad for my usecase, then there must be a better solution out there. I only have to find it.
I don't work for money, so my coding don't need to be ready at certain time. I code for my fun - so I can spent time necessary to create good code. Well, what I consider good code
Another example is my FalconView project. I was nearly done implementing all desired features, when I thought: might be a good idea to have each page converted into a plugin and so open a door for those that like to extend application. It cost me many many weeks of trial and error and a lot of headbanging. But finally I got it. Now you can decide at runtime, what pages you like to use.
... and it's only a small step to add a new page
i used Csharp examples in the past wich i converted to C++.
Thanks a lot for the pointer to csharphelper! That's a wonderful source for people like me. Math for beginners and with background info

- HansU
- Offline
- Platinum Member
-
Less
More
- Posts: 730
- Thank you received: 217
4 years 6 months ago - 4 years 6 months ago #239047
by HansU
Really? However, I am using SheetCAM at the moment. And yes it would be more comfortable to read in the 3D-file formats directly. It makes sometimes problems with contours when exporting to dxf. So wish you good luck on this and look forward for an alternative
Do you have your working repo public available?
Replied by HansU on topic simple linux cam
Cambam seems to be abandoned too
Really? However, I am using SheetCAM at the moment. And yes it would be more comfortable to read in the 3D-file formats directly. It makes sometimes problems with contours when exporting to dxf. So wish you good luck on this and look forward for an alternative
Do you have your working repo public available?
Last edit: 4 years 6 months ago by HansU.
- Reinhard
- Offline
- Platinum Member
-
Less
More
- Posts: 508
- Thank you received: 94
4 years 6 months ago #239180
by Reinhard
Replied by Reinhard on topic simple linux cam
Hi,
Really?
Well, dunno. I loosly follow cambam forum and I haven't read any post from the developer for years.
Additionally, when 1.0 for windows came out, he promised to publish linux 1.0 soon - but that never happened.
Do you have your working repo public available?
Not yet. I don't have any useful stuff already working. Too many problems and so little sparetime
@grotius
May I ask for help again?
I found very nice samples for cutpoint calculations ( intersect circle with circle and intersection line and circle )
Could you please help me with opencascade?
Geom-classes of occ are parametric, so I need to rearrange the formulas to calculate the parameter from final coordinates.Formulas are documented in BRep-Format-specs: [url=https://file:///usr/local/src/occt-build/doc/overview/html/specification__brep_format.html#specification__brep_format_5_1_1]Line[/url] and [url=https://file:///usr/local/src/occt-build/doc/overview/html/specification__brep_format.html#specification__brep_format_5_1_2]Circle[/url]
Really?
Well, dunno. I loosly follow cambam forum and I haven't read any post from the developer for years.
Additionally, when 1.0 for windows came out, he promised to publish linux 1.0 soon - but that never happened.
Do you have your working repo public available?
Not yet. I don't have any useful stuff already working. Too many problems and so little sparetime
@grotius
May I ask for help again?
I found very nice samples for cutpoint calculations ( intersect circle with circle and intersection line and circle )
Could you please help me with opencascade?
Geom-classes of occ are parametric, so I need to rearrange the formulas to calculate the parameter from final coordinates.Formulas are documented in BRep-Format-specs: [url=https://file:///usr/local/src/occt-build/doc/overview/html/specification__brep_format.html#specification__brep_format_5_1_1]Line[/url] and [url=https://file:///usr/local/src/occt-build/doc/overview/html/specification__brep_format.html#specification__brep_format_5_1_2]Circle[/url]
The following user(s) said Thank You: Grotius
- Reinhard
- Offline
- Platinum Member
-
Less
More
- Posts: 508
- Thank you received: 94
- Grotius
- Offline
- Platinum Member
-
Less
More
- Posts: 2419
- Thank you received: 2349
4 years 6 months ago #239256
by Grotius
Replied by Grotius on topic simple linux cam
Hi Reinhard,
Nice code found.
For now i got a tiny tip for you.
This is a working qt program made by a Russian guy. It is a Occt sketcher program.
It includes a working trim algo. I tested the app a while ago and it works. It contains all the functions for trimming.
But you have to dig in. It's complicated written.
The app, see .pro file :
github.com/grotius-cnc/occt-samples-qope...cctQtLib/libscetcher
Direct to trim code :
github.com/grotius-cnc/occt-samples-qope...cher_CommandTrim.cxx
I can help you with examples for trim with occt soon. I think tomorrow or day after.
Nice code found.
For now i got a tiny tip for you.
This is a working qt program made by a Russian guy. It is a Occt sketcher program.
It includes a working trim algo. I tested the app a while ago and it works. It contains all the functions for trimming.
But you have to dig in. It's complicated written.
The app, see .pro file :
github.com/grotius-cnc/occt-samples-qope...cctQtLib/libscetcher
Direct to trim code :
github.com/grotius-cnc/occt-samples-qope...cher_CommandTrim.cxx
I can help you with examples for trim with occt soon. I think tomorrow or day after.
- Reinhard
- Offline
- Platinum Member
-
Less
More
- Posts: 508
- Thank you received: 94
4 years 6 months ago #239297
by Reinhard
Replied by Reinhard on topic simple linux cam
I can help you with examples for trim with occt soon.
Thank you, but I would prefer and need your help with occ-math. Actually I coded formulas from brep specs like this:
First the line
and here the circle/arc
Both functions return the same result as D0 or Value from geom classes.
So I would appreciate it a lot if you could show me, how to calculate the "param" from given position.
Thank you, but I would prefer and need your help with occ-math. Actually I coded formulas from brep specs like this:
First the line
Code:
[color=#800080]gp_Pnt[/color][color=#c0c0c0] [/color][color=#800080]Util3D[/color]::[color=#00677c]calcLine[/color]([color=#000080]Handle[/color]([color=#800080]Geom_Line[/color])[color=#c0c0c0] [/color][color=#092e64]l[/color],[color=#c0c0c0] [/color][color=#808000]double[/color][color=#c0c0c0] [/color][color=#092e64]param[/color])[color=#c0c0c0] [/color][color=#808000]const[/color][color=#c0c0c0] [/color]{[color=#c0c0c0] [/color][color=#808000]const[/color][color=#c0c0c0] [/color][color=#800080]gp_Ax1[/color]&[color=#c0c0c0] [/color][color=#092e64]axis[/color][color=#c0c0c0] [/color]=[color=#c0c0c0] [/color][color=#092e64]l[/color][color=#00677c]->[/color][color=#00677c]Position[/color]();[color=#c0c0c0] [/color][color=#800080]gp_Pnt[/color][color=#c0c0c0] [/color][color=#092e64]start[/color]([color=#092e64]axis[/color].[color=#00677c]Location[/color]().[color=#00677c]X[/color](),[color=#c0c0c0] [/color][color=#092e64]axis[/color].[color=#00677c]Location[/color]().[color=#00677c]Y[/color](),[color=#c0c0c0] [/color][color=#092e64]axis[/color].[color=#00677c]Location[/color]().[color=#00677c]Z[/color]());[color=#c0c0c0] [/color][color=#800080]gp_Dir[/color][color=#c0c0c0] [/color][color=#092e64]dir[/color]([color=#092e64]axis[/color].[color=#00677c]Direction[/color]().[color=#00677c]X[/color](),[color=#c0c0c0] [/color][color=#092e64]axis[/color].[color=#00677c]Direction[/color]().[color=#00677c]Y[/color](),[color=#c0c0c0] [/color][color=#092e64]axis[/color].[color=#00677c]Direction[/color]().[color=#00677c]Z[/color]());[color=#c0c0c0] [/color][color=#800080]gp_Pnt[/color][color=#c0c0c0] [/color][color=#092e64]ap[/color][color=#c0c0c0] [/color]=[color=#c0c0c0] [/color][color=#092e64]l[/color][color=#00677c]->[/color][color=#00677c]Value[/color]([color=#092e64]param[/color]);[color=#c0c0c0] [/color][color=#800080]gp_Pnt[/color][color=#c0c0c0] [/color][color=#092e64]rv[/color][color=#c0c0c0] [/color]=[color=#c0c0c0] [/color][color=#092e64]start[/color];
[color=#c0c0c0] [/color][color=#092e64]rv[/color].[color=#00677c]SetX[/color]([color=#092e64]start[/color].[color=#00677c]X[/color]()[color=#c0c0c0] [/color]+[color=#c0c0c0] [/color][color=#092e64]param[/color][color=#c0c0c0] [/color]*[color=#c0c0c0] [/color][color=#092e64]dir[/color].[color=#00677c]X[/color]());[color=#c0c0c0] [/color][color=#092e64]rv[/color].[color=#00677c]SetY[/color]([color=#092e64]start[/color].[color=#00677c]Y[/color]()[color=#c0c0c0] [/color]+[color=#c0c0c0] [/color][color=#092e64]param[/color][color=#c0c0c0] [/color]*[color=#c0c0c0] [/color][color=#092e64]dir[/color].[color=#00677c]Y[/color]());[color=#c0c0c0] [/color][color=#092e64]rv[/color].[color=#00677c]SetZ[/color]([color=#092e64]start[/color].[color=#00677c]Z[/color]()[color=#c0c0c0] [/color]+[color=#c0c0c0] [/color][color=#092e64]param[/color][color=#c0c0c0] [/color]*[color=#c0c0c0] [/color][color=#092e64]dir[/color].[color=#00677c]Z[/color]());
[color=#c0c0c0] [/color][color=#092e64]l[/color][color=#00677c]->[/color][color=#00677c]D0[/color]([color=#092e64]param[/color],[color=#c0c0c0] [/color][color=#092e64]ap[/color]);
[color=#c0c0c0] [/color][color=#808000]return[/color][color=#c0c0c0] [/color][color=#092e64]rv[/color];[color=#c0c0c0] [/color]}
and here the circle/arc
Code:
[color=#800080]gp_Pnt[/color][color=#c0c0c0] [/color][color=#800080]Util3D[/color]::[color=#00677c]calcCircle[/color]([color=#000080]Handle[/color]([color=#800080]Geom_Circle[/color])[color=#c0c0c0] [/color][color=#092e64]c[/color],[color=#c0c0c0] [/color][color=#808000]double[/color][color=#c0c0c0] [/color][color=#092e64]param[/color])[color=#c0c0c0] [/color][color=#808000]const[/color][color=#c0c0c0] [/color]{[color=#c0c0c0] [/color][color=#808000]const[/color][color=#c0c0c0] [/color][color=#800080]gp_Ax2[/color]&[color=#c0c0c0] [/color][color=#092e64]axis[/color][color=#c0c0c0] [/color]=[color=#c0c0c0] [/color][color=#092e64]c[/color][color=#00677c]->[/color][color=#00677c]Position[/color]();[color=#c0c0c0] [/color][color=#800080]gp_Pnt[/color][color=#c0c0c0] [/color][color=#092e64]center[/color]([color=#092e64]axis[/color].[color=#00677c]Location[/color]().[color=#00677c]X[/color](),[color=#c0c0c0] [/color][color=#092e64]axis[/color].[color=#00677c]Location[/color]().[color=#00677c]Y[/color](),[color=#c0c0c0] [/color][color=#092e64]axis[/color].[color=#00677c]Location[/color]().[color=#00677c]Z[/color]());[color=#c0c0c0] [/color][color=#800080]gp_Dir[/color][color=#c0c0c0] [/color][color=#092e64]dir[/color]([color=#092e64]axis[/color].[color=#00677c]Direction[/color]());[color=#c0c0c0] [/color][color=#800080]gp_Dir[/color][color=#c0c0c0] [/color][color=#092e64]xDir[/color]([color=#092e64]axis[/color].[color=#00677c]XDirection[/color]());[color=#c0c0c0] [/color][color=#800080]gp_Dir[/color][color=#c0c0c0] [/color][color=#092e64]yDir[/color]([color=#092e64]axis[/color].[color=#00677c]YDirection[/color]());[color=#c0c0c0] [/color][color=#808000]double[/color][color=#c0c0c0] [/color][color=#092e64]r[/color][color=#c0c0c0] [/color]=[color=#c0c0c0] [/color][color=#092e64]c[/color][color=#00677c]->[/color][color=#00677c]Radius[/color]();[color=#c0c0c0] [/color][color=#808000]double[/color][color=#c0c0c0] [/color][color=#092e64]cp[/color][color=#c0c0c0] [/color]=[color=#c0c0c0] [/color][color=#00677c]cos[/color]([color=#092e64]param[/color]);[color=#c0c0c0] [/color][color=#808000]double[/color][color=#c0c0c0] [/color][color=#092e64]sp[/color][color=#c0c0c0] [/color]=[color=#c0c0c0] [/color][color=#00677c]sin[/color]([color=#092e64]param[/color]);[color=#c0c0c0] [/color][color=#800080]gp_Pnt[/color][color=#c0c0c0] [/color][color=#092e64]ap[/color][color=#c0c0c0] [/color]=[color=#c0c0c0] [/color][color=#092e64]c[/color][color=#00677c]->[/color][color=#00677c]Value[/color]([color=#092e64]param[/color]);[color=#c0c0c0] [/color][color=#800080]gp_Pnt[/color][color=#c0c0c0] [/color][color=#092e64]rv[/color];
[color=#c0c0c0] [/color][color=#092e64]rv[/color].[color=#00677c]SetX[/color]([color=#092e64]center[/color].[color=#00677c]X[/color]()[color=#c0c0c0] [/color]+[color=#c0c0c0] [/color][color=#092e64]r[/color][color=#c0c0c0] [/color]*[color=#c0c0c0] [/color][color=#092e64]cp[/color][color=#c0c0c0] [/color]*[color=#c0c0c0] [/color][color=#092e64]xDir[/color].[color=#00677c]X[/color]()[color=#c0c0c0] [/color]+[color=#c0c0c0] [/color][color=#092e64]r[/color][color=#c0c0c0] [/color]*[color=#c0c0c0] [/color][color=#092e64]sp[/color][color=#c0c0c0] [/color]*[color=#c0c0c0] [/color][color=#092e64]yDir[/color].[color=#00677c]X[/color]());[color=#c0c0c0] [/color][color=#092e64]rv[/color].[color=#00677c]SetY[/color]([color=#092e64]center[/color].[color=#00677c]Y[/color]()[color=#c0c0c0] [/color]+[color=#c0c0c0] [/color][color=#092e64]r[/color][color=#c0c0c0] [/color]*[color=#c0c0c0] [/color][color=#092e64]cp[/color][color=#c0c0c0] [/color]*[color=#c0c0c0] [/color][color=#092e64]xDir[/color].[color=#00677c]Y[/color]()[color=#c0c0c0] [/color]+[color=#c0c0c0] [/color][color=#092e64]r[/color][color=#c0c0c0] [/color]*[color=#c0c0c0] [/color][color=#092e64]sp[/color][color=#c0c0c0] [/color]*[color=#c0c0c0] [/color][color=#092e64]yDir[/color].[color=#00677c]Y[/color]());[color=#c0c0c0] [/color][color=#092e64]rv[/color].[color=#00677c]SetZ[/color]([color=#092e64]center[/color].[color=#00677c]Z[/color]()[color=#c0c0c0] [/color]+[color=#c0c0c0] [/color][color=#092e64]r[/color][color=#c0c0c0] [/color]*[color=#c0c0c0] [/color][color=#092e64]cp[/color][color=#c0c0c0] [/color]*[color=#c0c0c0] [/color][color=#092e64]xDir[/color].[color=#00677c]Z[/color]()[color=#c0c0c0] [/color]+[color=#c0c0c0] [/color][color=#092e64]r[/color][color=#c0c0c0] [/color]*[color=#c0c0c0] [/color][color=#092e64]sp[/color][color=#c0c0c0] [/color]*[color=#c0c0c0] [/color][color=#092e64]yDir[/color].[color=#00677c]Z[/color]());
[color=#c0c0c0] [/color][color=#092e64]c[/color][color=#00677c]->[/color][color=#00677c]D0[/color]([color=#092e64]param[/color],[color=#c0c0c0] [/color][color=#092e64]ap[/color]);
[color=#c0c0c0] [/color][color=#808000]return[/color][color=#c0c0c0] [/color][color=#092e64]rv[/color];[color=#c0c0c0] [/color]}
So I would appreciate it a lot if you could show me, how to calculate the "param" from given position.
Time to create page: 0.336 seconds