📜 ⬆️ ⬇️

Parametric modeling in CAD SolveSpace: Sketch

The construction of the geometry of any part in SolveSpace begins with the design of the sketch . A sketch is a set of closed contours (cycles, loop) , each of which should not have self-intersections and intersections with other contours. Contours consist of primitives (entity) . Primitives are combined into contours using point-to-point constraints (points coincident).
Part 1: Introduction
Part 2: Sketch
Part 3: Degrees of freedom and constraint equations
Part 4: "The ways of the Solver are inscrutable" or "Newton's Wormholes"
image


Request


Creating primitives in SolveSpace has one feature: the user creates them by sets (requests, requests) . For example, when requesting to create a segment, three entities are created to represent it: two points and a line connecting them. For a user, there is no separation of a request into separate entities: if the user deletes one of the request entities, the entire request is also deleted. Entities can be divided into two classes: those that do not have parameters (parameters) and entities that have parameters: points, normals, and distances.


Points


Points in SolveSpace are the basis of parameterization and have parameters that correspond to coordinates in the Cartesian system. The points are two-dimensional and three-dimensional and contain two or three parameters, respectively. For simplicity, we will consider such characteristics as the number of parameters, degrees of freedom (DOF) and equations only for the two-dimensional case.


image


Normals


The normal has a reference to a point that defines the origin of the coordinate system (origin) . Normals are used to define a coordinate system in assembly parts and for some primitives. User cannot create normals. The normal introduces 4 parameters and one equation (equation) , which corresponds to 3 rotational degrees of freedom. This rotation is expressed by a quaternion, and the equation serves to bring it to a unit length.


Distances


Distances are used to set the radii of the circles. This entity does not have a visualization, and it cannot be created separately, so it can be viewed as part of a circle. The essence of the distance determines the only parameter - the radius of the circle.


Pieces


A segment consists of two points and a line that connects them. The segment introduces 4 degrees of freedom and 4 parameters.


image


Circumference


The circle creation request creates a point, a normal, a distance, and a circle line. Normal is needed for orientation of a circle in three-dimensional space.
image


Arcs of circles


A request to create a circular arc consists of three points, a normal and a segment of a circle. Arc adds six parameters and one equation. The resulting number of degrees of freedom is five. They can be represented as center coordinates, radius, one-dimensional coordinates (angles) of the beginning and end of the arc.
image


Cubic Bezier Splines


In SolveSpace, it is possible to create cubic Bezier splines. Splines can be closed and open. If the spline contains more than 4 points, several segments of cubic splines are created, with smooth joining of the first and second derivatives. For example, such splines are ideal for designing the aerodynamic profile of an airplane wing and other streamlined shapes. For an open spline, it is possible to change the derivatives at the beginning and end of the spline by changing the coordinates of the corresponding points.
image
image


Text


SolveSpace supports the creation of contours based on text using TrueType fonts, which are also based on cubic splines. This allows you to create labels on bulk models of parts.
image


Images


It is possible to insert an arbitrary image from a png file. This image can be rotated freely, resized, so that it can serve as the basis for manually converting scanned drawings into SolveSpace format. Corner points of images can be involved in the restrictions, which allows you to align the image and adjust its scale .
image


Conclusion


Here I briefly introduced you to the basic entity types of the two-dimensional SolveSpace sketch. This knowledge will be actively used in the next article, where the equations of constraints will be considered.


Part 1: Introduction
Part 2: Sketch
Part 3: Degrees of freedom and constraint equations
Part 4: "The ways of the Solver are inscrutable" or "Newton's Wormholes"


')

Source: https://habr.com/ru/post/324514/


All Articles