Replies: 1 comment
-
Hi, I still have a lot of work to do on solids. Mainly, I would like to get BRep wrapped to help simplify iterating edges and faces. Something like this should work in next release from msvcrt import kbhit
from pyrx_imp import Ap, Db, Ed, Ge, Gi, Gs, Rx
import traceback
# https://help.autodesk.com/view/OARXMAC/2024/ENU/?guid=GUID-444FCDAF-8EC2-42ED-BEAA-258372BE9852
def PyRxCmd_doit():
try:
filter = [(Db.DxfCode.kDxfStart, "3DSOLID")]
es, ss = Ed.Editor.ssget("_:S", None, None, filter)
if es != Ed.PromptStatus.eOk:
raise RuntimeError("Entsel Error! {}: ".format(es))
ssx = ss.ssNameX()
if len(ssx) < 4:
raise RuntimeError("ssNameX Error!: ")
# fourth list element, is the gsmarker.
marker = ssx[3][1]
id = ss.objectIds()[0]
solid = Db.Solid3d(id, Db.OpenMode.kForWrite)
pt = Ge.Point3d() # todo
xform = Ge.Matrix3d() # todo compute
paths = solid.getSubentPathsAtGsMarker(
Db.SubentType.kFaceSubentType, marker, pt, xform)
solid.highlight(paths[0], False)
Ed.Editor.initGet(1, "Yes No")
res = Ed.Editor.getKword("\nEnter an option [Yes/No]: ")
if res[1] == "Yes":
solid.extrudeFaces([paths[0].subentId()], 100.0, 0.0)
except Exception as err:
traceback.print_exception(err) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Can I ask for an example of using
Db.Solid3d.extrudeFaces
. I don't know how to getSubentId
.Beta Was this translation helpful? Give feedback.
All reactions