Reply

edge chamfer

[ Edited ]

 

Hi everybody,

i try to chamfer an edge in a part document. I don't know the edge's item number, but i know a point's coordinate on the edge.

So can I select an edge, if I know a point on it?

 

Thanks in advance, and best regards,

Laszlo

 

Posted by: Ungi Laszlo
Post date: 5/22/2009 12:23:00 AM

5 REPLIES

RE: edge chamfer

[ Edited ]

Just an idea,

You can create a Coordinate system in the known coordinates.

Then you can go through all the collection of edges in the body:

oDoc.Models(1).Edges

 

and find the minimumdistance between each edge and the coord sys.

The edge that returns distance equal 0 (to be sure, less than 0.01 mm, for example) is the edge you are looking for.

Apply the method

Chamfers.AddEqualSetback(NumberOfEdgeSets, EdgeSetArray, SetbackDistance)

to the found edge and that's all.

 

Hope this helps,

Julian

 

 

Posted by: Julian Guillo
Post date: 5/22/2009 8:50:32 AM

RE: edge chamfer

[ Edited ]

 

It seems to be a good solution.

I Will try it.

Thanks for Your fast help.

Laszlo

 

Posted by: Ungi Laszlo
Post date: 5/22/2009 9:11:07 AM

RE: edge chamfer

[ Edited ]

Hello Julian,

 

I have a little trouble, with the minimumdistance. in C#

I create a coordinate system. And i have an edge.

But in the minimumdistance command makes an error.

The command line:

part.MinimumDistance(koordinata, edges.Item(i), out tav, ref s1, ref s2);

where koordinata is the coordinate system

tav is double

s1,s2 is system arary

s1 = Array.CreateInstance(typeof(double), 3);

 

I think some trouble with te variant s1, and s2, but i dont found any info about it, on solid edge programming help.

 

i wait for any help,

Thanks

Laszlo

 

Posted by: Ungi Laszlo
Post date: 5/25/2009 9:39:27 PM

RE: edge chamfer

[ Edited ]

Yes, i didn't remember that.

A coordinate system does have internally 3 planes and 3 edges.

What you need from the coordinate system is the origin vertex object to measure against your edge.(not available directly)

You can get it like thisSmiley SadVb.net)

 

Dim ar1() As Double = {0.0, 0.0, 0.0}, ar2() As Double = {0.0, 0.0, 0.0}, tav As Double 'For minimumdistance method. I don't think that values are important

Dim oEdge2 As SolidEdgeGeometry.Edge, oVertex2 As SolidEdgeGeometry.Vertex

 

oEdge2 = koordinata.Axis(SolidEdgePart.CoordinateSystemFeatureConstants.seCoordSysXAxis) 'This is the X axis inside the CoordSys

oVertex2 = oEdge2.startVertex 'This is the start vertex for CS X axis, which is the point you need.

 

oPAR.MinimumDistance(edges.item(i), oVertex2, tav, ar1, ar2)

 

This worked for me. Hope this helps

Julian

 

 

Posted by: Julian Guillo
Post date: 5/26/2009 11:14:15 PM

RE: edge chamfer

[ Edited ]

It works fine /emoticons/smile.gif)

 

Thanks Again,

Laszlo

 

Posted by: Ungi Laszlo
Post date: 5/27/2009 9:20:54 AM