Entities
Entities are the basic elements which are used to draw geometry in CAD Sketcher. They differ from regular blender mesh or curve elements which means native blender tools aren't able to interact with it as long as they aren't converted. See the chapter integration for further details on how to process extension specific geometry.
Entities are defined by a set of parameters and pointers to other entities which are editable at any point in time. This allows non-destructive workflows and also ensures that geometry is resolution independent. A curve will always follow a given radius no matter how it's transformed. Entities can be created with the various Workspacetools.
Active
An entity is considered to be active when the sketch it belongs to is set as the active sketch or, for 3D entities, when no sketch is active.
Visibility
Entities can be hidden. Access the setting from the entity's context menu or from the entity browser.
Construction
Entities have a construction parameter which can be set via the entity's context menu. If it's set to true the entity will be ignored when converting the geometry however it's still used to solve the geometric system. It's generally good practice to mark entities as construction if they're not part of the final geometry.
Fixed
Entities can be fixed via the entity's context menu. A fixed entity won't have any degrees of freedom and therefor cannot be adjusted by the solver. It's good practice to base geometry on a fixed origin point.
Warning: While this currently applies to all entities it's intended to be used with points only.
Types
There are different types of entities, some of them apply in 2 dimensional space which requires a sketch as a parameter.
Entity types follow the implementation of solvespace.
Only 2D entities can be converted later, check the chapter integration for details.
SlvsPoint3D
Representation of a point in 3D Space.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
location |
FloatVectorProperty
|
Point's location in the form (x, y, z) |
required |
SlvsLine3D
Representation of a line in 3D Space.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
p1 |
SlvsPoint3D
|
Line's startpoint |
required |
p2 |
SlvsPoint3D
|
Line's endpoint |
required |
SlvsNormal3D
Representation of a normal in 3D Space which is used to store a direction.
This entity isn't currently exposed to the user and gets created implicitly when needed.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
orientation |
Quaternion
|
A quaternion which describes the rotation |
required |
SlvsWorkplane
Representation of a plane which is defined by an origin point and a normal. Workplanes are used to define the position of 2D entities which only store the coordinates on the plane.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
p1 |
SlvsPoint3D
|
Origin Point of the Plane |
required |
nm |
SlvsNormal3D
|
Normal which defines the orientation |
required |
SlvsSketch
A sketch groups 2 dimensional entities together.
Entities that belong to a sketch can only be edited as long as the sketch is active.
SlvsPoint2D
Representation of a point in 2D space.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
co |
FloatVectorProperty
|
The coordinates of the point on the worpkplane in the form (U, V) |
required |
sketch |
SlvsSketch
|
The sketch this entity belongs to |
required |
SlvsLine2D
Representation of a line in 2D space. Connects p1 and p2 and lies on the sketche's workplane.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
p1 |
SlvsPoint2D
|
Line's startpoint |
required |
p2 |
SlvsPoint2D
|
Line's endpoint |
required |
sketch |
SlvsSketch
|
The sketch this entity belongs to |
required |
SlvsArc
Representation of an arc in 2D space around the centerpoint ct. Connects p2 to p3 or (vice-versa if the option invert_direction is true) with a circle segment that is resolution independent. The arc lies on the sketche's workplane.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
p1 |
SlvsPoint2D
|
Arc's centerpoint |
required |
p2 |
SlvsPoint2D
|
Arc's startpoint |
required |
p2 |
SlvsPoint2D
|
Arc's endpoint |
required |
nm |
SlvsNormal3D
|
Orientation |
required |
sketch |
SlvsSketch
|
The sketch this entity belongs to |
required |
SlvsCircle
Representation of a circle in 2D space. The circle is centered at ct with its size defined by the radius and is resoulution independent.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ct |
SlvsPoint2D
|
Circle's centerpoint |
required |
radius |
FloatProperty
|
The radius of the circle |
required |
nm |
SlvsNormal2D
|
|
required |
sketch |
SlvsSketch
|
The sketch this entity belongs to |
required |
Warning: While this currently applies to all entities it's intended to be used with points only.