Hi
How can I create the offset from a solid with different offset values on different faces.
BRepOffsetAPI_MakeOffsetShape doesn't have the option for that.
Thanks.
Sean
wentao Sat, 06/08/2013 - 07:53
One way is to offset each surface of the solid, then make the new solid from these faces.
you could use BRepOffset_MakeOffset class (which is internally used by BRepOffsetAPI_MakeOffsetShape)
with its method SetOffsetOnFace():
In PythonOCC this could be done like so:
mode = BRepOffset_Skin; Intersection = 0; SelfInter = 0
builder = BRepOffset_MakeOffset()
builder.Initialize(sourceshape,thickness,eps,mode,Intersection,SelfInter,joinmethod)
for aface in localthicknesses:
builder.SetOffsetOnFace(TopoDS().face(aface), localthicknesses[aface])
builder.MakeOffsetShape()
offsetshape = builder.Shape()
Sat, 06/08/2013 - 07:53
One way is to offset each surface of the solid, then make the new solid from these faces.
Tue, 06/11/2013 - 19:25
Hi Wentao:
Thanks, but which function I can use to just offset a face of a solid?
Thanks.
Sean
Tue, 06/11/2013 - 23:48
Dear Sean,
you could use BRepOffset_MakeOffset class (which is internally used by BRepOffsetAPI_MakeOffsetShape)
with its method SetOffsetOnFace():
In PythonOCC this could be done like so:
mode = BRepOffset_Skin; Intersection = 0; SelfInter = 0
builder = BRepOffset_MakeOffset()
builder.Initialize(sourceshape,thickness,eps,mode,Intersection,SelfInter,joinmethod)
for aface in localthicknesses:
builder.SetOffsetOnFace(TopoDS().face(aface), localthicknesses[aface])
builder.MakeOffsetShape()
offsetshape = builder.Shape()
Hope this helps,
Mark
Wed, 06/12/2013 - 11:28
That's seriously cool Mark... we should add that to the examples...
Thanks for sharing...
-jf