代码拉取完成,页面将自动刷新
同步操作将从 wwzggz/cadviewer 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
Ways to move a TopoDS_shape:
# TopLoc_Location
# as shown in
tFace = BRepBuilderAPI_MakeFace(mFace).Face()
faceNormal = Construct.face_normal(mFace)
vctr = gp_Vec(faceNormal).Multiplied(value)
trsf = gp_Trsf()
trsf.SetTranslation(vctr)
tFace.Move(TopLoc_Location(trsf))
# BRepBuilderAPI_Transform
# as shown in core_topology_boolean.py
def translate_topods_from_vector(brep_or_iterable, vec, copy=False):
'''
translate a brep over a vector
@param brep: the Topo_DS to translate
@param vec: the vector defining the translation
@param copy: copies to brep if True
'''
trns = gp_Trsf()
trns.SetTranslation(vec)
brep_trns = BRepBuilderAPI_Transform(brep_or_iterable, trns, copy)
brep_trns.Build()
return brep_trns.Shape()
# as shown in core_classic_occ_bottle.py
# Create a wire out of the edges
aWire = BRepBuilderAPI_MakeWire(aEdge1.Edge(), aEdge2.Edge(), aEdge3.Edge())
# Quick way to specify the X axis
xAxis = gp_OX()
# Set up the mirror
aTrsf = gp_Trsf()
aTrsf.SetMirror(xAxis)
# Apply the mirror transformation
aBRespTrsf = BRepBuilderAPI_Transform(aWire.Wire(), aTrsf)
# Get the mirrored shape back out of the transformation and convert back to a wire
aMirroredShape = aBRespTrsf.Shape()
# A wire instead of a generic shape now
aMirroredWire = topods.Wire(aMirroredShape)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。