Model.CE_CreateNodeOnSpotConnector#

Model.CE_CreateNodeOnSpotConnector(collection, x=0, y=0, z=0)#

Creates a node on a spot line connector at a given position. This node can then be used to trim the spot line connector at that location. To create a node with a mouse click on a connector, the x, y, and z values should all be passed as -1.

Parameters:
  • collection (Collection) – The collection containing the spot line connector entities to trim.

  • x (double) – The x position on the spot line connector.

  • y (double) – The y position on the spot line connector.

  • z (double) – The z position on the spot line connector.

Examples#

Create a temp node on spot line connector with ID 101 at (100.0, 50.0, 50.0)#
import hm
import hm.entities as ent

model = hm.Model()

model.CE_CreateNodeOnSpotConnector(
    collection=hm.Collection(model, ent.Connector, [101]), x=100.0, y=50.0, z=50.0
)
Create a temp node on spot line connector with ID 101 at a mouse click position#
import hm
import hm.entities as ent

model = hm.Model()

model.CE_CreateNodeOnSpotConnector(
    collection=hm.Collection(model, ent.Connector, [101]), x=-1, y=-1, z=-1
)