sketch.move does nothing when a particular instance of sketchLine.trim is called

sketch.move does nothing when a particular instance of sketchLine.trim is called

lorraine5RWGT
Enthusiast Enthusiast
345 Views
0 Replies
Message 1 of 1

sketch.move does nothing when a particular instance of sketchLine.trim is called

lorraine5RWGT
Enthusiast
Enthusiast

When I call `sketch.move`, nothing happens if far back in my code, I had called `line.trim`.  Problem disappears (i.e. the specific `sketch.move` works) if I comment out that specific call to `line.trim`.

 

Strange, because problems with `sketch.move` don't seem like they should be related to `line.trim`

 

line = sketch.sketchCurves.sketchLines.addByTwoPoints(p1, p2)
# (Added CoincidentConstraint and PerpendicularConstraint)
line.trim(line.endSketchPoint.geometry, True)

# Later on, in another file
returnValue = sketch.move(sketchEntities, transform)

This last `sketch.move` command only moved the sketch if the `line.trim` above was commented out, despite it always returning True.  Both instances of `sketch` refer to the same sketch in the code snippet above.

 

`sketchEntities` is an ObjectCollection of multiple SketchPoint.  This collection of points what all the processing is based on, meaning `line` is just one of many sketch entities that were computed from other lines that were computed from the points, etc.

 

This behaviour is consistent for the same data across Fusion restarts. (e.g. it consistently happens for specific sets of data, but consistently doesn't happen on other sets of data)

0 Likes
346 Views
0 Replies
Replies (0)