4 Jan 2011 19:34

## Re: Solid model from gcode (was Re: Interpreter/axis question)

``` On Tue, 4 Jan 2011 18:21:32 +0000, andy pugh wrote:
> On 4 January 2011 15:11, Mark <mpictor@...> wrote:
>
>> Creating *accurate* solids is a real challenge - if the tool is
>> moving in z
>> as well as x or y, the shape removed from the stock can be quite
>> complex.
>
> For a cylindrical milling cutter moving in Z I think you can reduce
> it
> to two boolean ops per complete G-code movement.
> You need to sweep the vertical cross section along the path into one
> solid, then subtract it, then sweep the base circle along the path
> and
> subtract that solid.
>
> I am having some difficulty visualising if a ball-end cutter is
> easier
> or harder.

I think that depends on the algorithm you use to do the sweeps.  If you
take a 3D model of the tool, and then sweep the tool path between the
tangent of the tool at its start and stop location, you would end up
with something that works for any circularly swept tools (ie ones that
spin).  The algorithm would look like -- for each point on tool, find
its path tangent and translate the original tool path to this point,
didto on next point, and then model that as the boundaries of a swept
surface -- where the tool contour makes up the vertical boundaries and
the tool path makes up the horizontal ones.  Does this make sense?
Anyway, it would not necessarily work for tools which do not spin (like
```

4 Jan 2011 19:49

### Re: Solid model from gcode (was Re: Interpreter/axis question)

```On 4 January 2011 18:34, EBo <ebo@...> wrote:

>  I think that depends on the algorithm you use to do the sweeps.  If you
>  take a 3D model of the tool, and then sweep the tool path between the
>  tangent of the tool at its start and stop location, you would end up
>  with something that works for any circularly swept tools (ie ones that
>  spin).

I was assuming (from a position of ignorance) that there was something
built in to OpenCascade that dod sweeps. My experience is purely in 3D
CAD, and in those packages you can only sweep a 2D sketch along a 3D
path.

--

--
atp
"Torque wrenches are for the obedience of fools and the guidance of wise men"

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
```
4 Jan 2011 23:48

### Re: Solid model from gcode (was Re: Interpreter/axis question)

On Tue, Jan 4, 2011 at 1:49 PM, andy pugh wrote:
On 4 January 2011 18:34, EBo <ebo-doD3EReIBWJBDgjK7y7TUQ@public.gmane.org> wrote:

>  I think that depends on the algorithm you use to do the sweeps.  If you
>  take a 3D model of the tool, and then sweep the tool path between the
>  tangent of the tool at its start and stop location, you would end up
>  with something that works for any circularly swept tools (ie ones that
>  spin).

I was assuming (from a position of ignorance) that there was something
built in to OpenCascade that dod sweeps. My experience is purely in 3D
CAD, and in those packages you can only sweep a 2D sketch along a 3D
path.

OCC won't sweep using a solid. If it did, this would be much easier.

If I can get the silhouette code to work, it should produce a correct sweep shape for all motion except arcs (and helices) in XZ and YZ plane. In those cases, the angle of attack wrt Z changes during the motion. The silhouette is computed using that angle, so it wouldn't be constant over the motion.

I am having some difficulty visualising if a ball-end cutter is easier
or harder.

This stuff certainly is difficult to visualize or put into words! I'm pretty sure that a ballnose tool will always create a shape that involves a circle or circular arc - never an ellipse. So it's easier.

I need to find a tool that allows sketching of geometric shapes in 3d, to use for visualizing this stuff. 2d just doesn't cut it!

Mark

```------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl```
```_______________________________________________
Emc-developers mailing list
Emc-developers@...
https://lists.sourceforge.net/lists/listinfo/emc-developers
```
5 Jan 2011 00:43

### Re: Solid model from gcode (was Re: Interpreter/axis question)

```On 4 January 2011 22:48, Mark <mpictor@...> wrote:

>> I was assuming (from a position of ignorance) that there was something
>> built in to OpenCascade that dod sweeps. My experience is purely in 3D
>> CAD, and in those packages you can only sweep a 2D sketch along a 3D
>> path.
>>
> OCC won't sweep using a solid. If it did, this would be much easier.

Indeed, which is why I suggested sweeping a vertical rectangle  to
create the first solid, then a horizontal circle to create a second
one.
The second subtract should give you the "scalloping" and is only
required if the sweep path has a vertical component.

--

--
atp
"Torque wrenches are for the obedience of fools and the guidance of wise men"

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
```
5 Jan 2011 00:56

### Re: Solid model from gcode (was Re: Interpreter/axis question)

``` On 4 January 2011 22:48, Mark <mpictor@...> wrote:
>> I was assuming (from a position of ignorance) that there was
>> something
>> built in to OpenCascade that dod sweeps. My experience is purely in
>> 3D
>> CAD, and in those packages you can only sweep a 2D sketch along a 3D
>> path.
>>
> OCC won't sweep using a solid. If it did, this would be much easier.

What does it use?  If it only uses a 2D projection, then use the
silhouette.

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
```
5 Jan 2011 12:10

### Re: Solid model from gcode (was Re: Interpreter/axis question)

On Tue, Jan 4, 2011 at 6:56 PM, EBo wrote:
On 4 January 2011 22:48, Mark <mpictor-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>> I was assuming (from a position of ignorance) that there was
>> something
>> built in to OpenCascade that dod sweeps. My experience is purely in
>> 3D
>> CAD, and in those packages you can only sweep a 2D sketch along a 3D
>> path.
>>
> OCC won't sweep using a solid. If it did, this would be much easier.

What does it use?  If it only uses a 2D projection, then use the
silhouette.

Yes, that's what I'm trying to do with occ's hidden line removal. However, I ran into problems with the data that opencascade gives me. I need a closed loop of edges, and for any two ends that are coincident, the edges need to share the same vertex in memory. They don't share vertex objects, though the coordinates are the same. I tried to replace one of the vertexes with the other, but haven't been able to make it work yet. I end up with an invalid pointer, and haven't tracked the cause down yet.

Mark
```------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl```
```_______________________________________________
Emc-developers mailing list
Emc-developers@...
https://lists.sourceforge.net/lists/listinfo/emc-developers
```
5 Jan 2011 17:01

### Re: Solid model from gcode (was Re: Interpreter/axis question)

``` On Wed, 5 Jan 2011 06:10:04 -0500, Mark wrote:
> On Tue, Jan 4, 2011 at 6:56 PM, EBo <ebo@...> wrote:
>>
>>  What does it use?  If it only uses a 2D projection, then use the
>>  silhouette.
>
> Yes, that's what I'm trying to do with occ's hidden line removal.
> However, I
> ran into problems with the data that opencascade gives me. I need a
> closed
> loop of edges, and for any two ends that are coincident, the edges
> need to
> share the same vertex in memory. They don't share vertex objects,
> though the
> coordinates are the same. I tried to replace one of the vertexes with
> the
> other, but haven't been able to make it work yet. I end up with an
> invalid
> pointer, and haven't tracked the cause down yet.

Well, seems we are on the same page.  Wish I could help, but I am in
the middle of things.  If you do not get it sorted out in a month, ping
me back.  It is likely going to be ~6 months before I can take anything
else on like trying to help debug a silhouette mesh reducer...

You might want to file a bug report with opencascade.  There should be
a function already within it which properly collapses/optimizes the
mesh, but was not called when it did its hidden line removal.  That is
where I would start.

EBo --

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
```

Gmane