- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello all,
I have a problem with SheetMetal.FlatExtents:
I want to get the flat patterns dimension, therefore I use SheetMetal.FlatExtents.
But sometimes I get a dimension that is rounded up to next integer (e.g. 201 mm) although it is exact ("200.0000 mm").
I am working with multibodies. the components I create out of the multibody should be exact the same but they differ sometimes by this strangely false rounded 1 mm.
Maybe it is because those parts are on different sides of the coordinate origin and then it is somehow in the negative direction of the axis?
first I tried a code like this:
Function SheetMetalRange(ByRef smDef As SheetMetalComponentDefinition)
Dim xSize As Integer
Dim ySize As Integer
Dim l As List(Of Integer) = New List(Of Integer)
xSize = (SheetMetal.FlatExtentsLength)
ySize = (SheetMetal.FlatExtentsWidth)
l.Add(xSize)
l.Add(ySize)
l.Sort()
Return l
End Function
But then I got for a dimension "37.5" sometimes the result "37" and sometimes "38".
I thought "Ceil" might help, so i modified my code:
Function SheetMetalRange(ByRef smDef As SheetMetalComponentDefinition)
'Dim xSize As Integer
'Dim ySize As Integer
Dim xSize As Double
Dim ySize As Double
Dim l As List(Of Integer) = New List(Of Integer)
xSize = Ceil(SheetMetal.FlatExtentsLength)
ySize = ceil (SheetMetal.FlatExtentsWidth)
l.Add(xSize)
l.Add(ySize)
l.Sort()
Return l
End Function
But now I get for a dimension "200 mm" sometimes "201" and sometimes "200".
Does anyone have an advice for me?
Solved! Go to Solution.