simple linux cam

More
4 years 7 months ago - 4 years 7 months ago #238806 by Grotius
Replied by Grotius on topic simple linux cam
 This is a header file i just made for 3d line extend. Let me know if you can use this type of implementation? 
Attachments:
Last edit: 4 years 7 months ago by Grotius.
More
4 years 7 months ago #238809 by Grotius
Replied by Grotius on topic simple linux cam
For the arc extension, would you like to input extension value in degrees or in mm?
More
4 years 7 months ago - 4 years 7 months ago #238833 by Grotius
Replied by Grotius on topic simple linux cam
Just made a header function to extend a arc in 3d.
Input is degrees to add for start or end point.Let me know if this is usable for you.

And the archive with complete code for above examples :
github.com/grotius-cnc/occt-samples-qope.../OcctQtGuiApp.tar.gz

Then to extend a wire. Use the "wire add" function. And add the exension.

BRepBuilderAPI_MakeWire wire;
TopoDS_Edge edge = BRepBuilderAPI_MakeEdge(Line or Arc);
wire.Add(edge);
return new AIS_Shape(wire);
Attachments:
Last edit: 4 years 7 months ago by Grotius.
More
4 years 7 months ago #238861 by Reinhard
Replied by Reinhard on topic simple linux cam
Hi grotius,

thank you for your attention and support!

> Then to extend a wire. Use the "wire add" function. And add the exension.

Great! Didn't thought of the most obvious solution. Thank you for the kick.
Using own math objects might be a good solution too. Maybe better than fiddling with opencascade objects.
I already tried similar by using CavalierContours. If you follow the link from CavalieContours from my last post, you'll see, where I got stuck with cc.

A big problem (for me) of opencascade is that so many methods (+ classes) don't do, what the name makes you expect.

Just selecting the same faces than with picture from last post only in different order result in completely different behaviour.
Still looking for a way to make opencascade do what I want.


When I ask opencascade for intersection of two shapes I get a bunch of unordered edges (AIS_Shape), which is based on some parametric Geom-class. When I ask occ for geom-object I get it together with the limits of the parameters and using D0 with some parameter gives the vertex points of the curve.

To sort those edges for cavaliercontours polyline you maybe need to flip the direction of an edge. The geom-classes have some Revert/Reverted methods, so I thought reverting a line that goes from A to B would lead to a line from B to A, but that's not true.

So - may be I should go for my own math objects and use occ for display only ...

 
More
4 years 7 months ago #238891 by Grotius
Replied by Grotius on topic simple linux cam
Hi Reinhard,

If you follow the link from CavalieContours from my last post, you'll see, where I got stuck with cc.

I followed your CavalierContour link. And the solution is to use "cavalier's pocket operation" instead of " cavalier's offset operation".
Then you will end up without the yellow circle included. The solution is straight forward.

The result i mean look like this picture : raw.githubusercontent.com/grotius-cnc/Ca...evolution_pocket.png
Repository link : github.com/grotius-cnc/cadcam_pockets

Just selecting the same faces than with picture from last post only in different order result in completely different behaviour.
Still looking for a way to make opencascade do what I want.


Instead of offsetting a (non-closed) wire, why not use a closed wire (retrieved face boundary) and do a inside pocket operation.

To sort those edges for cavaliercontours polyline you maybe need to flip the direction of an edge. The geom-classes have some Revert/Reverted methods, so I thought reverting a line that goes from A to B would lead to a line from B to A, but that's not true.

This is indeed the case. All cavalier inputs has to be ordered. This need's to be done by a (your custom) algo.
Simple cam uses such a algo.

So - may be I should go for my own math objects and use occ for display only ...

Doing some math by your own is certainly a good initiative.
Occt functions like : double dist=point1.Distance(point2) are nice to use.

Ok resume.
Do you need a Cavaliercontour interface where you can put in a "occt unordered wire" and it then gives back a pocket shape result in the form off a compound?
 
More
4 years 7 months ago #238892 by Grotius
Replied by Grotius on topic simple linux cam
Hi Reinhard,

Currently doing a course with Ghidra to do some reverse engineering on DraftSight.

I hope to bypass the activation process by adding a few jumps in the elf file.
And then hope to run DrafSight without any registration for entire Linux community.

Ghidra break's down compiled code and show's it as c++, and it's interesting to break down also
DraftSight library's into c++ code.

If you have any math code request's just ask.
Time to create page: 0.148 seconds
Powered by Kunena Forum