SAESAM CAESES inherited from FRIENDSHIP-Framework uses SHIPFLOW offset group when it must do something with offsets. When the original surfaces have good quality, the offset groups are created very easily to be appropriate to CAESES but usually designers have to touch a little bit more to correct some unavailable offset points manually.
The feature definition SAFE_OFFSET_SECTION provides the offset group fit to SHIPFLOW offset rules.
An IGES surface patches
It looks fine but ...
zooming in, there we can see the gab between the patches which make unfavorable situation during geometrical management of CAD work.
With SectionGroup provided in CAESES the OffsetGroup can be created in default setting and some disconnection points are found around the gabs of the original surface patches.
Filtering in the feature definition SAFE_OFFSET_SECTION, the fine offset group is created arranged very regularly.
+++ Source Code +++
imageoffsetgroup imog(og)
offsetgroup wkog(imog)
unsigned size(wkog.getsize())
offsetgroup tempOg()
double oldXpos(-999)
double newXpos(-999)
offset oldOffset()
// Set Initial Offset
if(wkog.at(0).getFirst().getz()>wkog.at(0).getmin(2))
wkog.at(0).reverse()
endif
offset newOs000(wkog.at(0))
tempOg.addOffset(newOs000)
oldXpos=wkog.at(0).getfirst().getx()
oldOffset.attach(wkog.at(0))
unsigned i(1)
while(i<size)
offset newOs001() // New Offset Container
newOs001.clear()
offset wkOs000(wkog.at(i)) // Current Offset
newXpos=wkOs000.getFirst().getx() // Current X Position
// Start Point Check of wkOs000
if(wkOs000.getFirst().getz()>wkOs000.getmin(2))
wkOs000.reverse()
endif
// Section Duplication Check
if(abs(abs(newXpos)-abs(oldXpos))<0.000000001)
newOs001.attach(oldOffset)
newOs001.attach(wkOs000)
//double compTemp(abs(abs(newXpos)-abs(oldXpos)))
//echo(i.toString()+" "+"IN???" + " " +compTemp.toString())
else
newOs001.attach(wkOs000)
endif
newOs001.sortByAxis(2)
// newOs001.removeStrictlyMonoticViolation(2,true,2,-10,100)
tempOg.addOffset(newOs001)
oldXpos=newOs001.getFirst().getX() // Old X Position
oldOffset.clear()
oldOffset.attach(#newOs001) // Old Offset
i=i+1
endwhile
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// Clean Up Process
tempOg.reverse()
unsigned sizeTempOg(tempOg.getSize())
offsetgroup result_offsetgroup()
newXpos=tempOg.at(0).getfirst().getx()
i=1
while(i<sizeTempOg)
newXpos=tempOg.at(i).getFirst().getX()
if(abs(abs(newXpos)-abs(oldXpos))<0.000000001)
// DO NOT CONTAIN
else
result_offsetgroup.addOffset(tempOg.at(i))
endif
oldXpos=tempOg.at(i).getFirst().getx()
i=i+1
endwhile
result_offsetgroup.reverse()