Skip to content
Discussion options

You must be logged in to vote

Turns out the entity is derived from AcDbCurve, so you can extract out the AcGeCurve. In this case it’s a AcGeCompositeCurve3d

@Ap.Command()
def doit0():
    try:
        db = Db.curDb()
        ps, id, _ = Ed.Editor.entSel("\nSelect: ", Db.Curve.desc())
        if ps != Ed.PromptStatus.eOk:
            raise RuntimeError("Yeet! {}: ".format(ps))
        string_points = []
        dbc = Db.Curve(id)
        gec = dbc.getAcGeCurve()
        if gec.type() == Ge.EntityId.kCompositeCrv3d:
            composite_curve = Ge.CompositeCurve3d.cast(gec)
            for curve_segment in composite_curve.getCurveList():
                if curve_segment.type() != Ge.EntityId.kLineSeg3d:
               …

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@schoeller
Comment options

@CEXT-Dan
Comment options

Answer selected by schoeller
@CEXT-Dan
Comment options

@schoeller
Comment options

@schoeller
Comment options

@CEXT-Dan
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants