Creating sketch from baseFeature - aka not parametric - fail to update transform

Creating sketch from baseFeature - aka not parametric - fail to update transform

gscotti
Enthusiast Enthusiast
418 Views
1 Reply
Message 1 of 2

Creating sketch from baseFeature - aka not parametric - fail to update transform

gscotti
Enthusiast
Enthusiast
    def newSketch(self, plane = None):
        component = self.occurrence.component
        plane = component.xYConstructionPlane if plane is None else plane

        planes = component.constructionPlanes
        planeInput = planes.createInput()
        planeInput.targetBaseOrFormFeature = self.feature
        planeInput.setByOffset(plane, core.ValueInput.createByReal(0))
        
        plane = planes.add(planeInput)
        sk = component.sketches.addToBaseOrFormFeature(plane, self.feature,True)
        return sk
...
        try:
            print('Sketch isParametric?',self.sketch.isParametric)
            self.savedTransform = self.sketch.transform
            self.sketch.transform = tmatrix
            yield self
        except RuntimeError as e:
            print('****!', e)

Sketch isParametric? False
****!: Fail in the case where the sketch is parametric

 

0 Likes
419 Views
1 Reply
Reply (1)
Message 2 of 2

liujac
Alumni
Alumni

Hi,

 

It's a defect. The sketch under a base feature should can be transformed. I logged a defect (UP-30724) in our internal system. We will fix it soon. Thanks for reporting this issue.

 

Jack

0 Likes